July 27, 2005 at 8:15 am
Hi,
I am getting confuse with the logic of this query. I have to creat procedure that will insert in to different table with same id number but different modfication or repair number which is automatically increased!! such as!!
from the front end application in C# it select the multiple item and created order and repair on it! and then after submittion it needs to go in detail and repair table!! how can i send it like that!!
Thanks
July 27, 2005 at 8:23 am
It's hard to follow what you want, some examples would help us to understand the problem better. But let me take a guess....
You have a table, let's call it WORK...it has some columns, but two important ones ID and Created_Date (or something like that). A work order is created and 'sits' in the WORK table. When the repair is done, it needs to be 'moved' (does the original stay in the WORK table or is it deleted?) to the REPAIRED table. The REPAIRED table has the same ID number, but also has Details about the repair job. Is that what you need?
Does it have to be via a stored procedure? If not, I would create a column in WORK that is BIT datatype, called Repaired. Then create a TRIGGER that when the WORK.Repaired column is changed to Yes, the information matching that ID is moved to the REPAIRED table.
-SQLBill
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply