SQL Server Tips Archives - All Things DotNetAll Things DotNet
  • Subscribe to this RSS feed
  • Receive updates as soon as they are posted.

SQL Server Tips Category

You’ve just entered a new stored procedure and you run your web page which uses it and WHAM! – you get this error message. Luckily, it’s not too bad.

August 20 , 2015 | | In: ASP.Net, SQL Server, SQL Server Tips

Change UTC DateTime to Local Time

Recently, I found out our SQL Server was storing events in UTC time. An application I was creating needed to get a list of events that happened on a certain certain day. Since our Central Standard Time was a little off, I had to come up with a fix for this. I had a parameter […]

March 24 , 2015 | | In: SQL Server, SQL Server Tips

SQL Server – Invalid Column Name

If you’ve been working with new columns or renaming columns in a table and when you go to the stored procedure, the column names are underlined in red and hovering over them shows an ‘Invalid Column Name’ description, don’t worry, it’s not as bad as it seems.

October 13 , 2014 | | In: SQL Server, SQL Server Tips

SQL Server Stalls During Installation

This happened to me in both 2012 and 2014 SQL Server installations (on a clean Windows 2012 R2 installation) and frustrated me to no end. It was super hard just to get all the extra apps uninstalled. What happens is that installation fails when installing Setup Support files. It just hangs and won’t go any […]

November 15 , 2012 | | In: SQL Server, SQL Server Tips

Manually Insert Null in SSMS

When using SQL Server Management Studio, sometimes (especially during testing phases) it becomes necessary to enter data manually. It’s easy when you actually want to enter text via specific datatypes, but what do you do when you want to force a field to null?

Recently I’ve been working on several stored procedures for DotNet applications and, though they were created successfully, when creating and editing them in the SQL Server Management Studio window, some, but not all of the column names in the list to be selected/inserted/updated would have the well-known red squiggly lines beneath them, and the tooltip […]

February 10 , 2011 | | In: SQL Server, SQL Server Tips

Renaming SQL 2008 Database

For quite a while, to rename a database, you could just execute the system stored procedure called ‘sp_renamedb': EXEC sp_renamedb ‘OldName’, ‘NewName’ At one point though, as I understood it, the word was that it would not be supported after 2005.

Scenario: Your new table doesn’t exist, but you have a complicated (or not) TSQL statement that you’d like to run and have it all inserted into a new table.

If you ever get this error, whether it is in a SharePoint app or ASP.Net app, or directly in SQL Server, never delete the files directly. This will most likely cripple your application. Instead, truncate the database transaction logs directly from SQL Server Management Studio.

September 24 , 2010 | | In: SQL Server, SQL Server Tips

DateName Function in T-SQL

As you probably know, the month function runs against a date and returns numerically, giving you the number of the month of the year. For instance, if your date is in August, it will return an 8. If you want the name of the month, you need to use DateName, which uses 2 parameters, including […]

All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF

If you find this site helpful,
please donate to help keep it online and free

Code 'n' Sprox   DreamTemplate - Web Templates

Follow us on Twitter

Follow AllThingsDotNet on Twitter

Test - The Name: 6936