sql trigger

Sep 28, 2006 15 Replies

A while back Rob was kind enough to share a trigger he developed to update the items reorder number when one was entered on a PO. This trigger works great, but would it be possible to write another trigger that would also update the items alias when a reorder number is entered on a PO? Any help would be appreciated as this would close a big gap in automating the process. Craig


begin 666 Update_PurchaseOrderEntry_OrderNumber.txt M0U)%051%(%1224='15(@6W5T

Craig, would you please email the SQL Trigger that you refer to, to me? I monitor all 3 newgroups on a daily basis and missed this discussion.

Thanks,

Kinnard L. Kohler Business Machines Systems

6101 South Shackleford Road Little Rock, AR 72204-8606 (T) 501-375-8380 (F) 501-375-0043 (Cell) 501-412-5686 Email: snipped-for-privacy@bmsar.com

"Craig" wrote:

Kinnard,

You mentioned 3 newsgroups - i monitor two - the Dynamics public newsgroup for RMS and the Partnersource Managed forum for RMS - which one am i missing

Cheers

Marc Wilkinson

"K> Craig, would you please email the SQL Trigger that you refer to, to me? I

Find attached, please note that the attached trigger will work only on new rows in orders and it's not going to work if u open an order and edit the OrderNumber another thing, nothing will happen if the Ordernumber u r adding is found in Alias.Alias Please tell me if u want it to work upon updates as well

Nashat

begin 666 OrderNumber_Alias.sql M+2UT:&ES(&ES('1O(&-R96%T92!A(&-L=7-T97)E9"!I;F1E>"!O;B!!;&EA M

Partnersource Private (not managed) for partners

Glenn Adams Tiber Creek C> Kinnard,

Marc,

Read about the 3 and links to them;

formatting link

Nashat, I tried to run the whole statement but thats when I get the syntax error. This is what I was able to get to run for me: CREATE TRIGGER [trg_Ins_OrderNumber_Alias] ON [PurchaseOrderEntry] FOR INSERT AS

Craig,

I'm so sorry for the delay, as i understood from u, the index was not created but the trigger was created, is it right? supposing that the trigger was created successfully, in this case, u will face the problem u have if the reorder# u r adding is already found as an alias for any item coz i the trigger, i don't add the reorder# as alias if it was found. please check that the reorder# u r adding is not found in your alias table.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required