2002-05-22
228 reads
2002-05-22
228 reads
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 […]
2002-05-20
377 reads
This stored procedure produces a report of record counts for every table on your server. The record count report is organized by database, and table name.
2002-05-16
647 reads
I have a set of data that I need to display in a random order each time I displayed it. There are several ways to do this, for example using a CURSOR to add each record to a temp table with a GUID, but a quick and dirty way to do this is to use […]
2002-05-16
503 reads
Procedure that net sends a message to any user who logged in as SA.IN. had to use this once in the company where SA password was blank for a while and managment did not want to set a password on the account. You can also set it to work with any username or for users […]
2002-05-14
876 reads
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 […]
2002-05-14
4,594 reads
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 […]
2002-05-13
659 reads
One thing that many people may do is disable a trigger temporarily to make changes without the trigger causing an issue. This is a simple way to quickly get all the triggers states in a database, so you can verify is it enabled or disabled.
2002-05-12
483 reads
With this store procedure you can send a parameters like 2379.56 and it will return the word value "TWO THOUSAND THREE HUNDRED SEVENTY NINE AND 56/100".
2002-05-10
673 reads
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) --> ''
2002-05-10
487 reads
By DataOnWheels
Hey fellow data friends! Wow, March was an absolutely crazy month (in the best...
We value your privacy. This policy explains what personal data we collect and why. What...
This came up one day at my work when a developer was using it....
Hello, I've created an SSIS package that collects data from SQL Servers and databases...
Hi, Need this DAX covert SQL T-SQL. Ticket Cutoff Status = VAR TimeOnly =...
Hi - Currently, I have this DAX coded in Power BI Ticket Cutoff Status...
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