Conditionally Order By Different Column
Order records based on a different column depending on which absolute value is greater.
2018-10-01 (first published: 2018-09-26)
657 reads
Order records based on a different column depending on which absolute value is greater.
2018-10-01 (first published: 2018-09-26)
657 reads
2018-09-26
485 reads
A copy of the late Robert Davis' dba_copylogins stored procedure with a bug fix. The SP copies logins, roles, and permissions between servers.
2018-09-24 (first published: 2018-08-28)
1,800 reads
2018-09-21 (first published: 2018-06-01)
2,115 reads
2018-09-20 (first published: 2018-08-28)
907 reads
Didn't find anything, so hope this will help someone with similar need.
Note I did a similar set-based version, and unless the input is more towards non-zeros in all eight 2-byte fields, the set-based performs not as well
2018-09-19 (first published: 2018-09-12)
606 reads
2018-09-04 (first published: 2018-08-23)
332 reads
This scripts helps to generate ADD / DROP Constraints against single Database.
2018-09-03 (first published: 2018-08-14)
264 reads
2018-08-24 (first published: 2014-06-17)
711 reads
Dynamic SQL can be used to generate a database snapshot. Useful for a database with a number of files.
2018-08-23 (first published: 2016-11-04)
3,559 reads
By Steve Jones
My life has some crazy travel stretches for sure. Between speaking, office visits, customer...
In Part 1, we saw how ‘Vamana’ represents vectors as nodes, connects them with...
I’m excited to announce the release of a new open-source project that fully automates...
Comments posted to this topic are about the item Optional Parameter Plan Optimization in...
Comments posted to this topic are about the item AI Experience Gap that we...
There is a table tmp_tab:
CREATE TABLE tmp_tab ( id int, val int );
INSERT INTO tmp_tab VALUES (1, 1), (2, NULL), (3, 3), (4, 4), (5, 5);You want to order the rows ids by the following expression:
ISNULL(val, id) + 1Which of the following queries produces the expected ordering and why? (Select all correct) See possible answers