Re: ESQL/C problem
Posted in 1997
[ DECLARE CURSOR cursor1 [ SELECT * from <tbl_name> where <field1> = ? [ ORDER BY field2, field3, field4; [ [ OPEN CURSOR cursor1 using <value_for_field1>; [ [ while (1) [ { [ FETCH CURSOR cursor1 into <record_struct>; [ UPDATE <tbl_name> set <field1> = <new_value_for_field1> [ [ Now the problem: [ ---------------- [ The FETCH cursor returns some rows multiple times [ (the number of times is random). Even the occurence of [ reading the same row multiple times is random. [ [ Why and how could this be possible? [ Is there any way to overcome it? [ [ Thanks in advance. [ [ V Vijayakumar [ 14th Jan 1997 @ 1145 hrs [ [ Hi Vijay , I hope ur Select is not proper ...... U may have a join in ur select ...Since that join is not representing one-one co-relation , u are getting n*m ( car* product ) rows ..... Try the same select in isql and modify it ..... Best of luck ... -Peter. -- \\|||/ Have a nice time ... ( O-O ) *-----------------*-----------*--------.ooo0--(_)-0ooo.--------*--------* Residence : Office : No : 20, 9th Main Siemens Information ( Praveen Nivas ) Systems ltd Subedarapalya 29 , Infantry Road Yeswantpura Empire Infantry Building Bangalore - 22 Bangalore -1 560 022 560 001 Ph : 91-80-286 3547 / 48 286 2113 e-mail : mpeter.muc@sni.de .oooO ( ) Oooo. *-----------------*-----------*------------\\ (----( )---------*--------* \\_) ) / (_/