hi everyone,
i'm trying to increment a previous value in a table and then insert in the same column when the query is executed. for example:
number description
6001 blah blah blah
6002 ..... <---last and largest existing value in table
<END OF TABLE>
i want 6003 to be inserted in to the field after being incremented when the query is executed so when the query is executed the next row would be..
number description
6001 blah blah blah
6002 ...........
6003 blah blah blah <--- new number to use
i tried to use an update stmt but it replaced the previous value. i want it to keep a record of the other values but just insert the new incremented value.
i tried
update office_code
set number = number + 1
of course it didn't work
any suggestions? thanks in advance if u do,
angel
i'm trying to increment a previous value in a table and then insert in the same column when the query is executed. for example:
number description
6001 blah blah blah
6002 ..... <---last and largest existing value in table
<END OF TABLE>
i want 6003 to be inserted in to the field after being incremented when the query is executed so when the query is executed the next row would be..
number description
6001 blah blah blah
6002 ...........
6003 blah blah blah <--- new number to use
i tried to use an update stmt but it replaced the previous value. i want it to keep a record of the other values but just insert the new incremented value.
i tried
update office_code
set number = number + 1
of course it didn't work
any suggestions? thanks in advance if u do,
angel