Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General Discussion » View Thread |
Messages 1 to 3 of 3 total |
What is wrong with this script? |
Fri, Oct 5 2012 12:43 PM | Permanent Link |
Abdulaziz Al-Jasser | Hi,
I have two databases: 1- "MyDatabase" which is a local database. 2- "RAM" which a memory database. I wrote a ascript which will be run later inside a job but I get an error in the fourth line (CREATE TABLE "RAM"."Invoices" AS)! This my script: SCRIPT BEGIN EXECUTE IMMEDIATE 'CREATE TABLE "RAM"."Invoices" AS SELECT * FROM MyDatabase.TB_Invoices WHERE BranchSysNo = 1 AND InvoiceType = 0 WITH DATA'; -------------------------------------------------------- EXECUTE IMMEDIATE 'EXPORT TABLE RAM.Invoices TO "Invoices.txt" IN STORE "LocalStore"'; -------------------------------------------------------- EXECUTE IMMEDIATE 'DROP TABLE RAM.Invoices'; -------------------------------------------------------- --EXECUTE IMMEDIATE ' --COPY FILE "Invoices.txt" IN STORE "LocalStore" --TO "Invoices.txt" IN STORE "RemoteStore"'; -------------------------------------------------------- -------------------------------------------------------- -------------------------------------------------------- EXECUTE IMMEDIATE 'CREATE TABLE "RAM"."Sales" AS SELECT * FROM MyDatabase.TB_Sales WHERE BranchSysNo = 1 WITH DATA'; -------------------------------------------------------- EXECUTE IMMEDIATE 'EXPORT TABLE RAM.Sales TO "Sales.txt" IN STORE "LocalStore"'; -------------------------------------------------------- EXECUTE IMMEDIATE 'DROP TABLE RAM.Sales'; -------------------------------------------------------- --EXECUTE IMMEDIATE ' --COPY FILE "Sales.txt" IN STORE "LocalStore" --TO "Sales.txt" IN STORE "RemoteStore"'; -------------------------------------------------------- Any idea what is wrong? Regards, Abdulaziz Jasser |
Fri, Oct 5 2012 1:37 PM | Permanent Link |
Uli Becker | Abdulaziz,
> I wrote a ascript which will be run later inside a job but I get an error in the fourth line (CREATE TABLE "RAM"."Invoices" AS)! This my script: Though you don't post the exact error message (why not?), I guess you got this error: Invalid expression . found, schema qualifier not allowed Your syntax is wrong. Use this instead: SCRIPT BEGIN USE "RAM"; EXECUTE IMMEDIATE 'CREATE TABLE "Invoices" AS SELECT * FROM MyDatabase.TB_Invoices WHERE BranchSysNo = 1 AND InvoiceType = 0 WITH DATA'; ... END Uli |
Fri, Oct 5 2012 2:15 PM | Permanent Link |
Abdulaziz Al-Jasser | Uli,
<<Though you don't post the exact error message (why not?), I guess you got this error: Invalid expression . found, schema qualifier not allowed Your syntax is wrong.>> You are totally right. Thanks for the help. Regards, Abdulaziz Jasser |
This web page was last updated on Monday, May 6, 2024 at 03:23 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |