Viewing 15 posts - 406 through 420 (of 1,217 total)
Yes, table structure and sample data would be nice... also, please specify what to do with records longer than 1 hour - should they be split into as many 30-minute records as...
March 20, 2007 at 1:50 am
You're right, thanks for the warning. This code only works with @mydate newer than the date used in the select. I copied it from a piece code meant for dates >...
March 19, 2007 at 10:06 am
No need to check dateformat if you use one of these:
DECLARE @mydate datetime
SET @mydate='20070209'
SELECT DATEADD(day, (DATEDIFF (day, '19990101', @mydate) / 7) * 7, '19990101') as friday_including_mydate
SELECT DATEADD(day, (DATEDIFF (day, '19990102',...
March 19, 2007 at 9:19 am
I'd suggest not to use the same alias twice in a query, Lynn. You are using "s" for both Table1 and the derived table. Not only it is easy to make...
March 19, 2007 at 3:21 am
I'm not sure I understand correctly... Please tell me if this is it:
There are 6 listboxes, all of them contain the same values (the same list of products). After the user sets...
March 15, 2007 at 2:20 am
If the insert is too slow, check that both tables are indexed properly and that indexes are not fragmented (see DBCC INDEXDEFRAG and DBCC DBREINDEX if you don't know what...
March 12, 2007 at 1:48 am
In case you need several rows to be returned (example : list of products with column "colour", showing all available colours for each respective product in form 'red, white, blue'), you...
March 9, 2007 at 1:07 am
You're welcome! For me it is mainly practice (reading BOL included here), reading the articles and posts here on SQL Server Central to get new ideas and find out which seemingly...
March 8, 2007 at 9:17 am
Another way how to do the same: build the query step by step, from "inside" - first get distinct reports only ("Reports"), then count the number of reports for each player...
March 8, 2007 at 1:10 am
The text has been made a bit confusing by the red/blue coloring... so just to make sure nobody misunderstands that : not table variables, but transactions (involving these table variables) last...
March 7, 2007 at 5:48 am
Try to test just these two statements you posted, on a large table, if there is any difference. My guess is that the difference will be minimal and not worth considering...
March 7, 2007 at 5:34 am
I've been away for a week and couldn't reply... I don't know WHY the conversion takes so long, but SQL Server is doing conversion internally when you compare two values that...
March 7, 2007 at 3:19 am
Yes, that's it... just with HAVING SUM([Sale Amount])<>0, because you want to see all not equal to zero, not only those bigger than zero.
There could be a question how...
February 27, 2007 at 12:57 am
Well, that's your opinion, Boudjakdji.
Thanks for sharing it, but I don't agree with you. NULL is part of the SQL, and while one should always consider, whether allowing nulls in certain...
February 26, 2007 at 3:11 am
Viewing 15 posts - 406 through 420 (of 1,217 total)