spDropField
spDropField does exactly the opposite of spAddField. It checks for existence, then drops it, if it does exist.
2002-03-05
136 reads
spDropField does exactly the opposite of spAddField. It checks for existence, then drops it, if it does exist.
2002-03-05
136 reads
spFindTableInfo is a great proc for finding info about your database. It will accept parameters like tablename, fieldname, size, datatype. So you can run it with no params, and it'll report every table, every field in those tables, and the size, datatype and whether its nullable or not. You can filter it by Table name […]
2002-03-05
378 reads
spGetFieldsExists takes a tablename and a field name, and checks if that field exists in that table.It simply returns 0 or 1 (false or true).
2002-03-05
167 reads
This stored procedure will list all the tables and columns in a given database. Usage: spro_ListAllColumns @dbname = 'Northwind'.
2002-02-28
806 reads
Pass a datetime value and receive back a formatted string. Much like the Format$ function in Visual Basic.I put this together to provide a date string to add to filename. Also handy when you are creating text files that require datetime data to be output in weird character formats like yyddmm or yyyymm.eg: fnDate2Char(GetDate(), 'dmy', […]
2002-02-27
821 reads
This Stored Procedure will display object level permissionsfor stated User or Role.Procedure output is ready to execute batch.Usage: Exec ScriptPermissions 'public'
2002-02-27
1,391 reads
This script creates a stored procedure that you can call to get the record count for every table in a particular database. It uses the sp_MSforeachtable system stored procedure and a temp table.
2002-02-25
637 reads
This script is very helpful for anyone trying to recreate particular SQL Server Database Versions for Testing. It allows you to automatically recompile any stored procedures or views saved with drop, create and permission statements. The scripts must all be sitting in one directory and end in the same extension. I have found this very […]
2002-02-25
683 reads
This stored procedure detaches and re-attaches a database without specifying a filename for the transaction log. This causes SQL Server to create log file with default size of 512kb.After playing around with SHRINKDATABASE, SHRINKFILE, forcing the virtual log to wrap around, etc... I found this was the quickest and most reliable method of reclaiming the […]
2002-02-25
2,606 reads
If you've ever been stuck having to write stored procedures to support an application, check this script out. This script will automatically generate seperate parameter driven select, insert, delete, and update stored procedures. Simply call these stored procedures from your application, passing parameters. This stored procedure requires only one parameter; table name. Creates scripts with […]
2002-02-21
324 reads
By Brian Kelley
It tells us to take the time to master the foundational basics of whatever...
By Steve Jones
The episode on data masking and subetting is out. You can see it here:...
By Brian Kelley
I'm listening to Effortless by Greg McKeon (link to author's page) through Audible.com. He...
hi i need "sample size" in my report's 4th data region which is a...
Hello experts, I want to be more organized about the SSL certificates we have...
Hi everyone, We recently upgraded our server to Sql Server 2019 (15.0.2125.1 (X64) on...
What are the two inputs called to a hash join operation in SQL Server? (choose 2)
See possible answers