on 05-03-2011 1:14 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.