I want to write a stored procedure that will do the following-
accept 2 parameters,
return top records from table based on parameters, set field called 'in_use' on record to TRUE and then return the record selected to the calling application.
The problem with this is that the update query will not return a records, but the 'in_use' field must be set to TRUE at the same time as I return the record. This is to stop other people trying to access the same records.
The records all represent work requests, so we do not want more than 1 person working on the same request, hence the need for update and return.
Any advice will be greatly appreciated,
Graeme
website:
accept 2 parameters,
return top records from table based on parameters, set field called 'in_use' on record to TRUE and then return the record selected to the calling application.
The problem with this is that the update query will not return a records, but the 'in_use' field must be set to TRUE at the same time as I return the record. This is to stop other people trying to access the same records.
The records all represent work requests, so we do not want more than 1 person working on the same request, hence the need for update and return.
Any advice will be greatly appreciated,
Graeme
website: