Viewing 15 posts - 3,076 through 3,090 (of 4,087 total)
It's simple enough to test. Why don't you try it and report back the results?
Drew
August 22, 2012 at 2:44 pm
Dave C. (8/20/2012)
are there any other ways of accomplishing this?
Why do you ask? Is there something wrong with the proposed solution, such as your neglecting to tell us that...
August 20, 2012 at 11:34 am
Try the following:
SELECT ord_oda_id, token, ISNULL(ord_id, 5000) AS ord_id
FROM xx_pm_receipts
OUTER APPLY (
SELECT TOP (1) ord_id + 1 AS ord_id
FROM xx_ordid_tracker
WHERE poid = ord_oda_id
ORDER BY ord_id DESC ) AS ot
WHERE token...
August 20, 2012 at 8:37 am
If you're trying to do what I think you are, then the answer is that you can't do it in SQL. First Normal Form for databases is that all...
August 14, 2012 at 8:14 am
GSquared (8/13/2012)
CTEs don't start with a semicolon.
I disagree. While I'm sure that the intention is that the statement before must end with a semicolon, implementation and general practice clearly...
August 13, 2012 at 3:18 pm
STOP!!!! You're opening yourself up to a very serious security risk. Identity theft is a very big problem and the primary source is SSNs from hacked databases.
You should...
August 10, 2012 at 7:15 am
If you have a one-to-many join, the count for the SELECT will be the count for the many side of the join, but the count for the UPDATE will be...
August 9, 2012 at 8:30 am
Scott D. Jacobson (8/7/2012)
You should NEVER use BETWEEN with datetime data.
Do you have any more material on this or is it purely anecdotal? For instance, what's wrong with this?
The issue...
August 7, 2012 at 12:11 pm
You should NEVER use BETWEEN with datetime data. Your query assumes a precision of 1 second when the actual precision of datetime data is 3 milliseconds, so you are...
August 7, 2012 at 8:48 am
CELKO (8/7/2012)
It looks like you use assembly language bit flays
Until SQL support Boolean datatypes, bit flags are the next best thing.
, but you did not bother to post any DDL...
August 7, 2012 at 7:53 am
I think that we would all agree that the following strings should all produce the same results when converted to an integer:
' 1'
'01'
So, it makes sense to me, that if...
August 7, 2012 at 7:33 am
Note that "b.date_deactivated is not NULL" is superfluous. If b.date_deactivated is NULL then the result of "b.date_deactivated < '7 aug 2012'" will also be NULL. So, in order...
August 7, 2012 at 7:12 am
As Joe alluded to, there is a much simpler method of calculating intersections. The standard uses only two dates, but it easily be modified to account for multiple dates.
SELECT...
August 3, 2012 at 8:18 am
Without data, it's hard to say what the best approach is, but consider using CROSS APPLY instead of the CURSOR. Here's something that will help get you started.
SELECT EvaluateeEvaluationID,...
August 3, 2012 at 7:08 am
Viewing 15 posts - 3,076 through 3,090 (of 4,087 total)