Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
Change database context |
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 Team Elevate | 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 Tuesday, May 7, 2024 at 02:40 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |