I dont know if this is possible but thought why not ask around and see what answers are given. Using SQL 2005 or MySql does not matter which. What i would like to do is as follows:
I have a table with 3 fields, field 1 is known IMB code (varchar(45)), field 2 is success (int), field 3 is trayID (int).
When this would be it would obtain a string, then using this string it would search the database, when it found a match it would set success to a 1 for that row, and would retreive the value in field 3.
So it would be the equivalent of these two statements but it would be run as one statement
update table1 set success = 1 where IMB = {this}
Select from table1 trayid where IMB = {this}
so is there a way to combine these two transact statements into one so that it would update the database and select the trayid in the same transact?
If so how would this be done?
Thanks and have a great day.