generating a product ID

P

Phil Teale

Hi,

I have written a db that tracks all the products in our warehouse. The
original parts list I was given assigned the part ID's in a seemingly
random manner. I would now like to change this by creating an ID from
the first 4 letters of the description, and append a number to the end
where there are duplicates.

I have written a function to do this - the index number of a part in
the table is passed to the function and it returns the new part ID,
the problem is that I don't know how to pass the index number to the
function if I use an update query to update the database. Any
suggestions?

TIA

Phil
 
Top