Viewing 15 posts - 58,321 through 58,335 (of 59,048 total)
Here's an example...
CREATE TABLE #yourtable (Time DATETIME,VALUE INT)
INSERT INTO #yourtable(Time,Value) VALUES('10:15:00',1)
INSERT INTO #yourtable(Time,Value) VALUES('10:15:10',0)
INSERT INTO #yourtable(Time,Value) VALUES('10:15:20',1)
INSERT INTO #yourtable(Time,Value) VALUES('10:15:30',0)
INSERT INTO #yourtable(Time,Value) VALUES('10:15:40',1)
INSERT INTO #yourtable(Time,Value) VALUES('10:15:50',0)
March 23, 2006 at 6:00 pm
Actually, you can... well, sort of... make a call to xp_CmdShell and run a VB Script to ask the question and then pass it to a stored procedure.
It's a lot...
March 23, 2006 at 5:32 pm
I've had great luch with Redgate's SQL Compare...
March 22, 2006 at 9:30 pm
Amit,
That might be what you consider to be a temporary table but it's not a "Temp" table like what the user was requesting. Temp tables live in TempDB and the first...
March 21, 2006 at 7:21 pm
Not a problem... wasn't sure that's what you wanted but glad to help...
March 21, 2006 at 6:50 pm
This could be easily modified to fit your needs... It's an old example and I've not made many changes to it.
I used temp tables to keep from cluttering up my...
March 19, 2006 at 6:34 pm
DOH! I didn't even look at the code... ![]()
March 19, 2006 at 6:15 pm
Basically, your saying you want to subtract 5 hours from anygiven datetime... this'll do just that...
SELECT DATEADD(hh,-5,somedatetime)
March 18, 2006 at 7:45 pm
You can call functions from within functions provided they are "determinate"... it is, in my humble opinion, kind of a bad thing to make one function dependent on another.
So far as...
March 18, 2006 at 7:39 pm
March 14, 2006 at 7:14 pm
Very nice...
March 14, 2006 at 7:06 pm
That's cool...
You can also use NEWID() as the seed for Rand... in the algo below, "RANGE" is how many numbers you want in the range of random numbers and "OFFSET"...
March 13, 2006 at 5:11 pm
Here's a self standing sample that you may run with impunity...
This turned out to be a bit long winded because an ORDER BY in an UPDATE in the presence of...
March 13, 2006 at 2:13 am
FROM #YourTable y,
dbo.Tally t
Ok... now I'm confused
That is a Tally table in your code, isn't it?
Althought the Jury is still out...
March 10, 2006 at 9:06 pm
Thanks for the great feedback, Kenneth. Yep... I know the double barreled last names need some help but James insists that they will all be hyphenated... I sure hope he's...
March 9, 2006 at 8:05 pm
Viewing 15 posts - 58,321 through 58,335 (of 59,048 total)