THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » SQL Server 2005 » SQL Server 2008 » Tip   (RSS)
  • Return Null If A Value Is A Certain Value

    You need to return NULL only if the value of your data is a certain value. How do you do this? There are three different ways. NULLIFDECLARE @1 char(1)SELECT @1 ='D' SELECT NULLIF(@1,'D')REPLACEThis should not really be used, I just added it here to demonstrate that you can in fact use it.DECLARE @1 char(1)SELECT @1 ='D' SELECT ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on November 6, 2007
  • Increase Your Productivity With Query Analyzer/SQL Server Management Studio

    Drag And Drop Column Names In Query Analyzer you can save a lot of time by using this trick instead of typing all the column names of a table Hit F8, this will open Object Browser Navigate to DatabaseName/TableName/Columns Click on the column folder and drag the column folder into the Code Window Upon release you will see that all the column names ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on September 24, 2007
Privacy Statement