SET ECHO ON
SET VERIFY ON
ACCEPT CNUMBER CHAR PROMPT 'CUSTOMER NUMBER == '
ACCEPT PNUMBER CHAR PROMPT 'PART NUMBER == '
ACCEPT OD date format 'YYYYMMDD' PROMPT 'ORDER DATE == '
DELETE FROM ORDERS WHERE CNUM = &CNUMBER AND PNUM = &PNUMBER AND ORDERDATE = to_date(&OD,'YYYYMMDD');
PROMPT Done.
--DELETE FROM ORDERS WHERE CNUM = 'C111' AND PNUM = 'M001' AND ORDERDATE = to_date(20130401,'YYYYMMDD');
OUTPUT:
SQL> DELETE FROM ORDERS
2 WHERE CNUM = &CNUMBER AND PNUM = &PNUMBER AND ORDERDATE = to_date(&OD,'YYYYMMDD');
old 2: WHERE CNUM = &CNUMBER AND PNUM = &PNUMBER AND ORDERDATE = to_date(&OD,'YYYYMMDD')
new 2: WHERE CNUM = C111 AND PNUM = M001 AND ORDERDATE = to_date(20130404,'YYYYMMDD')
WHERE CNUM = C111 AND PNUM = M001 AND ORDERDATE = to_date(20130404,'YYYYMMDD')
*
ERROR at line 2:
ORA-00904: "M001": invalid identifier
Whats wrong??