View previous topic :: View next topic
|
Author |
Message |
maverick05
New User
Joined: 14 Apr 2005 Posts: 54 Location: Earth
|
|
|
|
Hi,
I have a field x as the last field in my copybook.Can i declare the cursor including this field and can i miss this field x in the fetch query?
After fetching iam inserting the fetched row (after some formatting) into the database.Remember all the fields are populated and inserted to database except field X.
I didn't get any error when compiled my Db2-cobol program.But i feel there is a chance that junk value might be updated in datatbase although we didn't touch this field.
Please provide your suggestions |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Maybe it is just terminology, but i do not understand how you can insert a row you just fetched If you fetched it, it was previously inserted and cannot be re-inserted.
If you clarify your request, we may be able to offer suggestions. |
|
Back to top |
|
|
maverick05
New User
Joined: 14 Apr 2005 Posts: 54 Location: Earth
|
|
|
|
After formatting of the fetched row,i am inserting it.I had mentioned this already in the brackets |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The way you have worded your process is misleading (at least). Yes, i saw what you put in brackets.
To repeat, if a row has been fetched it cannot be inserted. It is already in the table.
If you believe you can insert an existing row, please explain how this might happen. If you mean something else, please clarify.
Keep in mind that you clearly know what you mean, but it is not clear to others who read your info. |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
You can always use column names while inserting values into the table why do you need to insert the value for field x. I hope you know the syntax which goes something like INSERT COLUMN NAME/S VALUES(...) INTO TABLE NAME |
|
Back to top |
|
|
|