Viewing 15 posts - 211 through 225 (of 304 total)
Jeff Moden (10/27/2008)
Thanks for the "cover". 🙂
My pleasure, Jeff. I'm so glad for a chance to give back (and that Seth didn't grab it first 😉 )
October 27, 2008 at 5:58 pm
Jeff's script has a bug when the counter is equal to 10 and the next value is between 10 and 15.
Try this one. It should work for you:
UPDATE #Counter2
...
October 27, 2008 at 3:51 pm
Thanks for posting the DDL.
Can you please post some sample data as well?
October 27, 2008 at 11:38 am
jcrawf02 (10/27/2008)
You should be able to find one here if there is one, or start work on hosting one if you would like to. Excellent concept, I'm still trying...
October 27, 2008 at 8:39 am
Jack Corbett (10/26/2008)
Fraggle (10/26/2008)
However, to my knowledge, SQL Saturday are Florida only.
Actually SQLSaturday is NOT a Florida only thing. There have been SQLSaturday's in Washington state, Alabama,...
October 27, 2008 at 8:20 am
swarooppavi (10/24/2008)
If I pass week number, i need to get that weeks Monday date and Sunday date
Not sure if this helps, but here's some code that accepts a date and...
October 27, 2008 at 8:08 am
tinku.reddy (10/23/2008)
i was trying to update using while loop
Here is my code ....
declare @y char(3)
declare @count int
set @y = 'no'
set @count = 1
select...
October 26, 2008 at 9:31 pm
Jeff Moden (10/26/2008)
Guess I'm being a bit thick... I just don't see the correlation... sorry.
Glad to know I'm not the only one who's not understanding this post. 🙂
Paul, you need...
October 26, 2008 at 8:54 pm
nailosuper (10/24/2008)
I have a table which has some null values in "name" and "surname" columns. I use a function ti uppercase the first letter. But as i...
October 26, 2008 at 8:48 pm
Jeff Moden (10/24/2008)
October 24, 2008 at 8:49 am
Jeff Moden (10/24/2008)
ggraber (10/24/2008)
P.S. You may want to read Jeff's cool article on Running Totals which explains how this approach works http://www.sqlservercentral.com/articles/Advanced+Querying/61716/
Heh... that's where I was going with this... I...
October 24, 2008 at 8:29 am
You just need to add one criteria to the CASE statement. Like this:
[font="Courier New"]
UPDATE #Counter2
SET @Counter = Counter = CASE WHEN (@Counter >= 1 AND @Counter < 10) OR ([Value]...
October 24, 2008 at 8:28 am
P.S. You may want to read Jeff's cool article on Running Totals which explains how this approach works http://www.sqlservercentral.com/articles/Advanced+Querying/61716/
October 24, 2008 at 6:45 am
This should work for you:
[font="Courier New"]
-- create a table to store our results
-- create a dummy unique identifier on the table
CREATE TABLE #Counter2
(
RowNumber INT IDENTITY(1,1)
,StartDate DATETIME
,[Value] FLOAT
...
October 24, 2008 at 6:42 am
Viewing 15 posts - 211 through 225 (of 304 total)