Miscellaneous

Technical Article

fnCharPad

  • Script

This function allows the user to pass in a string / character value and it     will padd the value according to given parameters. The parameters are as follows:@ValueToPad = Value to be padded by function.@PadCharacter = Character used to pad a given value.@Justification = Justification format bit 0 - Value will be RIGHT justified […]

You rated this post out of 5. Change rating

2002-09-06

263 reads

Technical Article

Recompile all Udf's associated with a Table

  • Script

When altering the structure of tables it is good practice to run SP_RECOMPILE against the table to force triggers and stored procedures to recompile. However this does not incude Udf's which also rely on the table, and this means the Udf's may fail when they are called. Run this script and supply the table name […]

You rated this post out of 5. Change rating

2002-09-05

352 reads

Technical Article

Show valuable info from sysindexes

  • Script

This sp (sp_sysindexes) captures important columns from the table sysindexes and translates the numeric values into text. It shows the owner.object, the filegroup which it belongs to, the type of index, the total number of pages for tables/clustered indexes and non clustered indexes. It also shows the status, the indid and the type of object.You […]

3.5 (2)

You rated this post out of 5. Change rating

2002-09-01

3,702 reads

Technical Article

Compare the data of 2 Tables (Updated)

  • Script

The SP compares the data in 2 tables and reports the different data. Tables could be from different servers, different databases or different schemas. This accepts 7 parameters 1, 2: Name of the 2 tables 3 : List only the differences 4. : Compare only the structure 5. : Check timestamp fields too 6. : […]

5 (1)

You rated this post out of 5. Change rating

2002-08-17

1,381 reads

Technical Article

Using a MEMORY table as an array

  • Script

I liked the script of using a table as an array. But Didn't liked the cursor in it so I rewrote the script so that it uses a memory table.I tested it in the Query analyzer and this one is indeed faster. So all the people out there yelling that a memory table is faster […]

You rated this post out of 5. Change rating

2002-08-07

1,219 reads

Technical Article

Comparing Contents of 2 tables in T-SQL

  • Script

How can you compare two tables -- say, table A and table B  and determine if their content is the same? Assuming that A and B have same structure, here's how:First, from set theory, recall that: If ((|A| = |B|) && |A U B| = |A|)) ====>>>  A = B |A| = NUMBER of rows […]

You rated this post out of 5. Change rating

2002-08-07

1,470 reads

Technical Article

Retrieve every n values

  • Script

this scripts presents the way to retrieve from a given result set the values given n where n determines that the Nth value,2N th values , 3Nth value will be returnedin the example n = 3 the returning rows are 22,32,42the given set is 20,21,22,30,31,32,40,41,42

You rated this post out of 5. Change rating

2002-08-01

433 reads

Blogs

Using Flyway Prepare for State-Based Deployments

By

One of the neat enhancements made to Flyway was the addition of state-based workflows...

How I Migrated to Azure PostgreSQL Flex from Single Server

By

I did a couple of posts previously on dumping/restoring Azure PostgreSQL databases and also...

Have a Plan for Your Personal Downtime

By

Most of us know that spending a lot of time on social media and...

Read the latest Blogs

Forums

Resolving Access Denied Errors During SQL Server Database Attachment

By Noman072

Comments posted to this topic are about the item Resolving Access Denied Errors During...

The Lesser Used Functions

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Lesser Used Functions

SQL in an Azure VM Backup

By Steve Jones - SSC Editor

Comments posted to this topic are about the item SQL in an Azure VM...

Visit the forum

Question of the Day

SQL in an Azure VM Backup

If I use the Azure Backup service for automated backups of my SQL Servers in Azure VMs, how often can I configure log backups? (as of Dec 2024)

See possible answers