T-SQL

Technical Article

Updating multiple rows using single stored proc

  • Script

The situation arises when we are displaying data in a grid or some other control at front end level, where the user is making corresponding changes in the grid and at last when the user click for update button, the whole changes should be posted back to the database. This can be achieved by two […]

You rated this post out of 5. Change rating

2004-11-04 (first published: )

448 reads

Technical Article

From a Delimited String, fetching the nth Value

  • Script

This User defined Function will provide you the facility of fetching the nth Value from a Delimited string. The Parameter for the function which you have to pass is, the Delimited String, the Delimiter of the string, nth Position of the string. In this function , you can dynamically change the Delimiter as well as […]

You rated this post out of 5. Change rating

2004-10-15 (first published: )

1,278 reads

Technical Article

Modification to Automate Audit Trigger Generation

  • Script

This is a modification to Automate Audit Trigger Generation at http://www.sqlservercentral.com/scripts/contributions/1073.asp by walkerjet. The changes were made to accommodate tables using different types for their primary keys, (i.e. int, smallint, char, etc.), add the ModifiedById and DTStamp columns, exclude legacy tables that do not have a primary key defined, exclude fields of type text, ntext, […]

You rated this post out of 5. Change rating

2004-10-19 (first published: )

351 reads

Technical Article

Select from x th row next y rows

  • Script

This code will show rows from 17th and then next 3 ordered by name from table authors in database pubs. Table must have primary key and of course ordered column. You can change value 'from' in line 'SET ROWCOUNT 17' and value 'next' (how many rows)in line SELECT TOP 3. It is good to show […]

You rated this post out of 5. Change rating

2004-10-21 (first published: )

186 reads

Blogs

Attacking the Weakest Link

By

When I look at a system and think about its security model, the first...

Webinar – Microsoft Fabric for Dummies

By

On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about...

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

Read the latest Blogs

Forums

Looking for a Recommended Azure SQL Managed Instance Book

By shew

Can anyone recommend an Azure SQL Managed Instance book? I'm looking for information about...

timeout in vs for ssas tabular deploy is 0 but i still timeout deploying

By stan

hi we run 2019 std but i'm testing this on 2016.   following some old...

Table variable declared within cursor persists across loop iterations

By Steve Collins

If you run this code it creates a 2 row cursor loop.  Within the...

Visit the forum

Question of the Day

The Backup File Extension

I run this command in SQL Server 2022. What is the extension of the backup file?

BACKUP DATABASE HerdofTwo TO DISK = 'HerdOfTwo_20240501'

See possible answers