I want to get records from my receiving table where item ordered > item recieved here is my SQL SELECT order_detail_org.order_num, order_detail_org.order_line_num, order_detail_org.order_line_qty, master_receiving.item_recieved FROM master_receiving RIGHT OUTER
JOIN order_detail_org ON master_receiving.order_num = order_detail_org.order_num WHERE (order_detail_org.order_num LIKE '8901ADB327%') and order_detail_org.order_line_qty < master_receiving.item_recieved I get no record!
Yaheya Quazi
Director, Admin. Comp. & Systems
University of California, Merced
Two things you can do: 1) Does the order_detail_org query return a result given these parameters? 2) Is the right side of your join returning results? If not, you can use IsNull to make sure that it returns 0 if master_receiving.item_recieved = NULL: ISNULL(master_receiving.item_recieved,0).
-pjm
I never gave a damn about the meterman until I was the man who had to read the meter.
I am guessing you have your left and right mixed up. Presumably the Master_Recieving always exists, and the ORder_detail may or may not exist. That being the case, this is a left, not a right.
yaheya
Participant
1635 Points
340 Posts
Is this a join problem?
Jul 30, 2003 10:24 PM|LINK
Director, Admin. Comp. & Systems
University of California, Merced
pjmcb
Contributor
2234 Points
459 Posts
Re: Is this a join problem?
Jul 31, 2003 01:55 AM|LINK
I never gave a damn about the meterman until I was the man who had to read the meter.
jmurdock
Participant
1270 Points
402 Posts
Re: Is this a join problem?
Aug 01, 2003 03:01 PM|LINK