SQL Server 2008 introduces the Compound Operators which execute some operation, such as + (addition), - (subtraction), * (multiplication) and / (division), and set an original value to the result of the operation.
One of the new programmability enhancements in the Database Engine introduced in SQL Server 2008 for Transact-SQL is the row constructor which consists of a single VALUES clause with multiple value lists enclosed in parentheses and separated by a comma. With the row constructor, you can now insert multiple values using a single INSERT statement.
In this article, we will show how to use the row constructor (also called as table-valued constructor) as a derived table which you can use in the FROM clause of a SELECT statement and as a source table in a MERGE statement, yet another new statement introduced in SQL Server 2008.
One of the common tasks in database management is the maintenance of lookup tables. Maintenance of these look-up tables are usually done using stored procedures where the normal task is to add the new record if it does not exist or update the existing record if it already exists based on the identified primary key of the table. SQL Server 2008 introduces a new statement called MERGE statement which combines these functionalities into just a single statement. The MERGE statement performs an INSERT, UPDATE or DELETE operation on a target table based on the results of a join with source table.
SQL Server 2008 introduces a new parameter type called the table-valued parameters. With the table-valued parameters, which are declared by using user-defined table types, you can now send multiple rows of data to a function or stored procedure without creating a temporary table or many parameters.
When importing or exporting a table with a geometry or geography column, you might encounter an "unknown column type conversion" error. This article shows how to manually resolve the issue.
This article discusses the two ways (automatic and manual) of opening the firewall port for SQL Server on Windows Server 2008 to solve the issue of "Could not open a connection to SQL Server (Microsoft SQL Server, Error: 1326)".
Prior to SQL Server 2008, geography locations are usually stored as latitude and longitude coordinates in two separate columns. With the introduction of spatial data types in SQL Server 2008, particularly the GEOGRAPHY data type, this can now be stored as points in a single column stored as a spatial data object.
This article continues the discussion of the Table-Valued Parameters article and will combine this new feature with the MERGE statement, yet another new feature of SQL Server 2008.
This article shows the different connection strings that you can use when connecting to SQL Server 2008 using .NET Framework Data Provider for SQL Server, the SqlConnection class.
One of the most frequently asked questions in SQL Server forums is how to format a datetime value or column into a specific date format. Here's a summary of the different date formats that come standard in SQL Server as part of the CONVERT function. Following the standard date formats are some extended date formats that are often asked by SQL Server developers.