*** Failure 3812 The positional assignment list has too few values.

Database
Fan

*** 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?
2 REPLIES

Re: *** Failure 3812 The positional assignment list has too few values.

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
Enthusiast

Re: *** Failure 3812 The positional assignment list has too few values.

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.