Making Items Inactive

Oct 18, 2006 6 Replies

v1.3



I would like to create a script that will turn store created items inactive, however, I do not know the script numbers (if that is even proper terminology...?) = inactive. Is there one?



I would like to do something to set all location's items to inactive where the hqid = 0.


/* The field Inactive is disabled or Inactive?? */

UPDATE Item SET [FIELD] = 1 WHERE HQID = 0

and with trigger..

CREATE TRIGGER tr_Item ON ITEM AFTER INSERT, UPDATE AS

UPDATE Item SET [FIELD] = 1 WHERE ID IN (SELECT ID FROM inserted)

cod

cod,

your trigger will make all items >> v1.3

Nashat, Can you clearly explain this to me? We need to issue a statement to make all items that were created locally at the stores inactive. We will be pumping them up with a new database from HQ. These locations got a little out of hand and began creating their own items, now we need to bring them back to being run solely from HQ. I get the SQL and the Ids, but; triggers, no idea.

Nashat, Can you clearly explain this to me? We need to issue a statement to make all items that were created locally at the stores inactive. We will be pumping them up with a new database from HQ. These locations got a little out of hand and began creating their own items, now we need to bring them back to being run solely from HQ. I get the SQL and the Ids, but; triggers, no idea. -- Jocelyn

"Nashat" wrote:

Nashat, Can you clearly explain this to me? We need to issue a statement to make all items that were created locally at the stores inactive. We will be pumping them up with a new database from HQ. These locations got a little out of hand and began creating their own items, now we need to bring them back to being run solely from HQ. I get the SQL and the Ids, but; triggers, no idea. -- Jocelyn

"Nashat" wrote:

Could not agree more with you guys here!!! Security is always the best option. This is after all why I am here. To help my coworkers get this system out of the mud.

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required