Click here to Skip to main content
15,924,935 members
Home / Discussions / Database
   

Database

 
QuestionRestore SQL Server UNC Pin
oskardiazdeleon8-Sep-06 14:43
oskardiazdeleon8-Sep-06 14:43 
AnswerRe: Restore SQL Server UNC Pin
Colin Angus Mackay10-Sep-06 9:38
Colin Angus Mackay10-Sep-06 9:38 
QuestionConverting JET to SQL Database Pin
Nick C.8-Sep-06 7:44
Nick C.8-Sep-06 7:44 
AnswerRe: Converting JET to SQL Database Pin
Stephen McGuire8-Sep-06 9:06
Stephen McGuire8-Sep-06 9:06 
Questionfew queries in Stored procedures Pin
ParagGupta8-Sep-06 4:57
ParagGupta8-Sep-06 4:57 
AnswerRe: few queries in Stored procedures Pin
Stephen McGuire8-Sep-06 9:12
Stephen McGuire8-Sep-06 9:12 
GeneralRe: few queries in Stored procedures Pin
Stephen McGuire10-Sep-06 16:18
Stephen McGuire10-Sep-06 16:18 
AnswerRe: few queries in Stored procedures Pin
Colin Angus Mackay10-Sep-06 9:34
Colin Angus Mackay10-Sep-06 9:34 
ParagGupta wrote:
Q.1 what is function of GO in SP's?


In contrast to what the other poster has said GO has nothing to do with stored procedures. It is simply a preprocessor command given in Query Analyzer (and you can set Query Analyzer to accept other things in place of GO if you prefer). It is not part of the T-SQL language.

GO tells Query Analyzer where to split the script into batches. Each batch is executed on the SQL Server in sequence, but without reference to any batch that came before it in the script. In other words if you DECLARE a variable in one batch, you cannot see it in the next.

With regard to Stored Procedures, there is no way to tell SQL Server that where the end of the stored procedure is. It must therefore come last in a batch and Query Analyzer will delimit the end of the stored procedure with the GO keyword.

ParagGupta wrote:
Q.2 If we have to use nested queries then how far we can go


No idea - I've gone 4 deep in one query, but if you are going that deep you might want to rethink your strategy. About 6 months after I wrote that 4-deep query I refactored it to use temporary tables instead, and the query went from taking about 20 minutes to 7 seconds. There is only so much the SQL Server query optimiser can cope with.


AnswerRe: few queries in Stored procedures Pin
Uma Kameswari10-Sep-06 20:49
Uma Kameswari10-Sep-06 20:49 
AnswerRe: few queries in Stored procedures Pin
Amit Kumar G12-Sep-06 16:35
Amit Kumar G12-Sep-06 16:35 
QuestionHow can I set the output format of "FOR XML"? Pin
Red_Wizard_Shot_The_Food8-Sep-06 2:56
Red_Wizard_Shot_The_Food8-Sep-06 2:56 
AnswerRe: How can I set the output format of "FOR XML"? Pin
Tushar Kothari11-Sep-06 3:51
Tushar Kothari11-Sep-06 3:51 
QuestionHow to install the Postgre SQL using Silent Mode in Windows 2000? Pin
Arul Joseph8-Sep-06 0:52
Arul Joseph8-Sep-06 0:52 
Questionxp_smtp_sendmail/xpsmtp80.dll Pin
Arghya_mp7-Sep-06 23:55
Arghya_mp7-Sep-06 23:55 
QuestionRegarding Cursor Pin
param thaker7-Sep-06 23:05
param thaker7-Sep-06 23:05 
AnswerRe: Regarding Cursor Pin
Stephen McGuire8-Sep-06 9:23
Stephen McGuire8-Sep-06 9:23 
QuestionDatabase for Java [modified] Pin
eMtek7-Sep-06 20:33
eMtek7-Sep-06 20:33 
AnswerRe: Database for Java Pin
Dominic Pettifer8-Sep-06 2:36
Dominic Pettifer8-Sep-06 2:36 
QuestionParameterized Queries in the SELECT portion? Pin
Dominic Pettifer7-Sep-06 13:51
Dominic Pettifer7-Sep-06 13:51 
AnswerRe: Parameterized Queries in the SELECT portion? Pin
Not Active7-Sep-06 18:53
mentorNot Active7-Sep-06 18:53 
GeneralRe: Parameterized Queries in the SELECT portion? Pin
Dominic Pettifer8-Sep-06 2:31
Dominic Pettifer8-Sep-06 2:31 
GeneralRe: Parameterized Queries in the SELECT portion? Pin
Colin Angus Mackay10-Sep-06 9:27
Colin Angus Mackay10-Sep-06 9:27 
Questionupdating an IMAGE column Pin
jszpila7-Sep-06 5:15
jszpila7-Sep-06 5:15 
AnswerRe: updating an IMAGE column Pin
Michael Potter7-Sep-06 5:50
Michael Potter7-Sep-06 5:50 
Questioncombining multiple rows into single column Pin
Uma Kameswari7-Sep-06 2:32
Uma Kameswari7-Sep-06 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.