Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 11 to 15 of 15 total |
How do I call a SP more than 2 times with temporary table? |
Mon, Jun 16 2008 5:35 AM | Permanent Link |
"Tomas" | Thanks for the kind help.
But I can't add parameter without length of VARCHAR. Did you add it with code? "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message news:6D4086CE-CD56-4338-9F72-EF32816E2F04@news.elevatesoft.com... > Tomas > > > Look at the example I've posted in the extensions ng. All you need to do > is supply the SQL as input, or replace that with a VARCHAR in the bidy of > the SP. > > I know that ElevateDB will not overwrite a temporary table so you'll need > to get rid of it first if there's already a table of that name. > > I'd also just use VARCHAR rather than VARCHAR(32) - ElevateDB will then > allow any length from 1 to as long as a string can get. > > I also tried running your script in EDBManager (V2.01) > and, after changing test to one of my tables, it works. > > Roy Lambert > |
Mon, Jun 16 2008 5:44 AM | Permanent Link |
"Tomas" | I used wizard to create procedure. I have created procedure with sql editor.
PROCEDURE "Test" (IN "tablename" VARCHAR) BEGIN DECLARE stmt STATEMENT; PREPARE stmt FROM 'CREATE TEMPORARY TABLE "'+ tablename + '" AS SELECT * FROM samp WITH DATA'; EXECUTE stmt; END But there's still same error. It looks like I have done something stupid. "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message news:6D4086CE-CD56-4338-9F72-EF32816E2F04@news.elevatesoft.com... > Tomas > > > Look at the example I've posted in the extensions ng. All you need to do > is supply the SQL as input, or replace that with a VARCHAR in the bidy of > the SP. > > I know that ElevateDB will not overwrite a temporary table so you'll need > to get rid of it first if there's already a table of that name. > > I'd also just use VARCHAR rather than VARCHAR(32) - ElevateDB will then > allow any length from 1 to as long as a string can get. > > I also tried running your script in EDBManager (V2.01) > and, after changing test to one of my tables, it works. > > Roy Lambert > |
Mon, Jun 16 2008 6:22 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tomas
Very strange. As I said I loaded it into EDBManager here, changed test to one of my tables and it ran fine. Try using the procedure I posted into the extensions ng and see what happens. Roy Lambert |
Mon, Jun 16 2008 6:58 AM | Permanent Link |
"Tomas" | It works well. I'll find what is problem.
Thanks "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message news:F36950B9-4900-49CC-B82A-11401E62788F@news.elevatesoft.com... > Tomas > > > Very strange. As I said I loaded it into EDBManager here, changed test to > one of my tables and it ran fine. > > Try using the procedure I posted into the extensions ng and see what > happens. > > Roy Lambert > |
Mon, Jun 16 2008 7:59 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tomas
Rather than waste your time I'd just use that procedure if you want specific sql code embedded in the procedure just take SQLStatement out of the parameter list, DECLARE it and SET it to whatever you want. Roy Lambert [Team Elevate] |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
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 |