Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
a.ashabi
Posting Yak Master
117 Posts |
Posted - 2008-03-12 : 13:48:49
|
| Hi.PLZ help,Im new.I would like to write a SP that update my order_captured field to 1 when the order_status=7 in tbl_order.And the primary key is order_id.thanks |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2008-03-12 : 21:39:53
|
Create procedure pUpdateOrderCapturedField asUpdate tbl_order SET order_Captured = 1WHERE order_status = 7You can also do this as a trigger on the order_status column, but one step at a time.. Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
|
|
|