All Forums Database
ninnu 2 posts Joined 02/05
10 Feb 2005
*** Failure 3812 The positional assignment list has too few values.

i got the below error:*** Failure 3812 The positional assignment list has too few values.what does that mean?

nduckste 1 post Joined 02/07
12 Sep 2007

I'm getting the same error. This is my first proc so I'm just trying to get the syntax down. Why would the code below generate this error:REPLACE PROCEDURE EDW_OPENSEAS_LOAD_WORK.Get_EASI_2003_Demographic ( IN postal_code INTEGER, OUT county VARCHAR(30) )BEGIN SELECT EASI_County_Name INTO county FROM EDWDEMOGRAPHIC.EASI_2003_Demographic WHERE EASI_ZIP_Code = postal_code;END;To execute/call the above Stored Procedure:CALL EDW_OPENSEAS_LOAD_WORK.Get_EASI_2003_Demographic (98133);

rgs 106 posts Joined 02/07
12 Sep 2007

nduckste,Your stored procedure has an OUT argument. You can’t just ignore it when you call the stored procedure. Depending on whether you are using ODBC, JDBC CLIv2 will determine how you set up the out parameter specifications. If you are using BTEQ your can write:CALL EDW_OPENSEAS_LOAD_WORK.Get_EASI_2003_Demographic (98133, county);For embedded SQL in JDBC, for example, you need to specify a “?” as a placeholder in order to prepare the statement. See the SQL documentation on the CALL statement, for more details.

You must sign in to leave a comment.