QMF issue
80 pts.
0
Q:
QMF issue
I have my QMF for windows version 8.1 Fix Pack 13, and I try to run this instruction

INSERT INTO destination table SELECT * FROM origin table

and every time I receive this error message:

An error occurred while running the query.
destrination table not valid for operation.
(SQL code = -7008, SQL state = 55019)

If I try by selecting each field like the next sentence

INSERT INTO destination table(field 1, field2, ...,field n)
SELECT field1, field2, ........., field n FROM origin table

the error is this:

An error occurred while running the query.
Value cannot be specified for GENERATED ALWAYS column field1.
(SQL code = -798, SQL state = 428C9)

But the most interesting thing is that each one of this sentences works perfectly everytime in my AS/400( SQL) session, and I would like to know the reason, do I have to change my QMF? or everytime that I need to run a sql sentence forgot that I have QMF? or QMF is not the right tool to run a sql sequence? or simply, QMF is worthless?, please advise me in this matter
I would like to continue beliving and using QMF

Another question, is there a better product to use intead of QMF, somethig that allows me to debug my sql intructions?

Thanks for your advise
ASKED: Jun 2 2008  9:28 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
7525 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Try adding OVERRIDING SYSTEM VALUE here:
INSERT INTO destination table OVERRIDING SYSTEM VALUE  SELECT * FROM origin table

Without knowing more than what you show, it's hard to be about exact syntax or even if it's appropriate. There's no way to be sure that the schemas match up between QMF and interactive SQL, nor if the same user is involved, nor if there are session settings that are set, nor almost anything else.

Given this error -- Value cannot be specified for GENERATED ALWAYS column field1. -- it's hard to accept that the two scenarios, QMF and interactive SQL, are operating on the same table with the same statements unless the two sessions are configured differently.

Tom
Last Answered: Oct 31 2009  1:40 AM GMT by TomLiotta   7525 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TomLiotta   7525 pts.  |   Oct 31 2009  1:43AM GMT

As for the second question, I don’t know of anyone who uses QMF to test SQL against a DB2 for System i database; so I can’t offer an opinion on how appropriate it is. I would simply use System i Navigator ( or whichever Navigator matches in your site.)

Tom

 
0