Viewing 15 posts - 601 through 615 (of 1,156 total)
I think he chose to make it an udf, so he could reuse the logic.
February 20, 2008 at 10:52 am
Yeah. Technically he could use xml to dynamically parse his string and directly relate it to his table.
DECLARE @x XML
SET @x = '<i>' + REPLACE( @filter, '|', '</i><i>') + '</i>'
SELECT...
February 20, 2008 at 10:48 am
I would also like to point out this method can get really messy in a text file, especially with a lot of columns. I would recommend you put the...
February 20, 2008 at 10:36 am
No problem. Glad I could help.
February 20, 2008 at 10:23 am
Also make sure you query results option is set to tab delimited. It makes the results much easier to read.
February 20, 2008 at 10:22 am
For best results you should use Excel or another storage medium like Word, as Kenneth stated. But this can be done by doing the following. What you can...
February 20, 2008 at 10:21 am
When you create your stored procedure you have to use the following SET options:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
You have to alter your stored procedure or drop and recreate it. ...
February 20, 2008 at 10:06 am
Good deal. I am glad everthing worked out and thanks for the feedback.
February 20, 2008 at 8:15 am
Can you display the entire error message?
February 20, 2008 at 8:04 am
SELECT x.i.value('.', 'VARCHAR(7)') as ID
to
SELECT x.i.value('.', 'int') as ID
if your IDs are indeed ints and not text.
Yes, I created this generically without knowing your data. You should...
February 20, 2008 at 7:24 am
I am new to this XML query stuff so please forgive the question. I have tried to get your function to complile, but I keep getting errors about an alias...
February 20, 2008 at 7:20 am
The first thing we are doing is adding tags to all the values in the delimited string. E.g.
declare @filter varchar(25)
set @filter = 'test|test2'
DECLARE @x XML
SET @x = '<i>' +...
February 20, 2008 at 7:07 am
Well your options are to parse the string directly to an inner join or to create a udf that returns a table, that you will inner join.
DECLARE @x XML
SET @x...
February 20, 2008 at 5:53 am
I agree with Jack. The variables should be handled through the app. Additionally, in the try catch you are declaring a transaction; however, none of the code in...
February 19, 2008 at 2:38 pm
For the EXCEPT keyword, I personally prefer to see ANSI join syntax in place of EXCEPT/INTERSECT. I think these 2 new keywords are more fitting for comparing multi-column result sets...
February 19, 2008 at 11:57 am
Viewing 15 posts - 601 through 615 (of 1,156 total)