Viewing 15 posts - 5,176 through 5,190 (of 6,036 total)
select col1, count(CASE col2=1 THEN 1 ELSE NULL END)/count(col2) as rate, count(A) as total
from Test
group by col1,col2
August 9, 2006 at 4:58 am
Just to begin:
SUBSTRING( P.CUST_BANK_ID , 1 , 3) = CM.CITY_CODE
causes full table scan. Follow normalization rules and don't store rubbish in tables.
AND CUST_BANK_ID IS NOT NULL AND RTRIM(CUST_BANK_ID) !=...
August 9, 2006 at 2:44 am
No, I mean tables, not only table variables.
August 8, 2006 at 5:07 pm
Joe, just in case you did not hear about it,
the name for array in SQL is "table".
You don't need to create arrays, they are already there. Just use...
August 8, 2006 at 3:44 pm
Create new table and set up trigger to transfer inserted/data from old table to new one. Do select from new table.
If you store rubbish, you'll get rubbish back. No other...
August 8, 2006 at 2:18 pm
Why?
One table with list of servers, databases, SP names and probably list of parameters will do it all.
Cursor through this table, build the query from names stored there and EXEC...
August 8, 2006 at 5:44 am
EXEC RemoteServer.Database.dbo.StoredProcedure @Parameter1, @parameter2
August 8, 2006 at 5:21 am
You must catch an error in the very next statement after attemting insert.
August 8, 2006 at 5:19 am
What stops you from answering your own question?
Why not just try?
Believe me, there is no bomb inside, it will not blow if you cut the wrong wire.
August 8, 2006 at 3:33 am
case when MIN(Type) = MAX(Type) then MIN(Type) else Min(type) + '/' + MAX(Type) end
August 7, 2006 at 11:35 pm
Create scalar UDF taking varchar value as an argument and returning integer value.
Then update your table once using this function.
Don't be afraid to use loop inside of this UDF. Even...
August 7, 2006 at 11:23 pm
August 7, 2006 at 11:07 pm
Viewing 15 posts - 5,176 through 5,190 (of 6,036 total)