Click here to Skip to main content
14,691,709 members
Home » Discussions » Database
   

Database

 
AnswerRe: How to do a select statement from two or more tables? PinPopular
Blue_Boy21-Jul-11 0:43
MemberBlue_Boy21-Jul-11 0:43 
GeneralRe: How to do a select statement from two or more tables? Pin
eight21-Jul-11 0:51
Membereight21-Jul-11 0:51 
GeneralRe: How to do a select statement from two or more tables? Pin
Blue_Boy21-Jul-11 1:58
MemberBlue_Boy21-Jul-11 1:58 
AnswerRe: How to do a select statement from two or more tables? Pin
Niladri_Biswas24-Jul-11 23:26
MemberNiladri_Biswas24-Jul-11 23:26 
General:-\ Select Pin
velmahesh20-Jul-11 19:22
Membervelmahesh20-Jul-11 19:22 
AnswerRe: What is Buffer Pool in SqlServer? Pin
Mycroft Holmes20-Jul-11 21:51
professionalMycroft Holmes20-Jul-11 21:51 
AnswerRe: What is Buffer Pool in SqlServer? Pin
Blue_Boy20-Jul-11 22:25
MemberBlue_Boy20-Jul-11 22:25 
GeneralRe: What is Buffer Pool in SqlServer? Pin
Shameel21-Jul-11 3:29
professionalShameel21-Jul-11 3:29 
GeneralRe: What is Buffer Pool in SqlServer? Pin
Blue_Boy21-Jul-11 3:44
MemberBlue_Boy21-Jul-11 3:44 
AnswerRe: What is Buffer Pool in SqlServer? Pin
PIEBALDconsult21-Jul-11 3:45
professionalPIEBALDconsult21-Jul-11 3:45 
QuestionSSRS 2005 Sub report issue (newbie) Pin
Paul E Davies19-Jul-11 2:07
MemberPaul E Davies19-Jul-11 2:07 
AnswerRe: SSRS 2005 Sub report issue (newbie) Pin
Paul E Davies21-Jul-11 1:27
MemberPaul E Davies21-Jul-11 1:27 
QuestionSQL Syntax Issue Pin
Frank Lepkowski18-Jul-11 4:04
MemberFrank Lepkowski18-Jul-11 4:04 
AnswerRe: SQL Syntax Issue Pin
Tim Carmichael18-Jul-11 4:13
MemberTim Carmichael18-Jul-11 4:13 
AnswerRe: SQL Syntax Issue Pin
AnnieMacD18-Jul-11 4:38
MemberAnnieMacD18-Jul-11 4:38 
QuestionDynamic Query Question Pin
Kevin Marois14-Jul-11 20:01
professionalKevin Marois14-Jul-11 20:01 
AnswerRe: Dynamic Query Question Pin
Blue_Boy14-Jul-11 21:54
MemberBlue_Boy14-Jul-11 21:54 
GeneralRe: Dynamic Query Question Pin
Kevin Marois15-Jul-11 6:34
professionalKevin Marois15-Jul-11 6:34 
GeneralRe: Dynamic Query Question Pin
smcnulty200015-Jul-11 23:31
Membersmcnulty200015-Jul-11 23:31 
AnswerRe: Dynamic Query Question Pin
smcnulty200014-Jul-11 22:53
Membersmcnulty200014-Jul-11 22:53 
Blue Boy is correct.
The 'why' of it is that the context has shifted. The exec runs inside of it's own little world that has no idea of what occurred outside of the @command string.

You can see a similar effect whenever you hit a 'go' statement. Variables become undeclared because the context has changed. The difference is that when you run an exec it doesn't break the context outside of the exec the way 'go' does.
_____________________________
Give a man a mug, he drinks for a day. Teach a man to mug...

AnswerRe: Dynamic Query Question Pin
dasblinkenlight15-Jul-11 18:00
Memberdasblinkenlight15-Jul-11 18:00 
AnswerRe: Dynamic Query Question Pin
PIEBALDconsult16-Jul-11 5:27
professionalPIEBALDconsult16-Jul-11 5:27 
JokeRe: Dynamic Query Question Pin
Mycroft Holmes16-Jul-11 14:06
professionalMycroft Holmes16-Jul-11 14:06 
GeneralRe: Dynamic Query Question Pin
S Douglas11-Aug-11 10:48
professionalS Douglas11-Aug-11 10:48 
GeneralRe: Dynamic Query Question Pin
PIEBALDconsult11-Aug-11 15:49
professionalPIEBALDconsult11-Aug-11 15:49 

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.