Viewing 15 posts - 136 through 150 (of 327 total)
Update YourTable
Set YourDate = DateAdd(D, 1, YourDate)
May 26, 2005 at 10:30 am
Select min(ID) as ID, PathwayID
From YourTable
Group By PathwayId
Order By ID
May 26, 2005 at 10:03 am
As Remi has hinted, his solution will allow the use of an index that may exist on trans_date. Using a function on the column such as MONTH(trans_date) will not...
May 26, 2005 at 8:03 am
In the Query Analyzer you can execute sp_who or sp_who2
You can also check out this thread:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=169&messageid=184838
May 25, 2005 at 5:13 pm
Using the DATEPART function will not allow the optimizer to use the index on the reortsentdate column so your statement will force a table scan.
For more info on how to...
May 25, 2005 at 12:38 pm
That's what Remi gave you (and a little more).
Declare @StartD as datetime
declare @EndD as datetime
declare @Year as int
set @Year = 2004
set @StartD = dateadd(YYYY, @Year - 1900, 0)
set @EndD...
May 25, 2005 at 12:07 pm
Or you could do this:
INSERT INTO dbo.[Receiving Inspection Header] ([Receiving Log No], [Lot No], [Part Id]) VALUES (@Receiving, @LotNo, ISNULL( @PartId,1) )
May 25, 2005 at 8:57 am
Select @PartId = ISNULL(Max([Part ID]),0) + 1 from [Receiving Inspection Header] where [Receiving Log No] = @Receiving And [Lot No] = @LotNo
May 25, 2005 at 8:52 am
As Frank mentioned your front end is most likely passing in some default value so just explicitly set the date to NULL when the user has not entered a...
May 25, 2005 at 8:12 am
"...WRenteredDate BETWEEN '2005-04-03 00:00:00' AND '2005-05-20 00:00:00'..."
Plesase note that BETWEEN is inclusive so unless you really intend to include rows with a date of...
May 25, 2005 at 8:03 am
Please see my answer in this thread http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=23&messageid=183974 which is a duplicate.
May 24, 2005 at 9:43 am
Point well taken. But what does that mean when it comes to using stored procedures? Do we not use them?
May 24, 2005 at 7:56 am
By default any comparison to null using =, <> etc. will always compare as false. When comparing to null try to use IS NULL or IS NOT NULL.
For...
May 23, 2005 at 8:46 pm
Merge Join is a Join HINT not a join type.
From books online:
This example performs a three-table join among the authors, titleauthors,
and titles...
May 23, 2005 at 6:35 pm
From Books online (From Clause):
< join_type >
Specifies the type of join operation.
May 23, 2005 at 3:06 pm
Viewing 15 posts - 136 through 150 (of 327 total)