Viewing 11 posts - 1 through 11 (of 11 total)
If you run SET SHOWPLAN_TEXT ON before your query, you'll get a bunch of hideous text that I believe is the equivalent of the hideous graphical output of Query Analyzer...
January 9, 2006 at 4:38 pm
If you want something a little more low-tech, there's good old osql at the command line. You can pass it a query and specify delimiters, etc. Use the -w switch...
February 5, 2005 at 12:05 pm
Or, try this. I would guess performance will be the same, but it's less typing.
select top 1 2003 from adm.activitylog
where start_date >= '2003-01-01' and start_date < '2004-01-01'
union all
select top...
February 3, 2005 at 1:11 pm
This is a case where brute force is your friend:
select Year
from (select 2003 as Year,
cast('2003-01-01' as smalldatetime) as StartYear,
cast('2004-01-01' as smalldatetime) as EndYear
union all
select 2004 as Year,
cast('2004-01-01' as smalldatetime),
cast('2005-01-01' as...
February 3, 2005 at 12:33 pm
I don't know if this might help, but make sure you're setting your batch size to... something. How this is done varies by whether you're using bcp or DTS or...
September 10, 2004 at 12:57 pm
select strBusinessFunction,
SUM(CASE WHEN strCondItionStatus ='A'and strTestPlan = @TestPlan THEN 1 ELSE 0 END)AS 'A',
SUM(CASE WHEN strCondItionStatus ='U'and strTestPlan = @TestPlan THEN 1 ELSE 0 END)AS 'U',
SUM(CASE WHEN...
July 20, 2004 at 2:04 pm
create table #Source_Table (ITEM char(1), SOURCE char(2) )
insert into #Source_Table
select 'a', 'aa' union all
select 'a', 'bb' union all
select 'b', 'cc' union all
select 'b', 'dd' union all
select 'b', 'ee'
select ...
July 20, 2004 at 1:46 pm
>>You can do it via vbscript...<<
Keep in mind, though, that if you have a named instance, or multiple instances, or a clustered server, that the name of the NT Server...
December 31, 2003 at 2:15 pm
select cast(cast(cast(cast(getdate() as binary(8)) as binary(4)) as binary(8)) as datetime)
"getdate()" used as an example of a date.
Cast it to binary(8). Cast that to binary(4) -- that lops off the right...
December 30, 2003 at 2:35 pm
convert(char(2), getdate(), 3)
less typing
Chris Hofland
December 9, 2003 at 11:12 am
I'm too lazy to check BOL, but off the top of my head, I believe the rule is that when SQL Server compares two strings (char/varchar) the shorter of the...
March 7, 2003 at 6:00 pm
Viewing 11 posts - 1 through 11 (of 11 total)