I'm using sybase powerbilder12 IDE and mySQL.

I have a stored procedure like this: 

```
 DELIMITER //
  CREATE PROCEDURE CRTempTable(IN loc_code CHAR(6))
   BEGIN
    create temporary table mstparameter (select * from    mstparameter_consolidate where location_code = 'loc_code');
  END//
DELIMITER ;

```

I'm calling it in the powerbuilder12 like this:

```
DECLARE TempTBCRCall PROCEDURE FOR TempTableCR  
         location_code = :gs_location_code_mstparameter  ;
execute TempTBCRCall;

```

It gives me the error :

> 
> Stored procedure execution failure1054 SQLSTATE = S0022
> 
> 
> [MySQL][ODBC 5.2(a) Driver][mysqld-5.5.25a]Unknown column
>  'location\_code' in 'field list'... Error Code 0
> 
> 
> 

but `location_code` is there in my `mstparameter_consolidate` table. 

If I set to enter the `location_code` manually it works fine.