Creating Your Dream Project
In this article, columnist Christopher Duncan shows you how to create your dream development project.
2002-11-15
5,709 reads
In this article, columnist Christopher Duncan shows you how to create your dream development project.
2002-11-15
5,709 reads
Do you want to use OPENXML with an xml document in a table, this procdure will do it for you.Pass in the SQL that will return the column of data, it will return the document handle which can then be used with OPENXML.ExampleDROP TABLE TabCREATE TABLE Tab (doc ntext)INSERT INTO Tab VALUES ('' + REPLICATE('' […]
2002-11-14
528 reads
Have you ever wanted to check that a server exists before using it. Here is a solution that use SQLDMO from within TSQL to get the status of a SQL Server service. It also works for 2000 instances. I have named it sp_ServerStatus for it to be based in master.This returns the status integer and […]
2002-11-14
603 reads
This function and stored procedure can be used to easily identify if a file, directory or parent directory exist. It wraps the functionality of xp_fileExist but gives easy access to the directory and parent directory exist values.To use it the function pass in the file or path and either 'IsFile', 'IsDir' or 'HasParentDir' it will […]
2002-11-13
3,816 reads
INSTR searches string for substring. --> position is an integer indicating the character of string where SQL Server begins the search. -->If position is negative, SQL Server counts and searches backward from the end of string. occurrence is an integer indicating which occurrence of string SQL Server should search for. The value of occurrence must […]
2002-11-12
1,347 reads
The procedure copies one stored procedure from one database to another one
2002-11-12
710 reads
Below is a SQL Server 2000 query to return all columns that are primary keys to tables in a database
2002-11-01
223 reads
This procedure was created to automate the dropping of statistics on a user specified table. Very simple code, but handy if the need is there.Replace 'tablename' throughout script with the name of the table intended to temporarily house the statistics name(s).
2002-11-01
1,059 reads
This script will find and replace specified text within all ActiveXScript tasks with a certain text string in the description. It was designed on SQL 2000, but I think it will run on SQL 7 as it doesn't reference any SQL 2000 specific properties. It opens a package object and then loops through the steps […]
2002-10-31
643 reads
This script will execute a DTS package using the sp_OA stored procedures. It accepts six parameters which specify the server name, security mode flag, userid, password, package name and optional package password.Eg:For SQL SecurityEXEC usp_ExecDTSPackage @vcrSrvr='Server', @bitIntSec=0, @vcrUID='UserID', @vcrPWD='Password', @vcrPkgName='Package Name', @vcrPkgPWD='Package Password'For Windows SecurityEXEC usp_ExecDTSPackage @vcrSrvr='Server', @bitIntSec=1, @vcrPkgName='Package Name', @vcrPkgPWD='Package Password'It uses a function […]
2002-10-31
353 reads
Setting page visibility and the active page are often overlooked last steps when publishing...
By Steve Jones
It’s time for T-SQL Tuesday again and this time Todd Kleinhans has a great...
By Steve Jones
Recently I was working in VS Code and I saw a walkthrough for the...
Comments posted to this topic are about the item Password Guidance
Comments posted to this topic are about the item Using table variables in T-SQL
I am trying to check out elastic query between two test instances we have...
What happens if you run the following code in SQL Server 2022+?
declare @t1 table (id int); insert into @t1 (id) values (NULL), (1), (2), (3); select count(*) from @t1 where @t1.id is distinct from NULL;See possible answers