Viewing 15 posts - 1,081 through 1,095 (of 3,221 total)
cengland0 (7/27/2011)
Ninja's_RGR'us (7/27/2011)
My apologies if I don't like super easy question ;-).
There's a difference between a hard question and a tricky one that is attempting to have as many people...
July 27, 2011 at 7:42 am
Without knowing the actual values for your StartDate and EndDate, the following works:
DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
SET @StartDate = '2011-07-26 11:50:33.420' --arbitrary value
SET @EndDATE = '2011-07-26 21:50:33.420' -- arbitrary...
July 26, 2011 at 7:59 pm
Look at the ISNULL function ...
http://msdn.microsoft.com/en-us/library/ms184325.aspx
By the way many who might have answered your question with a tested procedure are hesitant to open attachments not knowing if there may...
July 26, 2011 at 7:37 pm
Craig Farrell (7/25/2011)
bitbucket-25253 (7/25/2011)
July 25, 2011 at 7:16 pm
Tom.Thomson (7/25/2011)
Ninja's_RGR'us (7/25/2011)
It's a little weird ±5 days after the fact and I still don't see the new wording as a...
July 25, 2011 at 6:40 pm
Go here and calculate the probability of it happening
July 24, 2011 at 2:55 pm
From Books On Line - emphasis added
nchar [ ( n ) ]
Fixed-length Unicode character data of n characters. n must be a value from 1 through 4,000. The storage...
July 24, 2011 at 6:43 am
You may want to use the MERGE statement, for example:
CREATE TABLE TBLANIMAL(animal vaINSERT INTO TBLANIMAL
SELECT 'Horse',0,'Giddyup' UNION ALL
SELECT 'Elephant',1,'Bigone' UNION ALL
SELECT 'Horse',0,'Giddyup' UNION ALL
SELECT 'Elephant',1,'Bigone' UNION ALL
SELECT 'Goat',0,'no...
July 23, 2011 at 1:29 pm
Is this the result you are looking for:
;WITH cte
AS (SELECT Row_Number() OVER(PARTITION BY Sys_Item_Num ORDER BY Trans_date DESC) as rn,
Sys_SR_Num, Sys_Item_Type_Num, Sys_Item_Num, Trans_date, Rcpt_Qty, Sply_Date, Sply_Qty, Open_blnce,
Trans_Blnce_Qty, Trans_Open_Blnce FROM...
July 23, 2011 at 11:39 am
Is this what you are looking for?:
CREATE table #Products(item1 INT,item2 INT,total INT)
INSERT INTO #Products
SELECT 1135 , 1190 , 5 UNION ALL
SELECT 1190 , 1135 , 5 UNION ALL
SELECT 1120 ,...
July 23, 2011 at 7:24 am
You can remove (actually set to midnight) the value of GETDATE by:
SELECT DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)
July 23, 2011 at 6:37 am
Tried it using 2008 and it works there as well..........thanks
July 21, 2011 at 7:54 am
The reference cited simply states that it is defined as DATETIME data type, but does not give its default value. Do you have another reference, for without a defalut...
July 20, 2011 at 8:45 pm
reportmaster (7/20/2011)
I have a lot districts with zip codes and sales figures. Then i join some addresses to each zip code.
Finally the user try to filter several districts, render and...
July 20, 2011 at 7:17 pm
Think this might do it.
;WITH cte
AS (SELECT Row_Number() OVER(PARTITION BY EmployeeID ORDER BY ID DESC) AS rn,ID,EmployeeID,Salary
FROM @TestTable)
SELECT * FROM...
July 20, 2011 at 7:01 pm
Viewing 15 posts - 1,081 through 1,095 (of 3,221 total)