Viewing 15 posts - 2,926 through 2,940 (of 7,609 total)
There is no connection between the table you're deleting from and the EXISTS clause. If the EXISTS is ever true for the tables it references, even for just one row,...
February 27, 2019 at 10:43 am
That's one of the reasons SQL allows NULL "values" in columns (NULL is technically not a value, it's the absence of a value; for day-to-day purposes, you can think of...
February 27, 2019 at 10:41 am
It's easy enough to get a list of the missing values. But getting a concatenated list is somewhat more difficult.
;WITH cte_packages AS (
...
February 26, 2019 at 2:04 pm
The "WITH" from a CTE can cause errors if not preceded by a ; if an actual statement preceded the WITH. Therefore it's safer to prepend a ; so that...
February 25, 2019 at 3:01 pm
February 25, 2019 at 11:13 am
February 25, 2019 at 10:13 am
February 25, 2019 at 7:58 am
February 22, 2019 at 12:14 pm
How do we handle COALESCE in a dynamic SQL query?
In the WHERE clause, don't.
WHERE (@chan_id IS NULL OR tablea.chan_id = CAST(@chan_id AS...
February 22, 2019 at 10:42 am
February 22, 2019 at 10:39 am
As in your original method, you don't need to calc everyone's age, just check the correct date range. Like this:
WHERE Birthdate >= DATEADD(DAY, 1, DATEADD(YEAR,...
February 22, 2019 at 9:03 am
Second process uses read committed, thus uses an S-Lock on all the read records, and releases it when having finished the statement.
No. Actually, in RC level, the...
February 22, 2019 at 8:22 am
You can, but you shouldn't. If you're creating only one index on a temp table, make it a clustered index not a non-clus index; the key columns don't have to...
February 21, 2019 at 10:55 am
Don't sort the query, sort the result table instead, which is more useful anyway. Even if sort the query, you will still have to sort again when reading from the...
February 21, 2019 at 10:47 am
Viewing 15 posts - 2,926 through 2,940 (of 7,609 total)