By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
As a result of this query, I get an SQL code of: -199 Insert not expected. How can I do this?
with recursive appidrange ( start, end) as (select 4500000, max(apptid) from coprddb3/corcvaptp), allIds (apptidlist, endid) as ( select start as apptidlist, end as endid from appidrange union all select existing_row.apptidlist + 1 existing_row.endid from allIds existing_row where existing_row.apptidlist +1 <= existing_row.endid), missingIds as ( select apptidlist from allids except select apptid from coprddb3/corcvaptp as temp) insert into jgriffin/apptids select * from missingIds;
INSERT INTO out_table WITH my_cte (m1,m2) AS (SELECT absval(col1), absval(col2) FROM my_table ) SELECT m1, m2 FROM my_cte;
Dig Deeper on iSeries SQL commands and statements
Related Q&A from Kent Milligan
To solve the SQL error -321 on IBM i6.1, use the new values statement to overcome the error. If you are using an older release, declare a cursor ...continue reading
To monitor members stuck within a physical file on AS/400, you can periodically use the display file description (DSPFD) command to create an output ...continue reading
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.