I need to ask the user for a variable, use that variable in a SELECT statement, and then use that same variable in an INSERT statement. Right now I am just trying to get using the variable for an INSERT to work:
var num NUMBER(10)
exec num := &ExpNum
INSERT INTO ExpDet
VALUES(num, &LineNum, &Descrip, &Amt, &HCode, &SubCode)
When I run this, I get an error saying
Bind variable 'num' is not declared.
Do I have the right idea here, or do I need to use some other method entirely?