I'm getting an Item Lookup Code must be unique error when I try to enter a new item.
I cannot find a UPC that matches the one I'm entering so this number must be buried in an alias in one of my items.
What would be the SQL code to id the offending item?
Thanks,
Richard
*This post is locked for comments
I found the item using RMS Synergy. It had been set as an inactive item and the offending upc was it's alias. I had tried the find before. Looks like find does not inspect inactive items.
Thanks for the SQL commands. I'll take a look a look at the rest of my items using your code.
The best way to find it is to find from the item window. Make sure ItemLookupCode and Alias are checked in the left box.
If no item is found that means there's an entry in the alias from which the item is deleted. This could have happened if someone without much knowledge of RMS had done changes in sql.
To find invalid alias entries you can use this query. select a.* from alias a left join item i on a.itemid = i.id where isnull(i.id,0) = 0
When you're sure to delete those false entries you can use this delete query. delete a from alias a left join item i on a.itemid = i.id where isnull(i.id,0) = 0
Hope this helps. TimB
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... 290,900 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156