Miscellaneous

Technical Article

Search for a value in a numeric variable list

  • Script

When you have a variable that hold a comma separated numbers like '1,2,3' and you have a table with a column that has the value that should match a number in that list, you can use this script to avoid building a string and then executing it.You have to convert the columnID to varchar, the […]

You rated this post out of 5. Change rating

2002-05-20

377 reads

Technical Article

Get total file size of backup for last full backup

  • Script

The information for backup size is stored in the backup_size column of the backupset table in the msdb database as the total bytes for that backup. This script allow you to look at the total back to tape or file so you can plan space needs for those devices. This is a simple piece of […]

5 (1)

You rated this post out of 5. Change rating

2002-05-14

4,594 reads

Technical Article

Procedure for Random Numbers

  • Script

Here is handy procedure to generate random number.I find it useful when I generate large amount of test data in a database.For example if you need to create a Customer Data and what they have purchased in the last month to run perfrmance tests on large amount of data an set up necessary indexes.You can […]

You rated this post out of 5. Change rating

2002-05-13

659 reads

Technical Article

Parse a delimited string, return n-th value

  • Script

This UDF will parse a string delimited by the character you specify and return the value in the n-th position you requested.Example:select dbo.fn_parse('this string', ' ', 1) --> 'this'select dbo.fn_parse('this string', ' ', 2) --> 'string'select dbo.fn_parse('this string', ' ', 3) --> NULLselect dbo.fn_parse('this  string', ' ', 2) --> ''

1 (1)

You rated this post out of 5. Change rating

2002-05-10

487 reads

Blogs

FabCon 2025 Recap

By

Hey fellow data friends! Wow, March was an absolutely crazy month (in the best...

Privacy Policy

By

We value your privacy. This policy explains what personal data we collect and why. What...

Why use XACT_ABORT?

By

This came up one day at my work when a developer was using it....

Read the latest Blogs

Forums

Error when running SSIS package as a job

By ichervin

Hello, I've created an SSIS package that collects data from SQL Servers and databases...

Need help with Cut off time in SQL

By hollyanneu2

Hi, Need this DAX covert SQL T-SQL. Ticket Cutoff Status = VAR TimeOnly =...

Need help with Cut off time in SQL

By hollyanneu2

Hi - Currently, I have this DAX coded in Power BI Ticket Cutoff Status...

Visit the forum

Question of the Day

Browsing for Instances

I have a SQL Server instance that is not listening for connections on port 1433. By default, all ports are locked down on my server, except for the SQL Server port. What can I do to allow users to connect to the instance without knowing the port?

See possible answers