Need a SQL Command that i can make itemnotdiscountable by Department
This is what i have
UPDATE dbo.Item SET ItemNotDiscountable = 1 Where dbo.Department SNACK
*This post is locked for comments
J.arun is correct. Just one thing. If you want all Barbies from all departments then run this set of queries.
Select ItemLookupCode, [Description],* from Item
Item INNER JOIN Department ON Item.DepartmentID = Department.ID
WHERE Item.Description like '%barbie%'
If you see all looks good, Please run below SQL
UPDATE Item
SET QuantityDiscountID = 0
FROM Item
WHERE Item.Description like '%barbie%
Not sure what you mean by "Can this be used to lock items". Security levels can be used to control editing of items. Steps for Security setup can be found in the contextual help by searching for Security Setup.
Please run below SQL first and make sure the items going to be updated are correct.
Select ItemLookupCode, [Description],* from Item
Item INNER JOIN Department ON Item.DepartmentID = Department.ID
WHERE (Department.Name = N'SNACK') and Item.Description like '%barbie%'
If you see all looks good, Please run below SQL
UPDATE Item
SET QuantityDiscountID = 0
FROM Item INNER JOIN Department ON Item.DepartmentID = Department.ID
WHERE (Department.Name = N'SNACK') and Item.Description like '%barbie%
Can this be used to lock items that contains a particular description like if i wanted to locked all toys that contain barbie the description
if you mean stop discount you can use the following script
-----------------------
UPDATE Item
SET QuantityDiscountID = 0
FROM Item INNER JOIN Department ON Item.DepartmentID = Department.ID
WHERE (Department.Name = N'SNACK')
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156