View previous topic :: View next topic
|
Author |
Message |
sivasaras
New User
Joined: 29 Sep 2007 Posts: 93 Location: chenna/i-
|
|
|
|
Hi,
My requirement is i want to delete the ids which are all having the value as FBN will be deleted from the table.
the varaible defined was a varchar value, so when i put the IF conditon it is not accepting and delete condition is going in loop
delete from table where fb_id = 'FBN'
please guide me
thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you post the problem code we may be able to help. NOT the entire program, just the bit about this delete. |
|
Back to top |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
Quote: |
delete from table where fb_id = 'FBN' |
This is an SQL statement and not a COBOL statement
It should come under EXEC SQL and END EXEC.
Since it is COBOL + DB2 it requires compile + Bind.
Refer DB2 Precompile-Compilation-Bind Process
Competitor site link deleted. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
you can't have both :
OR "it wasn't accepted" which I interprete as a (pre-)compile error
OR "the delete goes into a loop" : which is impossible. A delete may have a wrong accesspath and dependant children may have no index so it would seem the delete takes forever. but a delete that goes into a loop would be a major problem for IBM. |
|
Back to top |
|
|
|