Skip to main content

Notifications

Announcements

No record found.

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

  • Bennykendy Profile Picture
    Bennykendy 840 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    Thanks. It just worked perfectly.

    Can any one write a report where I can determined how long an item has been in my store? I want to have a report that will notify the period of time an item has been on a store and for how many months. For example, an item, say a computer, was shipped into my store January 10. Now we are in July. That is 6months old. I would love a report that will give me such information concerning the duration of time the item has been in my store.

    Can anyone help, please?

    Thanks in advance!

  • IT Licensing Profile Picture
    IT Licensing 65 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    this information was very helpful to me, thank you!

  • Gerald Rothaus Profile Picture
    Gerald Rothaus 2,930 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    Um, good job there.

  • Sad Profile Picture
    Sad 650 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    Hi,

    1- backup Database

    2- run Select quiry with the same creteria

    Select itemlookupcade,description from [item] WHERE left([description], 3) = 'ABC' AND [Quantity] = 0

    and check the items in result " to make sure "

    3-if all is ok ,run Update quiry

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

    hope this will help

  • Taier P Profile Picture
    Taier P 908 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    Thanks, Justin! :)  Much appreciated!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    Thanks for the help with the spam guys and sorry about the delay in removing it. I have deleted it and Rajendra is no longer a member of the Community. Please keep sending spam our way. I will get to it quicker in the future.

  • Taier P Profile Picture
    Taier P 908 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    Okay, let's make this clear:  This is a board for communicating information and solutions based on experience and knowledge, NOT a place to market or peddle your products, merchandise, or services.

    I've reported both people who have used this forum as a place for advertising.

    Members of this community are here to help each other by sharing information.  We are NOT interested in buying your plug ins or add ons. We are definitely not interested in a moving company located in India.  Stop wasting your time and ours by being annoying and trying to sell things to people who are not in the market for your goods...

  • Gerald Rothaus Profile Picture
    Gerald Rothaus 2,930 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    This guy is like the drunk at your grandparents anniversary party.

    You can't wait 'till he leaves, right?

    Am I right?

  • Gerald Rothaus Profile Picture
    Gerald Rothaus 2,930 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    Oh. Right then.

    :)

    You should do the other guy too.

  • Taier P Profile Picture
    Taier P 908 on at
    RE: SQL Help: Making Items Inactive by Item Lookup Code Prefix

    Not you... I reported Rajendra25.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans