Archives: June 2011
Table Value Constructors were introduced in SQL Server 2008 and enables you to (not only) insert more records with one INSERT statement.
“Standard” option to insert more records is following:
INSERT INTO Continents (Name) VALUES ('Asia') INSERT INTO Continents (Name) VALUES ('Africa')
With Table Value Constructors… Read more
It is known that you cannot get inserted identity values using OUTPUT clause when inserting to view which has instead of trigger on it. I would like to offer another workaround I was used recently.
I am talking about fact that you will not succeed with this:
-- inserting records…
I was using user-defined tables types (UDTT) quite intensively despite of their current disadvantages especially their forced READONLY behavior when used as stored procedures parameter. Another disadvantage which I didn’t realize impact for is that UDTT cannot be altered. I hit maintenance nightmare when they became spread across… Read more
Red Gate’s SQL Source Control (RGSSC) is very decent solution source control solution for database development. I am personally using it and despite it is still young product it is very helpful for me and rest of team members. I am not going to review this tool but I am… Read more
Many years back when ASP 2.0 (not ASP.NET) was used as primary server language for web application on Microsoft platform, it was common that business logic was implemented using stored procedures on database side. Nowadays, this approach is used less and less especially because of.NET capabilities to act as full-featured… Read more
I faced problem that I had many lookup tables like ProductType, ClientType etc. and wanted to refer to their values in code to base some logic on them. This is quite common.
I am talking about something like following:
SELECT @ClientType = ClientType, -- other columns FROM Client WHERE Id…
SSMS is abbreviation of SQL Server Management Studio, according to Microsoft description it is “an integrated environment for accessing, configuring, managing, administering, and developing all components of SQL Server. SQL Server Management Studio combines a broad group of graphical tools with a number of rich script editors to provide access… Read more