Generate "insert" script
You can use it when you want to generate a script which can insert data row by row.
2002-12-31
433 reads
You can use it when you want to generate a script which can insert data row by row.
2002-12-31
433 reads
This script creates comma separated lists of columns in different formats. These lists can be copied and pasted into other T-SQL statements. The lists are formatted as: a simple list of column names, a list with the column names as declared variables (@ + column name + data type), a list with column names as […]
2002-12-26
231 reads
This script uses sysobjects and sysindexes to ID all tables in a database that are indexed, and/or clustered. It then runs through per table all of the indexes and runs DBREINDEX with their fillfactor. This eliminates having to maintain a list of all indexes and having code fail when it tries to modify indexes that […]
2002-12-19
1,804 reads
Yee Haa, as if we couldn't annoy our users more with message boxes, emails, and other friendly pop ups ;P here comes the net send. Has a test for success to determine if the send worked. If an invalid name is entered it can take a bit to fail, so don't use this from a […]
2002-12-18
359 reads
These are little more than wrapper functions for xp_regread and xp_regwrite, but lets them be callable from views, if you desire to do so.
2002-12-18
203 reads
This stored procedure lets you retrieve the environment variables from the server. you can pass in a partial name to get the variables that start with the partial match, or bblank to retrieve all the environment variables.
2002-12-18
581 reads
The script is design to gather informations on the growth of the databases per server (except the system ones).It is collecting in the 'databases' table of the master database for current information and in 'histodatabases' for old ones.It is possible to schedule the stored procedure.The column Serveur is only for gathering information on one server […]
2002-12-17
341 reads
Came across a great script from Ken Kaufman on copying backups using xp_cmdshell. Thought I'd contribute a script I wrote that builds on that to restore the latest production backup to a testing or development server. In this case I routinely create all my production backups to a network share and then use that source […]
2002-12-16
671 reads
This script will backup all databases that are online and have a recovery property of 'SIMPLE' AND already have a full backup. This script is set to run Monday thru Saturday at our site.
2002-12-12
230 reads
This script will do a full backup of any new database(s) on the server that does not have a backup already. This script runs Monday thru Saturday at our site.
2002-12-12
260 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...
Call Cs 08218200233 Gedung Aurum, Jl. Ampera Raya No.37, RT.8/RW.2, Cilandak Tim., Ps. Minggu,...
Call CS 08218200203 Mal & Apartemen Ambasador, Jl. Prof. DR. Satrio No.R.18 Lt Dasar,...
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