Hi Joe,

> I want to create a stored procedure that I pass a date variable and two
> database names.  I can not seem to figure the correct syntax to utilize
> these variables in the procedure.  I think I might need to build a
> sqlstring and use an exec command to execute the string.  Here is my
> procedure code:
>
> # requires a table of paths called paths;
>
> create procedure calclmp(in startdate date, in db1 varchar(32), in db2
> varchar(32) );
> begin
> drop table if exists DB1.lmp_daily, DB1.t6, DB1.tmp_month_hr;
> create table DB1.lmp_daily like DB2.pjm_lmp_daily;

Unless you have a database named "DB1", I think the above will
fail - as far as I know, you cannot use variables/parameters like
that.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to