Click here to Skip to main content
14,660,349 members
Home » Discussions » Database
   

Database

 
QuestionSQL Syntax Issue Pin
Frank Lepkowski18-Jul-11 3:04
MemberFrank Lepkowski18-Jul-11 3:04 
AnswerRe: SQL Syntax Issue Pin
Tim Carmichael18-Jul-11 3:13
MemberTim Carmichael18-Jul-11 3:13 
AnswerRe: SQL Syntax Issue Pin
AnnieMacD18-Jul-11 3:38
MemberAnnieMacD18-Jul-11 3:38 
QuestionDynamic Query Question Pin
Kevin Marois14-Jul-11 19:01
professionalKevin Marois14-Jul-11 19:01 
AnswerRe: Dynamic Query Question Pin
Blue_Boy14-Jul-11 20:54
MemberBlue_Boy14-Jul-11 20:54 
GeneralRe: Dynamic Query Question Pin
Kevin Marois15-Jul-11 5:34
professionalKevin Marois15-Jul-11 5:34 
GeneralRe: Dynamic Query Question Pin
smcnulty200015-Jul-11 22:31
Membersmcnulty200015-Jul-11 22:31 
AnswerRe: Dynamic Query Question Pin
smcnulty200014-Jul-11 21:53
Membersmcnulty200014-Jul-11 21: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 17:00
Memberdasblinkenlight15-Jul-11 17:00 
AnswerRe: Dynamic Query Question Pin
PIEBALDconsult16-Jul-11 4:27
professionalPIEBALDconsult16-Jul-11 4:27 
JokeRe: Dynamic Query Question Pin
Mycroft Holmes16-Jul-11 13:06
professionalMycroft Holmes16-Jul-11 13:06 
GeneralRe: Dynamic Query Question Pin
S Douglas11-Aug-11 9:48
professionalS Douglas11-Aug-11 9:48 
GeneralRe: Dynamic Query Question Pin
PIEBALDconsult11-Aug-11 14:49
professionalPIEBALDconsult11-Aug-11 14:49 
GeneralRe: Dynamic Query Question Pin
S Douglas12-Aug-11 4:48
professionalS Douglas12-Aug-11 4:48 
GeneralRe: Dynamic Query Question Pin
PIEBALDconsult12-Aug-11 17:57
professionalPIEBALDconsult12-Aug-11 17:57 
GeneralRe: Dynamic Query Question Pin
S Douglas13-Aug-11 8:20
professionalS Douglas13-Aug-11 8:20 
GeneralRe: Dynamic Query Question Pin
PIEBALDconsult13-Aug-11 9:29
professionalPIEBALDconsult13-Aug-11 9:29 
GeneralRe: Dynamic Query Question Pin
S Douglas13-Aug-11 22:30
professionalS Douglas13-Aug-11 22:30 
GeneralRe: Dynamic Query Question Pin
PIEBALDconsult13-Aug-11 7:15
professionalPIEBALDconsult13-Aug-11 7:15 
QuestionUPDATE Multiple tables on one filed. [modified] Pin
Member 808202113-Jul-11 11:12
MemberMember 808202113-Jul-11 11:12 
AnswerRe: UPDATE Multiple tables on one filed. Pin
Blue_Boy13-Jul-11 23:29
MemberBlue_Boy13-Jul-11 23:29 
AnswerRe: UPDATE Multiple tables on one filed. Pin
Shameel14-Jul-11 0:09
professionalShameel14-Jul-11 0:09 
AnswerRe: UPDATE Multiple tables on one filed. Pin
smcnulty200014-Jul-11 22:39
Membersmcnulty200014-Jul-11 22:39 
AnswerRe: UPDATE Multiple tables on one filed. [modified] Pin
Niladri_Biswas18-Jul-11 2:12
MemberNiladri_Biswas18-Jul-11 2:12 
QuestionCalculate and display a progressive balance Pin
Rameez Raja11-Jul-11 20:48
MemberRameez Raja11-Jul-11 20:48 

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.