Viewing 15 posts - 4,741 through 4,755 (of 5,502 total)
to load the content of an xml file you could use
DECLARE @xml xml
SET @xml = (SELECT * FROM OPENROWSET(
BULK 'C:\temp\file.xml',
SINGLE_BLOB) AS x)
SELECT @xml
For details...
November 19, 2009 at 11:32 am
If we can ask for anything that new query tool should be able to handle, why not request two functions that would really help:
1) refuse (or at least request special...
November 19, 2009 at 8:45 am
Glad I could help, Jay!!
I'd like to thank you to follow my "hint" on calendar tables and to come up with that nice solution (instead of asking: "How do I...
November 19, 2009 at 2:34 am
What have you tried so far and where you got stuck?
Did you try to left outer join on ItemNumber, ItemLocation and AuditDateTime (maybe even AuditUser) and t1.AuditSequence = t2.AuditSequence -1...
November 18, 2009 at 4:51 pm
SELECT DATEDIFF(year,'2009-12-31 23:59:59.997', '2010-01-01 00:00:00.000')
basically means
SELECT DATEPART(YEAR,2nd value) - DATEPART(YEAR,1st value) -- which is 2010 - 2009 = 1
If you'd like to get difference displayed as "years", but...
November 18, 2009 at 4:03 pm
SQL Noob (11/18/2009)
November 18, 2009 at 1:55 pm
If you'd normalize your table structure it would become easy:
Take your test table, add a primary key and unique constraints on col1 and col2.
This will give you unique combination.
To reference...
November 17, 2009 at 5:29 pm
I'm not sure if you do have a calendar table yet. If not, you really should think about using one. (search for "calendar table" on this site for details).
To show...
November 17, 2009 at 5:09 pm
There are two issues:
#1 get rid of the 'GO' command within your dynamic sql and
#2 use exec(@sql) instead of plain exec @sql (sometimes parenthises matter...)
November 17, 2009 at 7:41 am
Somewhere you have a typo...
What you have:
set langauge english
vs. what you should have:
set language english
langauge is no reserved word. 😉
November 17, 2009 at 5:30 am
Would it be possible for you to show us the execution plan for the modified query (including the creation of the temp table)?
November 16, 2009 at 1:27 pm
Florian Reischl (11/16/2009)
Be careful with joining table valued functions. Especially if the string split function works with schema table like spt_values or a Numbers/Tally table.
Just had some...
November 16, 2009 at 1:15 pm
To be a little more specific:
to find the max sname is like searching for the largest ASCII value of the first position of sname, continues moving to the right for...
November 16, 2009 at 1:12 pm
Slightly off topic:
would you mind stop qualifying your requests as "very urgent" or "urgent"? (Seems like it became a habit...)
If you ar requested to migrate a db from SS2K to...
November 16, 2009 at 12:55 pm
Viewing 15 posts - 4,741 through 4,755 (of 5,502 total)