>create cursor newValues (PK I, WEEK_NO I, WEEK_FR I, WEEK_TO i) >insert into newValues from array aSchedule > >update myTable set ; > WEEK_NO = src.WEEK_NO, ; > WEEK_FR = src.WEEK_FR, ; > WEEK_TO = src.WEEK_TO ; >from newValues src ; >where myTable.PK = src.PK; >>
>select myTable >local ix, oData >for ix = 1 to m.loData.Rows > oData = m.loData.Data[m.ix] > if seek(m.oData.PK, 'myTable', 'PK') and ; > ( m.oData.WEEK_NO != myTable.WEEK_NO or ; > m.oData.WEEK_FR != myTable.WEEK_FR or ; > m.oData.WEEK_TO != myTable.WEEK_TO ) > gather name m.oData > endif >endfor >>
>>*-- cursor >>*-- strucutre >>column value >>*-- record 1 >>PK 333 >>WEEK_NO 12 >>WEEK_FR 1 >>WEEK_TO 52 >>*-- record 2 >>PK 4 >>WEEK_NO 45 >>WEEK_FR 2 >>WEEK_TO 23 >>*-- and so on >> >>*-- array >>local array aSchedule[2,4] >>*-- element 1 >>aSchedule[1,1] = 333 && corresponding to the column PK in the cursor >>aSchedule[1,2] = 3 && corresponding to the column WEEK_NO in the cursor >>aSchedule[1,3] = 1 && corresponding to the column WEEK_FR in the cursor >>aSchedule[1,4] = 45 && corresponding to the column WEEK_TO in the cursor >>*-- element 2 >>aSchedule[1,1] = 4 && corresponding to the column PK in the cursor >>aSchedule[1,2] = 3 && corresponding to the column WEEK_NO in the cursor >>aSchedule[1,3] = 1 && corresponding to the column WEEK_FR in the cursor >>aSchedule[1,4] = 45 && corresponding to the column WEEK_TO in the cursor >>>>