pegaga1979
5th February 2014, 09:10
Hi,

I'm developing SQL Query to dload capacity from table whwmd301 for each location at table whwmd300.
But if the location is not have the capacity, my query not printed because it not in table whwmd301.
The query as below:

select
whwmd300.cwar, | Warehouse
whwmd300.loca, | Location
whwmd301.chkv, | Check Volume
whwmd301.dpth, | Length
whwmd301.wdth, | Width
whwmd301.hght, | Height
whwmd301.totv, | Total Volume
whwmd301.avlv, | Available Volume
whwmd301.incv, | Expected Increase in Volume
whwmd301.decv | Expected Decrease in Volume
from
whwmd300, | Locations
whwmd301 | Location Capacity
where
whwmd300.cwar >= whwmd300.cwar.f and
whwmd300.cwar <= whwmd300.cwar.t and
whwmd300.loca >= whwmd300.loca.f and
whwmd300.loca <= whwmd300.loca.t and
whwmd300.cwar = whwmd301.cwar and
whwmd300.loca = whwmd301.loca

bhushanchanda
5th February 2014, 10:05
Hi,

Try something like this, we don't use locations so can't try it.

select
whwmd300.cwar, | Warehouse
whwmd300.loca, | Location
whwmd301.chkv, | Check Volume
whwmd301.dpth, | Length
whwmd301.wdth, | Width
whwmd301.hght, | Height
whwmd301.totv, | Total Volume
whwmd301.avlv, | Available Volume
whwmd301.incv, | Expected Increase in Volume
whwmd301.decv | Expected Decrease in Volume
from
whwmd300, | Locations
whwmd301 | Location Capacity
where
whwmd300.cwar >= whwmd300.cwar.f and
whwmd300.cwar <= whwmd300.cwar.t and
whwmd300.loca >= whwmd300.loca.f and
whwmd300.loca <= whwmd300.loca.t and
whwmd300._index1 refers to whwmd301

pegaga1979
5th February 2014, 10:24
Hi Bhushan,

Thank you for the idea.
But I still can't see the location that doesn't has capacity setup. :(
my report only print data with location that has capacity setup.

bhushanchanda
5th February 2014, 10:27
Hi,

Please try again, I edited the refer's clause. I tried it at my end and works fine.

Copy and paste it again and let me know the results.

pegaga1979
5th February 2014, 10:49
Hi Bhushan,

Thank you so much.
u saved my day :)

bhushanchanda
5th February 2014, 10:51
Hi,

Glad that worked. :)