Viewing 15 posts - 1,441 through 1,455 (of 1,472 total)
Something like this should work:
SELECT T.CandidateID,
Missing=CASE WHEN T1.CandidateID IS NULL THEN 'Missing From Table 1'
WHEN T2.CandidateID IS NULL THEN 'Missing From Table 2'
ELSE 'Present in Both'
END
FROM (SELECT DISTINCT CandidateID
FROM...
October 6, 2008 at 10:36 am
Your syntax is all messed up. You have no closing parens on any of your ISNULL's or RTRIM's in addition to numerous other syntactical errors. However, due to...
October 3, 2008 at 1:48 pm
Would you use user defined functions for manipulations not involving a database table (i.e., string manipulation, input validation, etc.)
If I wanted to manipulate a single value, or a very small...
October 3, 2008 at 12:53 pm
The phone number is a float, and when using CAST, it will give you scientific notation.
Try this one:
STR(phone, 10,0)
October 3, 2008 at 12:09 pm
What criteria do you use to evaluate the best option? Examine the query execution plan and select the one with the lowest overall subtree cost? Or something else?
I personally avoid...
October 3, 2008 at 11:55 am
Not to mention the answer he gave had already been given, better, and in more detail before he bumped it. That post was in general a failure of epic...
October 3, 2008 at 11:30 am
I just realized that my query will fail in the case that there are no text files associated with a particular date. (IE. If all 5 customers are missing...
October 3, 2008 at 10:13 am
The only thing that made sense to me with the time was that it was
70004 7:00:04
210053 21:00:53
20003 2:00:03
200002 20:00:02
Seconds wouldn't work, as there are...
October 3, 2008 at 8:29 am
So many cross joins, so little time!
---------- ALTER TABLE TO NORMALIZE DATA ------------------
ALTER TABLE #ReportFiles
ADD ReportDate datetime, Company varchar(20)
UPDATE #ReportFiles
SET ReportDate = CONVERT(SMALLDATETIME,SUBSTRING(FileName,1,CHARINDEX('_',filename)-1))
WHERE ReportDate IS NULL
UPDATE #ReportFiles
SET Company = SUBSTRING(filename,CHARINDEX('_',filename,1)+1,(CHARINDEX('.',filename,1)-CHARINDEX('_',filename,1))-1)
WHERE...
October 3, 2008 at 7:19 am
I think I'm starting to grasp what you're after here, but to generate a solution, I'd like a bit more information than you've given.
Please supply the following:
A sampling of data...
October 3, 2008 at 6:08 am
Sergiy:
Thanks for the tip. I added in a DBCC FREEPROCCACHE before the views and reran the results, but still no differences worth mentioning. I'm guessing that's...
October 3, 2008 at 5:57 am
WHERE FirstName <> 'Jimmy' AND LastName <> 'Woods'
October 2, 2008 at 8:43 am
I believed both my coalesce View and the UNION ALL to be viable solutions to your issue, but I was curious as to which was more efficient. I'll post...
October 2, 2008 at 8:39 am
As bitbucket noted, this question is somewhat limited on information. I went ahead and scripted up a solution(mainly because it gave me another opportunity to use a cross join),...
October 2, 2008 at 6:27 am
Viewing 15 posts - 1,441 through 1,455 (of 1,472 total)