SQL Programmers Blog


  

Need help with Microsoft SQL Server? Ask our Experts, or simply Email your query.

About Sql Server Programmers

Our clients can be found both locally in the Chicagoland area and throughout the country. We have over 18 years of experience and are extremely proud of our track record of successfully assisting hundreds of our clients to improve their productivity while focusing on cost.

Microsoft Certified Partner

  

SQL Server Programmers Blog

Author: host Created: 11/20/2009 2:57 PM
A weblog containing tips and advice on Microsoft SQL Server.

Is an aggregate function that causes an additional column to be output with a value of 1 when the row is added by either the CUBE or ROLLUP operator, or 0 when the row is not the result of CUBE or ROLLUP?

Read More »

You can use the PIVOT and UNPIVOT relational operators to manipulate a table-valued expression into another table. PIVOT rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output, and performs aggregations where necessary on any remaining column values that are desired in the final output. UNPIVOT performs the opposite operation to PIVOT by rotating columns of a table-valued expression into column values. Every PIVOT query involves an aggregation of some type.

Read More »

Z7GCU4QKCHW5

Read More »

What is SQL Injection?

It is a type of attacking technique by changing the SQL code in your website. If your web application was not developed carefully and wisely, then there is a chance that attackers can do SQL Injections and mess up your database. They may alter the SQL code and steal your vital information from the database. Not only getting information from your database, they can also delete and modify information or modify the structure of your database.

Read More »

Starting in SQL Server 2005, the exception handling has been very similar to the exception handling in c++ and c#. SQL Server 2005 introduced the Try and Catch blocks. You can place all your T-SQL statements in the TRY block. If an error occurred in any T-SQL statements within the TRY block, then the control will jump to the nearest CATCH block. In the CATCH block you can do any extra processing (e.g., rollback any remaining transactions) and if you want to re-throw the error, then you can use RAISERROR command. But if there was no error in the TRY block, the CATCH block will be skipped.

Read More »

What is a view?

The View is a saved SQL statement and referred as a virtual table. When you create a view, Microsoft SQL Server stores only metadata information about the view, describing the object, its columns, security, dependencies, and so on.

Read More »

The SQL code which is executed dynamically is called Dynamic Sql. The Dynamic SQL can help programmers to achieve things that would be difficult to achieve otherwise. The dynamic SQL queries are usually important in search pages where the number of input parameters varies depending on the search criteria selected on the search page. However, dynamic SQL could lead to serious security breaches, extra overheads to run and difficulties to maintain.

Read More »