Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

-104 Format of INSERT statement in OS390 DB2 SQL

Status
Not open for further replies.

Tabz

Programmer
Jan 29, 2003
1
US
Hi,
I was wondering if you can use a select statement as one of the values in an INSERT statement when writing SQL for DB2 on the OS/390. Here is an example that give me a -104 SQL code saying ILLEGAL STATEMENT INTEGER:

INSERT INTO DDD1.PAYMENTS (EMPLOYERID , CITY , STATE , ZIP , TYPE , STATUS , ASSIGN_DATE , DUE_DATE ,
RECEIVER ) VALUES
(1,'COLU','AZ' , '29201', '9D', 'A' , CURRENT DATE , (CURRENT DATE + (SELECT INTEGER
(VALUE ) FROM DD1.DAT WHERE DAT_CD = 'AS09-D' ) DAYS ) , (SELECT USER_ID FROM DDD1.USER WHERE FUNC_AREA =
'ASN' AND ACCESS = 'FO' ) )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top