Generate BCP commands (sp_bcp)
This is an updated scripts with some useful modification for the script submitted by Seshu Kanuri
2002-02-07
742 reads
This is an updated scripts with some useful modification for the script submitted by Seshu Kanuri
2002-02-07
742 reads
I use the following script to find out what was running at around the time something of interest happens on our SQL Server. I haven't got around to making this a stored procedure, but it is easy enough to change the date and time interval.
2002-02-06
724 reads
This stored procedure implements a kind of SELECT NEXT x TOP y Columns FROM Table WHERE Condition ORDER BY Order. It works on any table that has a unique id column and it works with any WHERE clause and any ORDER BY condition. The only drawback is its very poor performance on large tables. This […]
2002-02-06
1,244 reads
In SQL 7 you had no way to convert local time to GMT (UTC time) which was added in SQL 2K as GETUTCDATE() which will output the current date you would get with GETDATE() but a it's GMT counterpart. Although this was a great improvement I work with data on another server that's front end […]
2002-02-05
678 reads
T-SQL analog for Visual Basic FORMAT function. Created for MSSQL 2000. Works regardless of language settins on server or client side! fn_format('YYYY/DD/MM HH:MI','2002-03-13 12:00') = '2002/13/03 12:00' fn_format('DD.MM.YY','2002-03-13 12:00:00') = '13.03.02' fn_format('HH:MI:SS','2002-03-13 12:00:00') = '12:00:00'
2002-02-05
991 reads
There is a script for setting up a blackbox trace on SQL 2000 described by Kalen Delaney in "Inside SQL Server 2000". Since I can never remember where to look it up I wrote this simple stored procedure to run the blackbox trace when I need it. This should be used with caution as it […]
2002-02-05
643 reads
This function can convert string with separated values to table. Exclusive feature: items inside quotes will not be splitted! Now you can easily perform joins on CSV strings! For expample: fn_split('1, 2, ''3, 4'', 5',',')= 1 2 3, 4 5 First parameter - string with values, second - delimiter character.
2002-02-05
1,216 reads
I find phone numbers to be the messiest data that users enter. There are so many variations with brackets that I wrote this UDF to help clean up the data. Usage: SELECT Firstname , SURNAME , udfStripBracket(PHONENUMBER) AS BracketlessNumber FROM dbo.UserContact
2002-02-05
287 reads
The procedure looks at the table you want to be audited and writes the INS, UPD, and DEL triggers automatically required for the auditing to work. The auditing requires a table called Progress to hold the audit information in so have provided the DDL for this as well. Typically you would write a cursor to […]
2002-02-04
503 reads
Searches SysComments for occurances of entered keywords and returns a list of procedures that contain the keywords. eg1) To find all procedures with 'nMyColumn' in EXEC utl_ProcSearch 'nMyColumn' eg2) To find all procedures with 'nMyColumn' in and 'nMyColumn2' in EXEC utl_ProcSearch 'nMyColumn', 'nMyColumn2' eg3) To find all procedures with temporary tables in... EXEC utl_ProcSearch '#' […]
2002-02-04
216 reads
By Steve Jones
Redgate had some Claude training recently, which I went through as my knowledge has...
By Steve Jones
gnossienne– n. the awareness that someone you’ve known for years still has a private...
How I used AI for this postChatGPT to generate images based on info specifically...
Comments posted to this topic are about the item Demo Tracking Dropped Objects
Comments posted to this topic are about the item Randomly Selecting Columns and Rows...
Comments posted to this topic are about the item How Can SQL Server Detect...
If I want to return information about all Database Mail profiles on my instance from T-SQL, how can I do this?
See possible answers