Showing posts with label SQL Server 2008. Show all posts
Showing posts with label SQL Server 2008. Show all posts

What a "GO" statement do in T-SQL ?

Sep 13, 2011 Posted by Lara Kannan 0 comments
What a "GO" statement do in T-SQL ?

By definition it is a batch separator. It will run a batch and commit it. But along with that it also accepts one parameter which tells the SQL engine basically how many times to do the job.

For Example:
SELECT * FROM   sys.objects;
GO 3
It will show the output THREE times :)

Note: "GO" is the keyword used by SSMS to separate query batches. It can be configured in this location:

Tools » Options » Query Execution » SQL Server » General. Change the value for "Batch Separator:" in the right pane.

To see the immediate effect of this change, you need to close all query windows in the current session and open new query window.


Next Example:

IF EXISTS (SELECT 1
FROM tempdb.sys.objects
WHERE name LIKE '%#ProductTable%')
DROP TABLE #ProductTable;

CREATE TABLE #ProductTable
(
ID INT IDENTITY (1, 1),
Name VARCHAR (50)
);
GO

INSERT INTO #ProductTable (Name) VALUES ('Office XP');
GO 3

SELECT * FROM #ProductTable;

OUTPUT:

Hope this helps you and thanks to SQLLion.

Share

Free ebook - Microsoft SQL Server Reporting Services Recipes

Apr 9, 2010 Posted by Lara Kannan 1 comments
Microsoft SQL Server Reporting Services Recipes: for Designing Expert Reports

While most users of SQL Server Reporting Services are now comfortable designing and building simple reports, business today demands increasingly complex reporting. In this book, top Reporting Services design experts have contributed step-by-step recipes for creating various types of reports.

Written by well-known SQL Server Reporting Services experts, this book gives you the tools to meet your clients’ needs. SQL Server Reporting Services enables you to create a wide variety of reports



Product Details

  • Paperback: 648 pages
  • Wrox (April 5, 2010)
  • Language: English
  • ISBN-10: 0470563117
  • ISBN-13: 978-0470563113

Free Download Links :

1. Hotfile Link
http://hotfile.com/...Reporting.Services.Recipes.Mar.2010.rar.html

2. Rapidshare Link
http://rapidshare.com/.../sqlseverreport.rar

3. Uploading Link
http://uploading.com/files/ef7aee72/sqlseverreport.rar/

If you like this post, please add your comments and 'A thanks' would be nice.

Thanks : ebookw.net

Share

Free ebook - Essential SQL on SQL Server 2008

Apr 7, 2010 Posted by Lara Kannan 0 comments
Dr. Sikha Bagui, Dr. Richard Earp, "Essential SQL on SQL Server 2008"

This book, written for readers who have little or no previous experience with databases, SQL, or SQL Server, provides a very systematic approach to learning SQL (Structured Query Language) using SQL Server.

Each chapter is written in a step-by-step manner and has examples that can be run using SQL Server. Using the sample tables and data provided, the reader of this book will be able to do all the examples to experience hands-on SQL programming in SQL Server. The text also presents a series of exercises at the end of the chapters to help readers gain proficiency with SQL.

With this book you will learn: Beginning SQL commands how to retrieve and manipulate data using the simple SELECT statement. How to customize SQL Server 2008 s settings and about SQL Server 2008 s functions. How to create, alter, populate and delete tables. About joins, a common database mechanism for combining tables.

Query development, the use of views and other derived structures. Simple set operations. About aggregate functions. How to write subqueries and correlated subqueries. How to create and use indexes and constraints. Transaction processing.



Product Details

  • Paperback: 300 pages
  • Jones and Bartlett Publishers, Inc
  • Language: English
  • ISBN-10: 076378138X

Free Download Links :

1. Hotfile Link
http://hotfile.com/.../076378138X.EBW.zip.html

2. Rapidshare Link
http://rapidshare.com/.../076378138X.EBW.zip.html

3. Mediafire Link
http://www.mediafire.com/?mlwz3unylg3

If you like this post, please add your comments and 'A thanks' would be nice.

Thanks : ebookw.net

Share