Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CF to renumber a SQL tinyint field

Status
Not open for further replies.

programmher

Programmer
May 25, 2000
235
US
Here is what I am attempting to do:

Users can add or delete inventory items to a SQL database. If the user adds 5 items and wants to delete item numbers 2 and 3 from their department order, the database KEEPS the original inventory item number instead of renumbering the remaining items.

Ex:
ItemNo ItemDesc Dept. Mgr
1 keyboards Inventory Control JJames
2 mouse pads Inventory Control JJames
3 speakers Inventory Control JJames
4 monitors Inventory Control JJames
5 mouse Inventory Control JJames

Delete items 2 and 3 and the table still shows the following:

1 keyboards
4 monitors
5 mouse

Instead of:

1 keyboards
2 monitors
3 mouse

I need Cold Fusion to re-sequence the tinyint item number field. How do I do this? (By the way, changing the database's data type is not an option...)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top