Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

Browsing "howto"

2

Where to find the xtype info for SQL Server in a table

If you look at the sys.sysobjects view, you will see an xtype column listed

Object type. Can be one of the following object types:
AF = Aggregate function (CLR)
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L…

Read More...
0

New Collection of SQL Server Videos on Channel 9

There are 13 new videos on channel 9 posted about SQL Server. The non-marketing videos (by engineering PMs) give customers peek into the goals and visions why certain SQL Server features were decided and implemented. Below is a list with a little blurb…

Read More...
2

Checking for NULL values in all columns that allow NULLS in all the tables

This post is based on a question I answered earlier today, someone wanted to check all columns that allow NULL for NULL values in all tables. The reason people might want to do this check is that they want to make all the columns not nullable in a database (after all we all know that […]

Read More...
4

Three different ways of populating variables with configuration values in SQL Server

I have a bunch of processes that run at then end of the day. Some of these processes are configured dynamic since table names, server names, database names and a whole bunch of other stuff might change.
SO you migh have a (over simplified here) table l…

Read More...
0

How to use T-SQL to get the command line startup parameters that were used to start SQL Server

This is just a quick blogpost that will show you how you can use T-SQL to get the command line startup parameters that were used to start SQL Server. Before I start I want to warn you that you do not try NET START and NET STOP on a production server since you might mess […]

Read More...
0

Debugging 64 bit SSIS packages

If you ever try to debug a script task by setting a breakpoint and the package is on a 64 bit machine it will just ignpore the breakpoint. I ran into this problem myself a while ago and this week a co-worker also ran into it and asked me how to resolve it. It is […]

Read More...
0

Can’t depend on sp_depends? Try using sp_refreshsqlmodule

This will not work on SQL Server 2000 since the sp_refreshsqlmodule does not exists on that version! A while back in the What is deferred name resolution and why do you need to care? blogpost I showed you that sp_depens is not reliable because you can create procedures that reference objects that have not been […]

Read More...
1

Replace Your Case When Then Else Syntax With the Sign Function In SQL Server

If you want to show a 1 when there is a value for something in the column and 0 if none of the rows have that values you typically do something like this CASE WHEN SUM(CONVERT(INT,SomeValue)) > 0 THEN 1 ELSE 0 END Basically you sum it up and if the sum is greater than […]

Read More...
0

Listing All The User-Defined Data Types That Were Created On Your SQL Server

If you have a bunch of User-Defined Data Types in your databases and you would like to get a list of them then you can run the following query On SQL Server 2000 and up select * from systypes where xusertype > 256 or On SQL Server 2005 and up SELECT * FROM sys.Types WHERE […]

Read More...
4

What is deferred name resolution and why do you need to care?

So I posted a teaser in the puzzles forum. Without running this, try to guess what will happen? DECLARE @x INT SET @x = 1 IF (@x = 0) BEGIN SELECT 1 AS VALUE INTO #temptable END ELSE BEGIN SELECT 2 AS VALUE INTO #temptable END SELECT * FROM #temptable –what does this return This […]

Read More...
Next Page »