Click here to Skip to main content
15,912,329 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Query Pin
theCPkid6-Jul-09 22:48
theCPkid6-Jul-09 22:48 
QuestionT-SQL USE with a variable Pin
TheComputerMan6-Jul-09 4:55
TheComputerMan6-Jul-09 4:55 
AnswerRe: T-SQL USE with a variable Pin
Blue_Boy6-Jul-09 6:13
Blue_Boy6-Jul-09 6:13 
GeneralRe: T-SQL USE with a variable Pin
TheComputerMan6-Jul-09 6:42
TheComputerMan6-Jul-09 6:42 
GeneralRe: T-SQL USE with a variable Pin
Blue_Boy6-Jul-09 7:09
Blue_Boy6-Jul-09 7:09 
GeneralRe: T-SQL USE with a variable Pin
TheComputerMan6-Jul-09 21:51
TheComputerMan6-Jul-09 21:51 
GeneralRe: T-SQL USE with a variable Pin
DoctorMick7-Jul-09 2:04
DoctorMick7-Jul-09 2:04 
GeneralRe: T-SQL USE with a variable Pin
TheComputerMan7-Jul-09 3:25
TheComputerMan7-Jul-09 3:25 
I think I have found the answer - it don't work!!! Frown | :(

From Microsoft

Using EXECUTE with a Character String
In earlier versions of SQL Server, character strings are limited to 8,000 bytes. This requires concatenating large strings for dynamic execution. In SQL Server 2005, the varchar(max) and nvarchar(max) data types can be specified that allow for character strings to be up to 2 gigabytes of data.

Changes in database context last only until the end of the EXECUTE statement. For example, after the EXEC in this following statement is run, the database context is master.

USE master; EXEC ('USE AdventureWorks; SELECT EmployeeID, Title FROM HumanResources.Employee;');

Thanks very much for trying anyway! Smile | :)
QuestionBest Way to Sync SQL Srv Databases Pin
Pago0076-Jul-09 3:58
Pago0076-Jul-09 3:58 
AnswerRe: Best Way to Sync SQL Srv Databases Pin
DoctorMick6-Jul-09 6:23
DoctorMick6-Jul-09 6:23 
AnswerRe: Best Way to Sync SQL Srv Databases Pin
dingoishere23-Feb-11 22:30
dingoishere23-Feb-11 22:30 
QuestionSchema Question Pin
Paul Unsworth6-Jul-09 3:13
Paul Unsworth6-Jul-09 3:13 
AnswerRe: Schema Question Pin
DoctorMick6-Jul-09 6:24
DoctorMick6-Jul-09 6:24 
AnswerRe: Schema Question Pin
David Mujica6-Jul-09 10:23
David Mujica6-Jul-09 10:23 
GeneralRe: Schema Question Pin
Paul Unsworth6-Jul-09 21:42
Paul Unsworth6-Jul-09 21:42 
GeneralRe: Schema Question Pin
David Mujica7-Jul-09 2:57
David Mujica7-Jul-09 2:57 
GeneralRe: Schema Question Pin
Paul Unsworth7-Jul-09 3:14
Paul Unsworth7-Jul-09 3:14 
GeneralAlong with security, consider auditing Pin
David Mujica7-Jul-09 3:25
David Mujica7-Jul-09 3:25 
GeneralRe: Along with security, consider auditing Pin
Paul Unsworth7-Jul-09 4:28
Paul Unsworth7-Jul-09 4:28 
QuestionIF else or Case when Pin
Vimalsoft(Pty) Ltd6-Jul-09 2:34
professionalVimalsoft(Pty) Ltd6-Jul-09 2:34 
AnswerRe: IF else or Case when Pin
DoctorMick6-Jul-09 6:28
DoctorMick6-Jul-09 6:28 
GeneralRe: IF else or Case when Pin
Vimalsoft(Pty) Ltd6-Jul-09 19:58
professionalVimalsoft(Pty) Ltd6-Jul-09 19:58 
QuestionSelect null value Pin
yesu prakash6-Jul-09 2:20
yesu prakash6-Jul-09 2:20 
AnswerRe: Select null value Pin
Eddy Vluggen6-Jul-09 3:28
professionalEddy Vluggen6-Jul-09 3:28 
AnswerRe: Select null value Pin
Niladri_Biswas6-Jul-09 15:51
Niladri_Biswas6-Jul-09 15:51 

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.