<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Bytes - answers</title>
		<link>http://bytes.com</link>
		<description>Microsoft SQL Server database  RDBMS - Get answers to questions about MSSQL administration, queries, errors, xml, data access, transact-sql, tools, mirroring, integration, setup, stored procedures, merging  and more.</description>
		<language>en</language>
		<lastBuildDate>Fri, 20 Nov 2009 22:40:42 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://bytes.com/images/misc/rss.jpg</url>
			<title>Bytes - answers</title>
			<link>http://bytes.com</link>
		</image>
		<item>
			<title>The INSERT statement conflicted with the FOREIGN KEY constraint</title>
			<link>http://bytes.com/topic/sql-server/answers/877361-insert-statement-conflicted-foreign-key-constraint</link>
			<pubDate>Fri, 20 Nov 2009 12:24:45 GMT</pubDate>
			<description>Hi 
 
i have two tables  
 
1- Person 
2- Account 
 
In Account table i have key accountID which is a FK in Person table. 
 
when i run the insert...</description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
i have two tables <br />
<br />
1- Person<br />
2- Account<br />
<br />
In Account table i have key accountID which is a FK in Person table.<br />
<br />
when i run the insert query as<br />
<br />
<br />
insert into <br />
<br />
Person(FirstName2) <br />
<br />
values ('waq')<br />
<br />
as i did not enter any data for account field so it gives me the eror:<br />
<br />
<br />
The INSERT statement conflicted with the FOREIGN KEY constraint &quot;FK_Person_Account&quot;. The conflict occurred in database &quot;abc&quot;, table &quot;dbo.Account&quot;, column 'AccountId'.<br />
<br />
can somebody help me with that as i want to insert the valuse in Person table whether i have accountID or not<br />
<br />
Thanx</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>waqasahmd</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/877361-insert-statement-conflicted-foreign-key-constraint</guid>
		</item>
		<item>
			<title>How to convert rows into different columns</title>
			<link>http://bytes.com/topic/sql-server/answers/877350-how-convert-rows-into-different-columns</link>
			<pubDate>Fri, 20 Nov 2009 09:56:03 GMT</pubDate>
			<description>How to convert rows into different columns  
 
Thanks in advance</description>
			<content:encoded><![CDATA[<div>How to convert rows into different columns <br />
<br />
Thanks in advance</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>kirankumarn</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/877350-how-convert-rows-into-different-columns</guid>
		</item>
		<item>
			<title>how i convert dbf file int sql file</title>
			<link>http://bytes.com/topic/sql-server/answers/877307-how-i-convert-dbf-file-int-sql-file</link>
			<pubDate>Thu, 19 Nov 2009 13:23:37 GMT</pubDate>
			<description>i have file that have .dbf extension and i want to convert into sql format i used this for some purpose  
is any one tell me how this done?</description>
			<content:encoded><![CDATA[<div>i have file that have .dbf extension and i want to convert into sql format i used this for some purpose <br />
is any one tell me how this done?</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>yasir115</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/877307-how-i-convert-dbf-file-int-sql-file</guid>
		</item>
		<item>
			<title>Can I calculate between different datasets?</title>
			<link>http://bytes.com/topic/sql-server/answers/877225-can-i-calculate-between-different-datasets</link>
			<pubDate>Wed, 18 Nov 2009 08:52:20 GMT</pubDate>
			<description>I am working on a report where I use the *same query* with different data sources. both databases are build the same way and I can show the data from...</description>
			<content:encoded><![CDATA[<div>I am working on a report where I use the <b>same query</b> with different data sources. both databases are build the same way and I can show the data from both datasets. At the moment it looks like this:<br />
<br />
<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
DATASET1&nbsp;TABLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DATASET2&nbsp;TABLE</li>
<li class="codeLI">
4234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23423</li>
<li class="codeLI">
52226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2342342</li>
<li class="codeLI">
55522&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;14234</li>
<li class="codeLI">
6788&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;234234</li>
<li class="codeLI">
22568&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23532</li>
<li class="codeLI">&nbsp;</li>

	</ol>
</div>
</div>
<!-- /CODE -->


Of course each table belongs to different dataset. I was wondering if it is possible to calculate the difference between the upper colums, so it would look like this<br />
<br />
<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
DATASET1&nbsp;TABLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DATASET2&nbsp;TABLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DIFFERENCE</li>
<li class="codeLI">
4234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23423&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-19189</li>
<li class="codeLI">
52226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2342342&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-2290116</li>
<li class="codeLI">
55522&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;14234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;41288&nbsp;</li>
<li class="codeLI">
6788&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;234234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-227446</li>
<li class="codeLI">
22568&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23532&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-964</li>
<li class="codeLI">&nbsp;</li>

	</ol>
</div>
</div>
<!-- /CODE -->


and the also color the cell red or green :) I am using the 2005 version</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>jedieagle</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/877225-can-i-calculate-between-different-datasets</guid>
		</item>
		<item>
			<title>Query Engine Error after Forced Protocol Encryption on Crystal Report</title>
			<link>http://bytes.com/topic/sql-server/answers/877175-query-engine-error-after-forced-protocol-encryption-crystal-report</link>
			<pubDate>Tue, 17 Nov 2009 15:39:57 GMT</pubDate>
			<description>After enabling forced protocol encryption on SQL server there are a handful of crystal reports that have the following error when you try to run them...</description>
			<content:encoded><![CDATA[<div>After enabling forced protocol encryption on SQL server there are a handful of crystal reports that have the following error when you try to run them<br />
<br />
Query Engine Error: '08S01:[Microsoft][ODBC SQL Server Driver]Communication link failure<br />
<br />
Turn the forced protocol encryption off on SQL Server and they work again just fine. I have tried re-choosing the data source of the .rpt files, and tried turning on Integrated Security before loading the reports with no luck<br />
<br />
Has anyone had this problem? Is there something that can be done to let these reports run with forced protocol encryption?</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>jeffstl</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/877175-query-engine-error-after-forced-protocol-encryption-crystal-report</guid>
		</item>
		<item>
			<title>How to query untyped xml data</title>
			<link>http://bytes.com/topic/sql-server/answers/877122-how-query-untyped-xml-data</link>
			<pubDate>Mon, 16 Nov 2009 19:50:50 GMT</pubDate>
			<description><![CDATA[I have a varchar/text field that contains untyped xml. I don't want to use schema. How would one query this: 
 
<configuration> 
 ...]]></description>
			<content:encoded><![CDATA[<div>I have a varchar/text field that contains untyped xml. I don't want to use schema. How would one query this:<br />
<br />
&lt;configuration&gt;<br />
  &lt;connectionsettings&gt;<br />
    &lt;add key=&quot;appKey&quot; value=&quot;355&quot; /&gt;<br />
    &lt;add key=&quot;SessionURL&quot; value=&quot;http://xxxxxx&quot; /&gt;<br />
    &lt;add key=&quot;UpdateOrderURL&quot; value=&quot;http://yyyyyyy&quot; /&gt;<br />
    &lt;add key=&quot;IgnoreFailure&quot; value=&quot;true&quot; /&gt;<br />
  &lt;/connectionsettings&gt;<br />
&lt;/configuration&gt;<br />
<br />
I want the &quot;value&quot; for 'IgnoreFailure'<br />
<br />
DECLARE @x XML<br />
select @x = myColumn from myTable where recordid = 1<br />
select @x.query(...<br />
<br />
~Gina_M~</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>GinaMarano</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/877122-how-query-untyped-xml-data</guid>
		</item>
		<item>
			<title>TSQL query</title>
			<link>http://bytes.com/topic/sql-server/answers/877078-tsql-query</link>
			<pubDate>Mon, 16 Nov 2009 05:01:53 GMT</pubDate>
			<description>I had to write a valid TSQL query that does all the following in a transaction and will rollback if any system error is thrown. 
 
•	Create the...</description>
			<content:encoded><![CDATA[<div>I had to write a valid TSQL query that does all the following in a transaction and will rollback if any system error is thrown.<br />
<br />
•	Create the following tables Customer, Order and Address where Customer can have many Orders and many Addresses. Order can only have one Address. Customer will have a column called CustomerNum of type NVARCHAR(3).<br />
•	Develop a SQL function that provides a unique, incremented CustomerNum in the form “001”, “002”, “010” etc. Using that function, insert 10 new Customer rows. Note: the function needs to be as efficient as possible. Add any indexes that might be needed.<br />
•	Insert 1 Address per Customer.<br />
•	Insert 2 Orders per Customer.<br />
•	Ensure each Order has a valid Address from the corresponding Customer.<br />
•	Ensure that if the tables already exist that they are dropped from the database.<br />
•	Ensure all tables use primary keys and are of type GUID.<br />
<br />
Any quick response is really appreciated.</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>jabeek</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/877078-tsql-query</guid>
		</item>
		<item>
			<title>role permission of tempdb due to server restart</title>
			<link>http://bytes.com/topic/sql-server/answers/877012-role-permission-tempdb-due-server-restart</link>
			<pubDate>Sat, 14 Nov 2009 07:34:54 GMT</pubDate>
			<description>in our application that need to create some tables in tempdb. The user 
(call it APP) is not sa. Everytime that the server need to be rebooted, the...</description>
			<content:encoded><![CDATA[<div>in our application that need to create some tables in tempdb. The user<br />
(call it APP) is not sa. Everytime that the server need to be rebooted, the<br />
db_owner role on tempdb for user APP disappear. So...<br />
 <br />
<br />
1. Is there any setting to ensure that the the db_owner role on tempdb for<br />
user APP will remain after server reboot?<br />
 <br />
<br />
2. If not,<br />
Is there any solustion to run a script at server startup?<br />
And does anybody have a script that will create the db_owner role on tempdb<br />
for user APP(or some pointer on how)?<br />
<br />
Chirag Vyas<br />
Project Manager<br />
<a href="http://www.tatvasoft.com" target="_blank">Software Outsourcing India</a><br />
<a href="http://www.sparsh-technologies.com" target="_blank">Web Development Company India</a></div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>ctatvasoft</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/877012-role-permission-tempdb-due-server-restart</guid>
		</item>
		<item>
			<title>Want to track the user who last modified the procedure</title>
			<link>http://bytes.com/topic/sql-server/answers/876916-want-track-user-who-last-modified-procedure</link>
			<pubDate>Thu, 12 Nov 2009 12:40:53 GMT</pubDate>
			<description>Hi all, 
 
I want to track the user who lastly modified the procedure.Can anybody guide me how can i achieve this ?.. I want to write the query for...</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I want to track the user who lastly modified the procedure.Can anybody guide me how can i achieve this ?.. I want to write the query for the same.<br />
<br />
Thanks!</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>madankarmukta</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/876916-want-track-user-who-last-modified-procedure</guid>
		</item>
		<item>
			<title>How can i convert this query into sql server whereas this is working  in MS ACCESS</title>
			<link>http://bytes.com/topic/sql-server/answers/876891-how-can-i-convert-query-into-sql-server-whereas-working-ms-access</link>
			<pubDate>Thu, 12 Nov 2009 05:33:52 GMT</pubDate>
			<description>SELECT tblProposals.District_Code, tblProposals.PFT_Code, tblProposals.Village_code, tblProposals.Activity_code, tblProposals.SubActivity_code,...</description>
			<content:encoded><![CDATA[<div>SELECT tblProposals.District_Code, tblProposals.PFT_Code, tblProposals.Village_code, tblProposals.Activity_code, tblProposals.SubActivity_code, tblProposals.GSGrant, tblProposals.GSLoan, tblProposals.OwnContribution<br />
FROM tblProposals WHERE (((tblProposals.Level)='1') AND (tblProposals.GSGrant=0)  AND (tblProposals.GSLoan=0) AND tblproposals.Activity_Code in ('01','02','04','05','06','07','08','09','12','13'  ,'14')  and iif(tblproposals.Activity_Code='02',tblproposals.S  ubActivity_Code  in('01','02','04','05','06','07','08','11','12'), iif(tblproposals.Activity_Code='01',tblproposals.S  ubActivity_Code  in('01','02','04','05','06','08'),iif(tblproposals  .Activity_Code='04',tblproposals.SubActivity_Code  in('03','07','08'),iif(tblproposals.Activity_Code=  '13',tblproposals.SubActivity_Code  in('03','05','08'),iif(tblproposals.Activity_Code=  '14',tblproposals.SubActivity_Code  in('02'),iif(tblproposals.Activity_Code='08',tblpr  oposals.Activity_Code  in('08'),iif(tblproposals.Activity_Code='05',tblpr  oposals.Activity_Code  in('05'),iif(tblproposals.Activity_Code='06',tblpr  oposals.Activity_Code  in('06'),iif(tblproposals.Activity_Code='07',tblpr  oposals.Activity_Code  in('07'),iif(tblproposals.Activity_Code='09',tblpr  oposals.Activity_Code  in('09'),iif(tblproposals.Activity_Code='12',tblpr  oposals.Activity_Code  in('12')))))))))))))</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>Prashant Pratap Kandari</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/876891-how-can-i-convert-query-into-sql-server-whereas-working-ms-access</guid>
		</item>
		<item>
			<title>Insert table values from other table</title>
			<link>http://bytes.com/topic/sql-server/answers/876887-insert-table-values-other-table</link>
			<pubDate>Thu, 12 Nov 2009 04:17:54 GMT</pubDate>
			<description>Hi Guys, 
 
Thanks in advance for your help. I unpivoted a table which I want to insert into another table. Below is my script. I got an error;...</description>
			<content:encoded><![CDATA[<div>Hi Guys,<br />
<br />
Thanks in advance for your help. I unpivoted a table which I want to insert into another table. Below is my script. I got an error; anyone can see where my error is.<br />
<br />
insert into MASTER_FINANCIALS (<br />
	[ISIN]<br />
	,[Ticker]<br />
	,[Company_Name]<br />
	,FINANCIAL_DESC<br />
	,FINANCIAL_VALUES<br />
	,KPI_CATEGORY<br />
	,DATE_PERIOD<br />
(<br />
SELECT <br />
	 [ISIN]<br />
	,[Ticker]<br />
	,[Company_Name]<br />
	,FINANCIAL_DESC<br />
	,FINANCIAL_VALUES<br />
	, 'KPI_MARGINS' AS KPI_CATEGORY<br />
	, 'Q42007' AS DATE_PERIOD<br />
	<br />
FROM<br />
(<br />
SELECT [Ticker]<br />
      ,[ISIN]<br />
      ,[Company_Name]<br />
      ,[Operating_Margin]<br />
      ,[EBITDA_Margin]<br />
      ,[Net_Profit_Margin]<br />
  FROM [CRDA_MASTER].[dbo].[Margins]<br />
  ) P<br />
  UNPIVOT<br />
	( FINANCIAL_VALUES FOR FINANCIAL_DESC IN<br />
	 ([Operating_Margin]<br />
      ,[EBITDA_Margin]<br />
      ,[Net_Profit_Margin]<br />
      ) <br />
      )AS UNPVT<br />
      ) FORECAST<br />
GO<br />
<br />
thanks agina!</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>JoeKid09</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/876887-insert-table-values-other-table</guid>
		</item>
		<item>
			<title>sql query</title>
			<link>http://bytes.com/topic/sql-server/answers/876815-sql-query</link>
			<pubDate>Tue, 10 Nov 2009 20:50:10 GMT</pubDate>
			<description>hi 
thanks for your reply  i was very helpful for me regarding this i have a problem which is this 
 
i m using this query it works  
SELECT    ...</description>
			<content:encoded><![CDATA[<div>hi<br />
thanks for your reply  i was very helpful for me regarding this i have a problem which is this<br />
<br />
i m using this query it works <br />
SELECT     AuthorId, UrlUserName, Urlid, UrlAddress, ChooseMedia, Title, Description, ChooseThumbnail, ChooseTopic, Datetime,<br />
                          (SELECT     COUNT(CommentId) AS Expr1<br />
                            FROM          CommentTable<br />
                            WHERE      (CommentUrlid = Submitnewtable.Urlid)) AS cnt, DATEDIFF(second, Datetime, GETDATE()) AS diff<br />
FROM         Submitnewtable<br />
WHERE     (Title LIKE '%.com%')<br />
BUT I WANT TO USE A TEXTBOX.TEXT OR STRINGVARIABLE IN THE PLACE OF '%.com%' FOR SEACHING purpose<br />
i also used FREETEXT funciton   for searching but it not working and give error which is fulltext index.My database table is not fulltext index enabled and i tried to enable fulltext index but i failed please guide me regarding above query<br />
<br />
<br />
thanks</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>gm000</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/876815-sql-query</guid>
		</item>
		<item>
			<title>Return all items in an order then add the shipping cost to only one item</title>
			<link>http://bytes.com/topic/sql-server/answers/876812-return-all-items-order-then-add-shipping-cost-only-one-item</link>
			<pubDate>Tue, 10 Nov 2009 19:27:20 GMT</pubDate>
			<description>So I am having a difficult time with some clients.  The database is set up like this 
 
Code: 
--------- 
tblOrder               tblOrder_Item_Bridge...</description>
			<content:encoded><![CDATA[<div>So I am having a difficult time with some clients.  The database is set up like this<br />
<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
tblOrder&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tblOrder_Item_Bridge&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tblItem</li>
<li class="codeLI">
internal_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item_id</li>
<li class="codeLI">
ship_cost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;internal_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item&nbsp;desc</li>
<li class="codeLI">
item_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cost&nbsp;&nbsp;</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quantity</li>

	</ol>
</div>
</div>
<!-- /CODE -->


Pretty simple<br />
<br />
Now the clients want something like this<br />
<br />
<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
internal_id&nbsp;&nbsp;item&nbsp;desc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quantity&nbsp;&nbsp;&nbsp;cost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ship_cost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li class="codeLI">
1643089&nbsp;&nbsp;&nbsp;&nbsp;EGRET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.75&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$13.15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li class="codeLI">
1643089&nbsp;&nbsp;&nbsp;&nbsp;EGSPSAE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$0.00&nbsp;</li>

	</ol>
</div>
</div>
<!-- /CODE -->


the problem is they want the first line to inluce the shipping cost and every line after that, the shipping cost is zero.  Andy ideas on how to do this?  here is the query that generates a report of every ordered item with the orders ship cost:<br />
<br />
<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
SELECT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tblOrder.internal_id,&nbsp;tblOrder.order_number,&nbsp;&nbsp;tblItem.quantity,&nbsp;tblOrder.ship_cost,&nbsp;</li>
<li class="codeLI">
FROM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tblOrder&nbsp;INNER&nbsp;JOIN</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;items&nbsp;ON&nbsp;tblOrder.internal_id&nbsp;=&nbsp;tblOrder_Item_Bridge&nbsp;.order_Id&nbsp;INNER&nbsp;JOIN</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item&nbsp;ON&nbsp;tblOrder_Item_Bridge.items_Id&nbsp;=&nbsp;tblItem.items_Id</li>
<li class="codeLI">&nbsp;</li>
<li class="codeLI">&nbsp;</li>

	</ol>
</div>
</div>
<!-- /CODE -->


That generates this:<br />
<br />
<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
internal_id&nbsp;&nbsp;item&nbsp;desc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quantity&nbsp;&nbsp;&nbsp;cost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ship_cost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li class="codeLI">
1643089&nbsp;&nbsp;&nbsp;&nbsp;EGRET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.75&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$13.15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li class="codeLI">
1643089&nbsp;&nbsp;&nbsp;&nbsp;EGSPSAE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$13.15</li>

	</ol>
</div>
</div>
<!-- /CODE -->


</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>cday119</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/876812-return-all-items-order-then-add-shipping-cost-only-one-item</guid>
		</item>
		<item>
			<title>Raise Error problem when connecting to SQL Server through ODBC</title>
			<link>http://bytes.com/topic/sql-server/answers/876764-raise-error-problem-when-connecting-sql-server-through-odbc</link>
			<pubDate>Tue, 10 Nov 2009 01:41:02 GMT</pubDate>
			<description>Hi, 
 
I have a VB.Net system that connect to SQL Server through ODBC. When I try to raiseerror from an IF...ELSE statement, it does not triggered...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I have a VB.Net system that connect to SQL Server through ODBC. When I try to raiseerror from an IF...ELSE statement, it does not triggered the exception handling.<br />
<br />
I have done some raise error testing at my side. Below is my finding:<br />
<br />
1. RaiseError did not triggered exception:<br />
<br />
<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE&nbsp;PROC&nbsp;xxx</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AS</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;1=1</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEGIN</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raiserror&nbsp;(70000,15,15)</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END</li>

	</ol>
</div>
</div>
<!-- /CODE -->


<br />
2. RaiseError triggered exception:<br />
<br />
<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE&nbsp;PROC&nbsp;xxx</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AS</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;1=1</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEGIN</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raiserror&nbsp;(70000,15,15)</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raiserror&nbsp;(70000,15,15)</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END</li>

	</ol>
</div>
</div>
<!-- /CODE -->


<!-- CODE -->
<div id="codeHolder" class="codeHolder" style="width: 500px;">
<div class="codeHeader">
	<span class="codeLink" onclick="Blur(this, this.parentNode.parentNode, getChildren(this),true);">Expand</span><span class="codeDivider">|</span><span class="codeLink" onclick="selectAll(this);">Select</span><span class="codeDivider">|</span><span class="codeLink" onclick="WordWrap(this);">Wrap</span><span class="codeDivider">|</span><span class="codeLink" onclick="LineNumbers(this);">Line Numbers</span>
</div>

<div class="codeContent" style="display: block; width: 500px; white-space: nowrap;">
	<ol START="1" highlight="true">

<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE&nbsp;PROC&nbsp;xxx</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AS</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEGIN</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raiserror&nbsp;(70000,15,15)</li>
<li class="codeLI">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END</li>

	</ol>
</div>
</div>
<!-- /CODE -->


<br />
Any idea why it does not work in IF...ELSE statement?<br />
<br />
Thank you.<br />
<br />
KC</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>kctan</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/876764-raise-error-problem-when-connecting-sql-server-through-odbc</guid>
		</item>
		<item>
			<title>UPDATE and SELECT Combination</title>
			<link>http://bytes.com/topic/sql-server/answers/876757-update-select-combination</link>
			<pubDate>Mon, 09 Nov 2009 23:00:17 GMT</pubDate>
			<description>I have two tables.  Table A is the main table I need to update and table B is the update table with the new data.  Table B contains only two fields-...</description>
			<content:encoded><![CDATA[<div>I have two tables.  Table A is the main table I need to update and table B is the update table with the new data.  Table B contains only two fields- fielda (also contained in table A for the linking but also is the field that needs changed) and a second field (fieldb) which is the NEW value of fielda that I need to change in TableA.  Thus I need a combination UPDATE/SELECT statement to link the two tables togeather to update table A with the new values (fieldb) from table B.  I need a start on how I can do this.  Thanks.</div>

]]></content:encoded>
			<category domain="http://bytes.com/topic/sql-server/answers/">answers</category>
			<dc:creator>rickcf</dc:creator>
			<guid isPermaLink="true">http://bytes.com/topic/sql-server/answers/876757-update-select-combination</guid>
		</item>
	</channel>
</rss>
