web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics RMS (Archived)

SQL Help: Making Items Inactive by Item Lookup Code Prefix

(0) ShareShare
ReportReport
Posted on by 908

Hi there!

The first three letters of our Item Lookup Code are the vendors/suppliers from where the product came.  We have a few suppliers who have, over the years, gone out of business. I would like to make those items inactive.

Could someone help me with an SQL Query for Headquarters that would enable me to make an item inactive if the item lookup code begins with three letters, and Current Inventory On Hand is 0?

Thanks in advance! :)

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Gerald Rothaus Profile Picture
    2,934 on at

    UPDATE [item] SET [Inactive]=1 WHERE left([description], 3) = 'ABC' AND [Quantity] = 0;

  • Verified answer
    Gerald Rothaus Profile Picture
    2,934 on at

    Oh, back up your database first!

    Always!

  • Taier P Profile Picture
    908 on at

    Thanks, I'll just have to replace [description] with [itemlookupcode] for my needs. :)

  • Gerald Rothaus Profile Picture
    2,934 on at

    Oh, right. Sorry about that!

  • J.D. Young Profile Picture
    60 on at

    If you'd like to mark items inactive on a continuing basis using logical rules, try this add-in.

    Select Maintenance, Mark Inactive, Various filters and options are included.

    store.digitalretailer.com/DRS-Tools-%28any-size-network%29-754

    If you want to automate Item Lookup Code generation with a supplier code prefix, try this add-in.

    Select the AS option.

    store.digitalretailer.com/DRS-AutoGen-Store-Ops-3-5-PCs-216

  • Gerald Rothaus Profile Picture
    2,934 on at

    Well, it looks like everyone has lost their minds. I thought we weren't supposed to directly use this as an advertising medium, or at least show a little class in doing so. Oh, well.

    I have a set of Rossignol skis, 165's, with size 9 Dabello boots and poles for sale as I hurt my back last year and can no longer use them. I'll throw in a clip on rack for the car.

    Also I intend to upgrade my toaster so if anyone needs a used toaster let me know.

    just go to www.ishouldreallybeembarrasedatmylackofclass.com/CrassAdvertising.aspx

    -J

  • Taier P Profile Picture
    908 on at

    You have been reported to Microsoft for violation of the Terms of Use of this forum. (go.microsoft.com/fwlink)

  • Gerald Rothaus Profile Picture
    2,934 on at

    Reported for what, sarcasm?

    What is wrong with you?

  • Taier P Profile Picture
    908 on at

    Not you... I reported Rajendra25.

  • Gerald Rothaus Profile Picture
    2,934 on at

    Oh. Right then.

    :)

    You should do the other guy too.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics RMS (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans