Viewing 15 posts - 58,336 through 58,350 (of 59,067 total)
| I still don't understand what test the clause -- substring(ResourceEnterpriseRMV21ID,1,1) > 0 -- is really doing?????? |
If...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 27, 2006 at 7:59 pm
Thanks Ryan... Yep... I should'a said "too" ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
March 27, 2006 at 7:30 pm
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...
--Jeff Moden Change is inevitable... Change for the better is not.
RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
Helpful Links:
How to post code problems
How to Post Performance Problems
Create a Tally Function (fnTally)
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
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)
--Jeff Moden Change is inevitable... Change for the better is not.
RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
Helpful Links:
How to post code problems
How to Post Performance Problems
Create a Tally Function (fnTally)
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 23, 2006 at 5:32 pm
I've had great luch with Redgate's SQL Compare...
--Jeff Moden
Change is inevitable... Change for the better is not.
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 21, 2006 at 7:21 pm
Not a problem... wasn't sure that's what you wanted but glad to help...
--Jeff Moden
Change is inevitable... Change for the better is not.
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 19, 2006 at 6:34 pm
DOH! I didn't even look at the code... ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
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)
--Jeff Moden
Change is inevitable... Change for the better is not.
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 18, 2006 at 7:39 pm
http://forums.belution.com/en/sql/000/110/02.shtml
--Jeff Moden
Change is inevitable... Change for the better is not.
March 14, 2006 at 7:14 pm
Very nice...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 14, 2006 at 7:06 pm
Viewing 15 posts - 58,336 through 58,350 (of 59,067 total)