Viewing 15 posts - 1,351 through 1,365 (of 2,171 total)
CREATE TABLE #LoginTrack (RowID INT IDENTITY(1, 1) PRIMARY KEY, LoginDateTime DATETIME)
INSERT #LoginTrack
(
LoginDateTime
)
SELECT ...
August 29, 2007 at 2:12 am
Never ever name your stored procedures with sp_ !!!
CREATE
PROCEDURE dbo.uspDateRangeCounts
(
@StartDate DATETIME,
@EndDate DATETIME
August 28, 2007 at 1:46 pm
That's why you always need to PRINT the statement when using dynamic sql.
Then you will see what is wrong.
August 28, 2007 at 11:49 am
Then use this
SELECT t2.*
FROM @table1 AS t1
INNER
August 28, 2007 at 11:48 am
SELECT
[Part Number],
SUM(CASE WHEN Product = 'BOM1'
August 28, 2007 at 11:31 am
What if there are ID's with values of -1 or -2?
OP hasn't told us.
August 28, 2007 at 10:52 am
Keep it simple!
SELECT
t2.*
FROM @table1 AS t1
INNER
August 28, 2007 at 10:44 am
Show us the code, and we might help you rewrite it SET-based.
August 28, 2007 at 10:28 am
-- Prepare sample data
DECLARE
@LoginTrack TABLE (LoginDateTime DATETIME)
INSERT
@LoginTrack (
August 28, 2007 at 10:27 am
August 28, 2007 at 10:18 am
DECLARE
@MyTable TABLE ([Service] VARCHAR(30), PatientNo INT, StartDate...
August 28, 2007 at 5:35 am
Keep it simple. Why use 114 (with milliseconds when source data is not?
SELECT CONVERT(VARCHAR, @Sec, 108)
August 27, 2007 at 2:55 am
Have you tried writing BETWEEN instead of IS IN? And replacing the comma with "AND"?
left join forcastTable AS t2 on t1.date between t2.date - 7 AND t2.date
August 26, 2007 at 2:56 pm
Viewing 15 posts - 1,351 through 1,365 (of 2,171 total)