Viewing 15 posts - 58,936 through 58,950 (of 59,075 total)
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
Ilan,
You can use Case on the right side of the "=" sign in SET statments... something like this (could understand exactly what you were trying to do in your example...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 22, 2004 at 4:07 pm
Have you tried using the "Index Tuning Wizard" in Query Ananlyzer? It does do some remarkable things if you let it. And you would be surprised how much a single...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 22, 2004 at 3:57 pm
Ilan,
Open "Books on Line" (comes free with SQL Server) and look up the BCP Utility. It has examples...
It may help you to know that BCP.EXE runs from the "DOS" or...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 22, 2004 at 3:49 pm
Viewing 15 posts - 58,936 through 58,950 (of 59,075 total)