Extracting words of a string with removal of unwanted punctuations.This is a flexible function to extract words from a string and tested on both SQL 2000 and 2005As you see the logic of this function is very simple. Maybe the update statement seems strange to beginners because it does not update any field of underlying […]
2007-09-26 (first published: 2007-05-26)
1,289 reads
I saw a script on here that outputs commands to the messages pane in Query Analyser. When run, these scripts output row counts for all your tables. This script does the same thing, but in one step.Tested on SQL Server 2000.
2007-09-25 (first published: 2007-05-24)
751 reads
This script was created for an Oracle to SQL 2005 migration. It creates a table, and then populates it with the record counts for each table in a given schema. (You will need to replace the xxxx text with your schema name for it to work). I prefer populating a table with this data, then […]
2007-09-24 (first published: 2007-05-24)
1,017 reads
After migrating an Oracle database to SQL 2005, all the identity values were not properly set. This script goes through and sets them all to 1 greater than the max value in the identity column.
2007-09-21 (first published: 2007-05-24)
444 reads
This is how I pull record counts for every user table in a DB... some of my tables are very large and this works for table with our without index very fast.
2007-09-20 (first published: 2007-05-24)
2,950 reads
This script will DELETE ALL constraints within the database that you define and in the following order: Foreign Key, Primary Key and then Unique Key.CAUTION:This script does not print out the ALTER TABLE statements, it drop the constraints immediately, therefore backup your database before testing or using this script. I ran the script below and […]
2007-09-19 (first published: 2007-05-23)
4,077 reads
I made some modifications to D Simmon's original sp. 1. I added dynamic feature to query tables in other databases (not linked servers) from one sp. I know dynamic sql isn't preferable in most cases but this is the route I took for this. 2. I enabled table name to be sent with owner qualification […]
2007-09-18 (first published: 2007-05-22)
602 reads