-
Using NOCOUNT, ANSI Warnings and Temp Tables in SQL Server
Here are a few useful code fragments that I use all the time. You see too many Rows Affected Messages. First, NOCOUNT. If you don’t want SQL Server to return the Row Count (20 row(s) affected) after you execute a query, here is the code: — Turn off the rows affected message SET NOCOUNT ON…
-
Change a Date Format Using ActiveX and SQL DTS Transformations
Let’s say you are importing data from a flat file to SQL Server via DTS. Now, let’s say the date format in the source file is similar to this: YYYYMMDD. If your destination column is a datetime or smalldatetime, SQL server isn’t going to know what to do with this data, at least not initially.…
-
Adding Foreign Keys after a table is created in SQL Server
Well, you knew exactly what you needed when you created a table. Only now when you created a child table, the child table does not update with the information from your main table. Or worse you deleted something from your primary table and it still lives in the child table. You need a foreign key,…
-
Adding Checks after a table is created in SQL Server
Did you create a table, only to find that you need to add a check constraint? I created a quick example of how to add a check constraint after the table exists. In this example, we want to know if our user is alive or dead. 1 = alive, 0 = dead. Here is the…
-
Trying out Adobe Illustrator
Rudy installs Adobe Illustrator and learns the interface.