Skip to Content

Whse lock report

Hi Experts,

I am updating OITW through DTW as locked.

I need report for same as how much data i have updated & how much is rest.

SELECT T0.[ItemCode], T0.[ItemName], T1.[WhsCode], T1.[Locked] FROM OITM T0 INNER JOIN OITW T1 ON T0.ItemCode = T1.ItemCode

Above query returns data in vertical way but i need in horizontal.

i.e. ItemCode, WhsCode1, Locked, Whscode2, Locked, Whscode3, Locked

Awaiting for reply.

Regards,

Ravi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2011 at 12:26 PM

    Hi Ravi.......

    No of Colums in this reports depends on No. of Warehouses.

    So can you please let me know the No. of Warehouses you are having in your DB?

    Regards,

    Rahul

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2011 at 12:41 PM

    Hi Ravi,

    How many warehouses do you have? If not too many, you can have query like this:

    SELECT T0.ItemCode,

    T0.ItemName,

    (SELECT Locked FROM OITW WHERE ItemCode = T0.ItemCode AND WhsCode = 'Whs01') AS 'WHS01',

    (SELECT Locked FROM OITW WHERE ItemCode = T0.ItemCode AND WhsCode = 'Whs02') AS 'WHS02'

    FROM OITM T0

    Thanks,

    Gordon

    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.