Viewing 15 posts - 511 through 525 (of 1,082 total)
You could also just call your procedure and insert it into a table variable or temp table from your main procedure, that way you don't have to create the functions....
December 1, 2008 at 6:08 am
of the 16 values in your numeric number 9 are keep for the right hand side of the decimal, meaning that only 7 digits can be used on the right...
November 28, 2008 at 4:54 am
good point.
Just case someone wants to Use CHECKIDENT.
Other method of doing it is to
DBCC CHECKIDENT(mytable,reseed,0)
--seed it to 0 first
DBCC CHECKIDENT(mytable,reseed)
--This will automatically reseed to the next correct seed value.
Using...
November 26, 2008 at 10:21 am
Ok the first thing to remember is that they both perform different functions
Lets start with ISNULL statement
WHERE ISNULL(Col1,'') = 'NOCHANGE'
The reason you use is null is so that you don't...
November 26, 2008 at 5:15 am
will this work for you?
DECLARE @visit TABLE
(VisitID INT PRIMARY KEY,
StudentID INT,
visitDate DATETIME,
score INT)
INSERT INTO @visit(VisitID, StudentID,visitDate,score)
SELECT 1 , ...
November 26, 2008 at 5:08 am
I would suggest using a tally table rather than a loop 🙂
November 26, 2008 at 4:50 am
basically if OP2.Contract_Line_Number != 'NOCHANGE'
Then you will get results
November 26, 2008 at 4:48 am
Is that the solution you using or the problem you having?
We still don't understand why you feel the need to test GETDATE vs GETDATE cause the answer is ALWAYS the...
November 26, 2008 at 4:04 am
Or is the situation something like this
DECLARE @TABLE TABLE
(Number INT,
Date1 DATETIME,
Date2 DATETIME)
INSERT INTO @TABLE
SELECT 21,GETDATE(),GETDATE() UNION ALL
SELECT 21,GETDATE(),DATEADD(dd,2,GETDATE())
SELECT Number/CASE WHEN (datediff(dd,Date1,Date2)) = 0 THEN 1 ELSE (datediff(dd,Date1,Date2)) END
FROM...
November 26, 2008 at 3:57 am
Is this a real life example.
Cause if you always doing a date diff with GETDATE vs GETDATE then why don't you just do this.
SELECT 21
I think something is missing here.
Do...
November 26, 2008 at 3:53 am
I agree with all that steve has said,
I'd just like to add that I see a INDEX hint?
It's not often that the optimizer is wrong, so make sure the hint...
November 25, 2008 at 10:09 am
thanks for that I didn't know that.
I'm actually using a real table but my join is using a variable.
So there is Predicate his using a scalar operator.
Will this result in...
November 21, 2008 at 10:22 am
I'm not sure what you mean...
What should the actual results be?
November 20, 2008 at 10:29 am
You can't use ROW_NUMBER() in SQL 2000 or SQL 7 you need to use another approach.
Try my solution or try reading lynn's post about running totals!
Thanks
Chris
November 20, 2008 at 10:21 am
HI all,
This is a double post.
arluna as Jeff and some others mentioned in your other post.
This shouldn't be a problem, and it's best to make sure your column is indexed.
Thanks
Chris
November 20, 2008 at 10:01 am
Viewing 15 posts - 511 through 525 (of 1,082 total)