![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Thu, Apr 23 2009 7:36 AM | Permanent Link |
Dan | Can I change the database context in a script procedure?
Inside a script executed in context of database A, I want to create a table in another database B for example. Thanks. |
Thu, Apr 23 2009 10:28 AM | Permanent Link |
Fernando Dias ![]() | Dan,
> Can I change the database context in a script procedure? In a script, yes; in a stored procedure, no. > Inside a script executed in context of database A, I want to create a > table in another > database B for example. In a script or job, you can close the currently opened databse and open a new one with the USE statement, like this: ... USE B; EXECUTE IMMEDIATE 'CREATE TABLE X .... '; USE A; ... -- Fernando Dias [Team Elevate] |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |