on-internet
← Community

Embedded SQL - SELECT INTO

Stack Overflow ·

While working on a production issue, I stumbled on something, that I thought was, strange in a SELECT statement in PB. Essentially, I have a simple SQL that selects into a Variable. I guess, the original developer (I am only maintaining this code) expected only one row in this case. .... // Date ld_CutOff .... SELECT TO_DATE(PARM_VALUE, 'DD-MON') INTO :ld_CutOff FROM SYSPARM WHERE PARM_NAME = 'CUTOFF_DATE' ; .... Now the table has more than 1 that match the criteria. Thus, the SQL errored (Select Returned more than 1 row) as expected. (Based on prior experience in PB and PL/SQL,) I expected th

Comments

Sign in or sign up to comment and upvote.

No comments yet.