RATE THIS ANSWER
0
Click to Vote:
0
0
Hay Other Phil
INSERT INTO MYLIBRARY/TEMPF0101 SELECT * FROM DATALIB/F0101 WHERE ABAC02=’ABC’
This format request that you fill all fields of TEMPF0101 in order with fields from the select statement
Paul Conte pg 122 adds a field list -- only field1,2,3 will be populated -- others default or null.
Insert into file1 (field1, field2, field3)
Select xfield1, xfield2, xfield3 from xfile where ....
Hope this helps
Phil
EXCELLENT!
I just check the SQLCOD for problems.
0000 = no problems.
0100 = no rows satisfy the statement.
Now, some where in the SQL Communications area is the number of records processed.
Any Ideas?
The Other Phil
=======================
Phil
Great question -- how would I solve it
Add H debug(*YES) and right after the sql command put Dump
You should see the anwer somewhere in the SQL stuff in the Dump
Let me know the answer.
The other Phil -- go Cards
=======================
Good idea.
I have most of the above code in a sub-procedure I use to check the SQLCOD status after I exec a statement.
And the winner is:
SQLERRD(3)
The number of rows updated, inserted, or deleted by SQL.
Handling SQL error return codes using the SQLCA /A]
The Other Phil
Cards? WHO?