Viewing 15 posts - 1 through 15 (of 1,553 total)
I merely think that it produces the expected result according to the OP's presented scenario. 😉
However, should there be that his data actually *could* contain rows that had any of...
November 19, 2012 at 8:33 am
Just noticed the thread is a bit dated, but it seemed there was no real answer...
Why make it so complicated?
As per OP's request he just wants single chars 1 through...
November 19, 2012 at 6:52 am
Your formatfile specifies \r as rowterminator for the last column.
Make sure that the datafile and formatfile uses the same terminator.
You could try to change the formatfile to "\ n" ...
February 3, 2011 at 7:05 am
Shyrill...
This thread is more than three years old, so I'd think it would be better if you presented your problem in a new thread.
When you do, please also provide some...
October 26, 2009 at 3:00 am
Another variation:
Select sum(case C.IT_Code when 'SRIP' then 1 else 0 end) as SRIP,
sum(case C.IT_Code when 'TA' then 1 else 0 end) as TA
FROM...
July 22, 2009 at 6:37 am
The last three requirements,
if date1 is null and date2 are null return null.
if date1 is null but date2 is present return date2
if date1 is present but date2 is null return...
July 22, 2009 at 5:05 am
RBarryYoung (12/29/2008)
No, RAID 1 has twice the Read IO throughput of a single disk.
How can that be, Barry?
RAID 1 can only have two drives, and one is dedicated to...
December 30, 2008 at 4:43 am
If you change the connections default batch separator token from it's default 'GO' to something else, then (without ending semicolon)...
GO
.. will indeed work.
/Kenneth
December 30, 2008 at 2:38 am
You could also save the selects in a scriptfile, make a simple (dos) batchfile and use sqlcmd with the script as input and >> to an outputfile.
It doesn't need to...
December 30, 2008 at 2:12 am
syslogins is still in 2005 (for backward compat reasons)
Do a sp_helptext syslogins and you can see what it uses in 2005.
There's a whole bunch of sys.* catalogviews available with different...
December 30, 2008 at 1:57 am
Had to make a small modification to actually get the different results instead of always the results from the current db.
sp_msforeachdb 'use ? dbcc showfilestats'
GO
sp_msforeachdb 'use ? exec sp_spaceused'
GO
sp_databases
GO
/Kenneth
December 30, 2008 at 1:05 am
Well, as you know, this is the thing when using systemtables.
They often change between versions.
I think your best bet would be to just write a 2005-version of your query, stick...
December 30, 2008 at 12:45 am
Well, the correct answer is 'It depends' 😉
(happy Holidays to all)
/Kenneth
December 30, 2008 at 12:37 am
And here's the information_schema 'optional non-cte version'
select t.table_name,
( select stuff(
( select ','...
December 29, 2008 at 9:00 am
Here's the op's original question:
Here is a code that is returning a list of all the user tables with their fields list.
My question is can we re-write this code without...
December 29, 2008 at 8:54 am
Viewing 15 posts - 1 through 15 (of 1,553 total)