Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
Specify Database in Job |
Thu, Jul 2 2009 3:49 PM | Permanent Link |
"Ivan Sine" | How do I specify that "only" the tables from the database "Assessors" get
exported. Right now the script exports system tables. SCRIPT BEGIN DECLARE DBCursor CURSOR FOR DBStmt; DECLARE TblName VARCHAR DEFAULT ''; PREPARE DBStmt FROM 'SELECT Name FROM Information.Tables'; OPEN DBCursor; FETCH FIRST FROM DBCursor (Name) INTO tblName; WHILE NOT EOF(DBCursor) DO EXECUTE IMMEDIATE 'EXPORT TABLE "' + TblName + '" TO "' + TblName + '.csv" IN STORE "Exports"'; FETCH NEXT FROM DBCursor (Name) INTO TblName; END WHILE; CLOSE DBCursor; END |
Thu, Jul 2 2009 7:45 PM | Permanent Link |
Fernando Dias Team Elevate | Ivan,
You may use the USE statement to open the "Assessors" database: SCRIPT BEGIN DECLARE DBCursor CURSOR FOR DBStmt; DECLARE TblName VARCHAR DEFAULT ''; USE "Assessors" ; PREPARE DBStmt FROM 'SELECT Name FROM Information.Tables'; ... CLOSE DBCursor; USE ; END You can find more information about this statement here: http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=13&topic=234 -- Fernando Dias [Team Elevate] |
Fri, Jul 3 2009 9:48 AM | Permanent Link |
"Ivan Sine" | Thanks!
|
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |