Jump to content

[SOLVED] Need Query help


curtis_b

Recommended Posts

I'm bangin my head against the wall on this one:

SELECT * FROM 7cp.LabelOrders
LEFT JOIN (7cp.LabelCatalog, 7cp.LabelOrders_Common, 7cp.Locations, 7cp.Serials, 7cp.LabelCatalog_Plates, 7cp.Production)

ON (
LabelCatalog.RevisionID = LabelOrders.RevisionID AND
LabelCatalog.LabelID = LabelOrders.LabelID AND
LabelOrders_Common.PO = LabelOrders.PO AND
Locations.LocationID = LabelOrders_Common.ReceiverID AND
Serials.Serial = LabelOrders.Serial AND
LabelCatalog_Plates.LabelID = LabelOrders.LabelID AND
LabelCatalog_Plates.RevDateID = LabelOrders.RevDateID AND
Production.Serial = LabelOrders.Serial
)

WHERE LabelOrders.Serial = 85 LIMIT 0,1

**The above query WORKS, but most of the data returned comes back as null when there should be data.

Through assembling the query peice by peice, I've found out that the problem is with the LabelCatalog_Plates table. That is, if I remove that table from the join (and the relationships) the data expected comes back, yet if I include it, most columns returned (that DO have data) come back as null.

If anyone can offer suggestions - I appreciate your help.

Curt


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.