Viewing 15 posts - 1,156 through 1,170 (of 2,007 total)
memymasta (12/12/2011)
Cadavre (12/12/2011)
Try these changes and test again (it's a little difficult without an actual execution plan)
========== Jim-720070 version ==========
Warning: Null value is eliminated by an aggregate or other SET...
December 12, 2011 at 6:51 am
memymasta (12/12/2011)
========== Jim-720070 version ==========
Warning: Null value is eliminated by an aggregate or other SET operation.
(3336 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0,...
December 12, 2011 at 6:30 am
Dev (12/12/2011)
Trust me, if you can prove your skills resume font doesnโt matter.
Use Wingdings next time and see how that works out for you ๐
December 12, 2011 at 6:04 am
Next time, I might even read the whole thread before I post!!
Corrected.
SELECT userid, firstname, lastEndDate AS lastJob, DATEDIFF(dd, lastEndDate, GETDATE()) AS daysSinceLastJob,
MAX(jobname) AS jobname
FROM (SELECT a.id AS userid, a.firstname, a.lastlogin,...
December 12, 2011 at 6:00 am
December 12, 2011 at 4:55 am
Phil Parkin (12/12/2011)
I want the name of the user which is running the SQL Server service for...
December 12, 2011 at 4:15 am
memymasta (12/12/2011)
It seems like it works! In a single SQL, thats amazing...Ty, you guys rock!
*christmas hug*
No problem.
Out of curiosity, which performs better on your real data? (I won't be offended...
December 12, 2011 at 4:11 am
Assuming I understand you correctly
SELECT SUSER_NAME()
December 12, 2011 at 4:05 am
You're right, I did miss that requirement.
Here's the corrected version for my code: -
SELECT userid, firstname, lastEndDate AS lastJob, DATEDIFF(dd, lastEndDate, GETDATE()) AS daysSinceLastJob,
MAX(jobname) AS jobname
FROM (SELECT a.id AS userid,...
December 12, 2011 at 3:47 am
DECLARE @str NVARCHAR(MAX) = '1,2,3,4'
SET @str = '''' + REPLACE(@str,',',''',''') + ''''
SELECT *
FROM emp
WHERE empid IN (@str)
December 12, 2011 at 3:20 am
GilaMonster (12/10/2011)
Cadavre (12/9/2011)
December 12, 2011 at 2:57 am
Surprisingly difficult, especially considering the % of correct answers!
Thanks for the question and the point ๐
December 12, 2011 at 2:46 am
memymasta (12/12/2011)
Jim-720070 (12/9/2011)
Hmmm... I have to disagree with you...
Oh, i just run the code without removing the "WHERE RecentJob = 1" part.
The code works exellent and has alot better...
December 12, 2011 at 2:30 am
BEGIN TRAN
--Create sample data to play with
SELECT Identifier, priority, accountnumber
INTO #SampleData
FROM (SELECT 123456, 1, 9999999999
UNION ALL SELECT 123456, 1, 8888888888
...
December 9, 2011 at 10:13 am
GilaMonster (12/9/2011)
Kiara (12/9/2011)
GilaMonster (12/9/2011)
It seemed to be, becauseSurname BETWEEN @Letter + '%' ...
and
Surname BETWEEN CAST(@Letter AS Varchar(50)) + '%' ...
produced different results. Didn't spend weeks investigating though...
Hm... that would...
December 9, 2011 at 9:32 am
Viewing 15 posts - 1,156 through 1,170 (of 2,007 total)