Pages

Sunday 23 December 2012

Fun with GO Command of SQL.

In previous post, I explained using of “GO” command.
In this post i am going to explain how to rename “GO” command and use another word that you want as a batch separator.

STEPS:
Tools à Options…à Query Execution à SQL Server à General.

Suppose if i rename 'GO' to 'MYGO' then it can be use in following way:

         



















Saturday 22 December 2012

GO Command in SQL

GO is not a T-SQL statement. GO is a command used for signalling the end of a SQL batch. Batch is nothing but a group of one or more Transact-SQL statements at the same time from an application to SQL server for execution.
GO is a utility command that requires no permissions. It can be executed by any user.
Please refer below image for more idea:


Difference between DataView.Table and DataView.ToTable

Both DataView.Table and DataView.ToTable return a DataTable from a DataView.
DataView.Table: It gives you the underlying data, with no changes from the dataview's sorting or filtering.
DataView.ToTable: It gives you the data in the dataview after filtering and sorting.

Please refer following image for more details:


Saturday 8 December 2012

The Spatial Result tab in SQL Server.

Many days ago, i found very interesting feature of SQL server 2008 and above which is Spatial Result Tab so today i am going to show that feature.

SQL Server Management Studio 2008 and above introduces a new feature, the Spatial Results tab, which allows you to visualise the results of ad-hoc spatial queries directly in SQL Server Management Studio. To see the new Spatial Results tab, you simply need to execute and SELECT query that selects at least one column of geometry or geography data.

After you execute SQL query, you will be able to see something which is shown below image:


Download Query