Get earliest and latest date values in a database
Query the earliest and latest date values found in all datetime columns in the current database.
2016-07-12 (first published: 2016-06-21)
3,263 reads
Query the earliest and latest date values found in all datetime columns in the current database.
2016-07-12 (first published: 2016-06-21)
3,263 reads
2016-07-05 (first published: 2016-05-26)
4,930 reads
2016-07-04 (first published: 2016-06-08)
893 reads
2016-07-01 (first published: 2016-05-24)
674 reads
If you have a requirement to carefully have the output file against each sql agent job step, you can use this script. If incase, there are many sql agent jobs and by any reason if any of the step does not have proper o/p file, this script can automatically create the o/p file.
2016-06-30 (first published: 2016-05-20)
1,579 reads
LEAD and LAG functions are new in SQL Server 2012 , This short Script could be used to get these values in Earlier versions also
2016-06-28 (first published: 2016-05-18)
802 reads
Function for Getting Interval Dates by days,months,years for particular week number, for particular month, for particular date between 1 to 31. etc...
All in One Date Interval Related Function.
2016-06-27 (first published: 2015-11-27)
1,968 reads
If you have a requirement to send email to recipients with attachment, can use the script.
2016-06-24 (first published: 2016-05-17)
3,168 reads
A brand new tally table based, fixed width "splitter" that can be used for much more than just string splitting
2016-06-22 (first published: 2016-05-14)
1,992 reads
Script that searches every object in a database for a specific string.
2016-06-20 (first published: 2016-05-02)
1,071 reads
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...
One of my favourite features of SQL Server 2022 was the T-SQL Snapshot Backups....
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