Click here to Skip to main content
15,893,161 members
Home / Discussions / Database
   

Database

 
AnswerRe: Database Update issue Pin
Wendelius16-Nov-08 18:01
mentorWendelius16-Nov-08 18:01 
AnswerRe: Database Update issue Pin
Vimalsoft(Pty) Ltd17-Nov-08 20:05
professionalVimalsoft(Pty) Ltd17-Nov-08 20:05 
QuestionUsing Between Condition in CASE Statement Pin
dboy22116-Nov-08 8:07
dboy22116-Nov-08 8:07 
AnswerRe: Using Between Condition in CASE Statement Pin
Wendelius16-Nov-08 9:55
mentorWendelius16-Nov-08 9:55 
GeneralRe: Using Between Condition in CASE Statement Pin
dboy22116-Nov-08 12:21
dboy22116-Nov-08 12:21 
GeneralRe: Using Between Condition in CASE Statement Pin
Wendelius16-Nov-08 12:37
mentorWendelius16-Nov-08 12:37 
QuestionProblem with cursor for all databases Pin
angel domon16-Nov-08 0:58
angel domon16-Nov-08 0:58 
AnswerRe: Problem with cursor for all databases Pin
Wendelius17-Nov-08 7:17
mentorWendelius17-Nov-08 7:17 
Didn't go through all the code, but at least it seems that you are using exec in parts. First when you change the database using exec, the change is valid only in the context where it's executed. Later on when you execute a procedure, the context is back in the original (master).

So you should build the execution string as a whole and then execute it. Something like:
@sqltext = 'USE CorrectDataBase; EXEC sp_...'
EXEC (@sqltext)

Hope this helps you forward,

Mika

The need to optimize rises from a bad design.

My articles[^]

QuestionReorder numeric column Pin
AlexeiXX315-Nov-08 11:05
AlexeiXX315-Nov-08 11:05 
AnswerRe: Reorder numeric column Pin
AlexeiXX315-Nov-08 11:26
AlexeiXX315-Nov-08 11:26 
GeneralRe: Reorder numeric column Pin
Blue_Boy15-Nov-08 12:15
Blue_Boy15-Nov-08 12:15 
GeneralRe: Reorder numeric column Pin
AlexeiXX315-Nov-08 13:06
AlexeiXX315-Nov-08 13:06 
GeneralRe: Reorder numeric column Pin
Mycroft Holmes15-Nov-08 23:03
professionalMycroft Holmes15-Nov-08 23:03 
AnswerRe: Reorder numeric column Pin
Wendelius15-Nov-08 22:22
mentorWendelius15-Nov-08 22:22 
QuestionDeny Access through Enterprise Manager Pin
v1i9n6o7d14-Nov-08 19:37
v1i9n6o7d14-Nov-08 19:37 
AnswerRe: Deny Access through Enterprise Manager Pin
Wendelius14-Nov-08 22:03
mentorWendelius14-Nov-08 22:03 
QuestionRolling Sums Pin
StevenWalsh14-Nov-08 9:46
StevenWalsh14-Nov-08 9:46 
AnswerRe: Rolling Sums Pin
StevenWalsh14-Nov-08 10:19
StevenWalsh14-Nov-08 10:19 
AnswerRe: Rolling Sums Pin
Wendelius14-Nov-08 10:19
mentorWendelius14-Nov-08 10:19 
QuestionCreating a dynamic date parameter in a SQL Reporting Services subscription Pin
Mike Devenney14-Nov-08 8:46
Mike Devenney14-Nov-08 8:46 
AnswerRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Wendelius14-Nov-08 8:50
mentorWendelius14-Nov-08 8:50 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Mike Devenney14-Nov-08 9:23
Mike Devenney14-Nov-08 9:23 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Wendelius14-Nov-08 9:36
mentorWendelius14-Nov-08 9:36 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Mike Devenney14-Nov-08 9:38
Mike Devenney14-Nov-08 9:38 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Wendelius14-Nov-08 9:55
mentorWendelius14-Nov-08 9:55 

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.