Miscellaneous

Technical Article

Returning data with col number

  • Script

This script enables you to return data from SQL Server's table without specyfing the name of the column .All you only need to supply is the column number, that you want the data from. In the example we want to chose all rows from the second column (categories table - northwind) Column number is based […]

You rated this post out of 5. Change rating

2003-05-07

171 reads

Technical Article

Generate "CREATE...FOR ATTACH" stmt. dynamically

  • Script

In instances where you have over 16 data files, or you need to move data files to a new location when you are moving a database you must use a CREATE...FOR ATTACH statement.  This script will generate the CREATE...FOR ATTACH statement dynamically given a database name.  It will take into consideration the file sizes, growths […]

You rated this post out of 5. Change rating

2003-05-07

230 reads

Technical Article

Restrict simultaneous access to resources

  • Script

This set of procedures allow you to control simultaneous access to any resource you are using. It mimics the behaviour of a Semaphore in programming.A typical problem where you need this, is when you have a computational intensive procedure you only want to be started a limited number of times.First, add a record to the […]

You rated this post out of 5. Change rating

2003-05-07

284 reads

Technical Article

Sneak peak at Log Navigator II

  • Article

As LockwoodTech Log Navigator Beta releases approaches we have released a bunch of new screen shots on product features. Log Navigator reads the MS SQL Server Transaction Log to allow you to passively audit data changes (inserts, updates and deletes) made to your database.

2003-05-05

619 reads

Technical Article

UDF to get first date or trim time for Datepart.

  • Script

Not long ago I was in a forum discussion when someone presented another way to get the date with time value of midnight by doing similar to thisDATEADD(dd,DATEDIFF(dd,0,@DATE),0)Which I find is much cleaner than any other option I have seen or tried myself. Seeing this I realized there are many other dates that can be […]

4 (1)

You rated this post out of 5. Change rating

2003-05-02

483 reads

SQLServerCentral Article

Creating a Script from a Stored Procedure

  • Article

Ryan demonstrates how he arrived at a solution that allows you to create scripts from a stored procedure using SQL-DMO. If you get interested in DMO, we've got quite a bit of additional content here on the site to help you get going! Ryan is a new author here on the site, please take a minute to read his article, add a comment, maybe just say hello.

5 (1)

You rated this post out of 5. Change rating

2003-05-02

17,112 reads

Technical Article

New MDX Book Published

  • Article

Fast Track to MDX gives readers all the necessary background information needed to write useful, powerful MDX expressions and introduces the most frequently used MDX functions and constructs. No prior knowledge is assumed and examples are used throughout the book to rapidly develop MDX skills to the point where a reader can solve real business problems. A CD containing examples from within the book, and a time-limited version of ProClarity, is included

2003-05-01

2,698 reads

Technical Article

fnArabToEnglish

  • Script

Last year I pulished a function ,named fnArabToEnglish,which can convert a arabic number to english ,such as turn 1234.56 to 'one thousand two hundred thirty four and cents fifty six'.Mr Rick send me a message with a bug of thefunction today,I get rid of the bug and publish the second time.I hope you like this […]

You rated this post out of 5. Change rating

2003-04-30

67 reads

Blogs

Solving SQL Server Mysteries with a Whole Gang of Sleuths -Scooby Dooing Episode 4

By

One thing I’ve always loved about the Scooby-Doo cartoon is that he never solved...

SQL Server Availability Groups

By

Flexibility and Scale at the Database Level When SQL Server 2012 introduced Availability Groups...

Modify Power BI page visibility and active status with Semantic Link Labs

By

Setting page visibility and the active page are often overlooked last steps when publishing...

Read the latest Blogs

Forums

how to optimise whole database full of table and sp in one go using githubcopilo

By rajemessage 14195

i have subscription of github copilot which i can access in vs 2022 comunity...

Password Guidance

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Password Guidance

Using table variables in T-SQL

By Alessandro Mortola

Comments posted to this topic are about the item Using table variables in T-SQL

Visit the forum

Question of the Day

Using table variables in T-SQL

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