Viewing 15 posts - 58,921 through 58,935 (of 59,063 total)
Ben and Adam,
I ran into a problem with Adam's script returning all records instead of just the overlap records. I don't know if I did something wrong in changing the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2004 at 1:36 pm
Rather than messing around with dates and times, why not just add the three hours to the Pacific Time date (see DATEADD in code below)?
Also, you may have missed some...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 13, 2004 at 6:14 pm
Since you've explicity created the target table, you should not be using "SELECT/INTO"... use INSERT INTO/SELECT instead.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 13, 2004 at 6:00 pm
Your code is correct... my next step would be a SELECT COUNT(*) on the B table to make sure that I only had one row because it sounds like you...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2004 at 6:55 am
You forgot to post the error...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2004 at 6:49 am
CHAR(13) "Carriage Return" and possibly follow with CHAR(10) "Line Feed"
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2004 at 6:47 am
The datafile type would certainly not be "Native" if you are trying to input CSV.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 4, 2004 at 11:10 pm
Recompiles can be caused by having DDL like table creation or Select/Into buried between normal DML code. Define all tables and temp tables at the beginning of your code to...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 4, 2004 at 11:05 pm
Here's how I do it... runs nasty fast too.
------ Finds the date without the time (Time=00:00:00.000)
SELECT DATEADD(dd,0,DATEDIFF(dd,0,GETDATE()))
AS DateOnly
--Jeff Moden
Change is inevitable... Change for the better is not.
October 4, 2004 at 11:00 pm
>We'd like to be able to recreate their environment if needed.
See "Backups"?
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2004 at 11:48 pm
I guess "Books on Line" is out of the question for you...
If you want a "live" example, perhaps you'd be kind enough to provide some live data and a description...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 22, 2004 at 9:37 pm
Ilan,
Not trying to be difficult here but I guess I don't understand the problem... please describe what you are trying to do instead of trying to write code for it... ...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 22, 2004 at 9:32 pm
The following example is straight out of "Books On Line"... modify it to handle your 5 nullable input parameters...
The parameter...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 22, 2004 at 4:50 pm
Sometimes, you have to add to subtract...
WHERE DateOrder >= DATEADD(mm,-6,GETDATE())
Notice that we added a NEGATIVE six months to the current date. Will also handle jumps across years, centuries, leap years,...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 22, 2004 at 4:39 pm
My suggestions in "bold" typeface...
Step One:
DECLARE A VARIABLE AS AN "INT"
SELECT THE MAX ID FROM THE SOURCE TABLE INTO THE VARIABLE
BEGIN...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 22, 2004 at 4:29 pm
Viewing 15 posts - 58,921 through 58,935 (of 59,063 total)