Viewing 15 posts - 391 through 405 (of 1,923 total)
That query willl not handle that scenario. We can work it out anyways. Do u have any "Shift identifier"??
March 15, 2012 at 10:24 pm
oooops.. i dint see your last select statement..
Hmmmm.. i cant think of any other way than individually checking each columns!
March 15, 2012 at 4:35 pm
Whats your desired output? which rows u want to see?
March 15, 2012 at 4:31 pm
unclear on what you trying to do.. Can you be more elaborate?
And what is your desired output of ur samples?
March 15, 2012 at 1:26 pm
Lowell (3/15/2012)
in the meantime, if you search the forums for "civil war memorabilia", you can find the original post and adapt it to your solution.
:hehe: :w00t:
March 15, 2012 at 1:15 pm
Sivaganesh,
I am seeing a lot of posts from you ont he same request and the people who respond ask you to provide sample data, sample table ALWAYS. But you fail...
March 15, 2012 at 1:04 pm
Eugene Elutin (3/15/2012)
Now is only performance left.
Yours give:
Table 'Worktable'. Scan count 6, logical reads 70, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical...
March 15, 2012 at 12:55 pm
ColdCoffee (3/15/2012)
Eugene Elutin (3/15/2012)
ColdCoffee (3/15/2012)
Eugene Elutin (3/15/2012)
March 15, 2012 at 12:16 pm
Eugene Elutin (3/15/2012)
ColdCoffee (3/15/2012)
Eugene Elutin (3/15/2012)
March 15, 2012 at 12:11 pm
Eugene Elutin (3/15/2012)
March 15, 2012 at 11:56 am
How about this?
IF OBJECT_ID('TempDB..#Temp') IS NOT NULL
DROP TABLE #Temp;
CREATE TABLE #Temp
(
iD INT --IDENTITY(1,1)
,AMT_DIFF INT...
March 15, 2012 at 11:38 am
SQL_Surfer (3/14/2012)
Yep. Thats it. Thanks for your help.
You're welcome.. One question - did u use the first one or the second?
March 14, 2012 at 9:49 pm
Another solution
; WITH CTE AS
(
SELECT EmployeeID
,EmployeeLoginDateTime = DATEADD(DD,DATEDIFF(DD,0,OutTab.EmployeeLoginDateTime),0)
,JobFunction = CASE WHEN JobFunction = 'Logout' THEN 1
...
March 14, 2012 at 9:42 pm
Then this?
DECLARE @TableA TABLE
(
EmployeeIDINT
,EmployeeLoginDateTimeDATETIME
,JobFunction VARCHAR(25)
)
INSERT @TableA
SELECT 123,'2012-02-01 01:00:24','Coding'
UNION...
March 14, 2012 at 9:28 pm
Viewing 15 posts - 391 through 405 (of 1,923 total)