Try codes like the following (not tested):
Dim a,b as integer
Dim field1 as string, field2 as float 'Two columns in your table

a=10 'Assuming the 10th row
b=a-1
Fetch rec b from yourtable 'yourtable is already opened
field1=yourtable.col(1)
field2=yourtable.col(2)
Fetch rec b from yourtable
update table yourtable set col1=field1,col2=field2

Regards,
Genong


-----Original Message-----
From: Peter Hollebeek <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, January 18, 1999 10:11 AM
Subject: MI Update row with the one before


>Dear Mappers,
>
>How can to update a row with data from the row before?
>Like?
>"Update Table "name" Set col_a = col_b Where rowid.col_b=rowid.col_a-1"
>Thanks
>Peter
>
>
>----------------------------------------------------------------------
>To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
>"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
>
BEGIN:VCARD
VERSION:2.1
N:Yu;Genong
FN:Genong Yu
ORG:Landi Information System
TITLE:Director
TEL;WORK;VOICE:+86 28 4791023
TEL;HOME;VOICE:+86 28 4791023
TEL;WORK;FAX:+86 28 4791023
TEL;HOME;FAX:+86 28 4791023
ADR;WORK:;+86 28 4504161;Sichuan Academy of Agricultural Sciences, Jingjusi 20;Chengdu;Sichuan;610066;P.R.China
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:+86 28 4504161=0D=0ASichuan Academy of Agricultural Sciences, Jingjusi 20=
=0D=0AChengdu, Sichuan 610066=0D=0AP.R.China
ADR;HOME;ENCODING=QUOTED-PRINTABLE:;;Apartment 23-1-3, Jingjusi 20=0D=0A;Chengdu;Sichuan;610066;P.R.China
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Apartment 23-1-3, Jingjusi 20=0D=0A=0D=0AChengdu, Sichuan 610066=0D=0AP.R.Ch=
ina
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:19990119T145026Z
END:VCARD

Reply via email to