fwstealer
asked on
update specific rows and fields
I've got a series of fields that need to be updated:
citypairs,pic,sic,tailno,f lightlog,n oreceiptsa ttached,no fuelcards
and shift the data over to the left by 1 for rows with id range between:
2541 - 2548
532 - 2538
and set nofuelcards as null
i did this sql query - worked for one row
update table set citypairs = pic from table where id = 2540
update table set pic = sic from table where id = 2540
update table set sic = tailno from table where id = 2540
update table set tailno = flightlog from table where id = 2540
update table set flightlog = noreceiptsattached from table where id = 2540
update table set noreceiptsattached = nofuelcards from table where id = 2540
update table set nofuelcards = null from table where id = 2540
how would i get it to go through a series of specified rows?
citypairs,pic,sic,tailno,f
and shift the data over to the left by 1 for rows with id range between:
2541 - 2548
532 - 2538
and set nofuelcards as null
i did this sql query - worked for one row
update table set citypairs = pic from table where id = 2540
update table set pic = sic from table where id = 2540
update table set sic = tailno from table where id = 2540
update table set tailno = flightlog from table where id = 2540
update table set flightlog = noreceiptsattached from table where id = 2540
update table set noreceiptsattached = nofuelcards from table where id = 2540
update table set nofuelcards = null from table where id = 2540
how would i get it to go through a series of specified rows?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.