Viewing 15 posts - 58,336 through 58,350 (of 59,066 total)
Very interesting problem... thought I'd try the "exercise" a wee bit differently...
This one uses a "Tally" table... If you don't already have one, this is one way to make one...
March 25, 2006 at 9:57 pm
Jeff,
If you are talking about importing with BCP, you can tell it to skip the first row by setting the first row (-F) parameter to 2.
If you are talking about...
March 25, 2006 at 8:43 pm
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
Viewing 15 posts - 58,336 through 58,350 (of 59,066 total)