Skip to Content
author's profile photo Former Member
Former Member

SQL Query

Dear All

Any help will be appreciated. I have made a query:

SELECT T1.[ItemCode] AS 'Item No.', T1.[ItemName] AS 'Item Description', T1.[OnHand] AS 'In Stock', T1.[InvntryUom] AS 'Stock UoM', T0.[UgpName] AS 'UoM Group Name' FROM [dbo].[OUGP] T0 INNER JOIN [dbo].[OITM] T1 ON T1.[UgpEntry] = T0.[UgpEntry]

Can someone amend this for me, so I may be able to:-

1. User should be asked to enter the range of the Item code

2. Inactive products should not show up.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 28, 2016 at 02:00 PM

    Hi,

    Please add below condition in your query.

    SELECT T1.[ItemCode] AS 'Item No.', T1.[ItemName] AS 'Item Description', T1.[OnHand] AS 'In Stock', T1.[InvntryUom] AS 'Stock UoM', T0.[UgpName] AS 'UoM Group Name' FROM [dbo].[OUGP] T0 INNER JOIN [dbo].[OITM] T1 ON T1.[UgpEntry] = T0.[UgpEntry]

    where T1.ItemCode between '[%0]' and '[%1]' and T1.ValidFor='Y'

    Regards,

    Tushar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.