in reply to Re^2: last_insert_id() in sybase
in thread last_insert_id() in sybase

Then all I can say at this point is what others have mentioned below, show us what you have that failed and what worked. :)

You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.