Joining Tables with Null Values

Perissos

Registered User.
Local time
Yesterday, 22:06
Joined
Jun 28, 2010
Messages
61
I have two tables I am trying to join and most of the records have null values in the field I am using to join.

I am getting an error:
Reserved Error(-5500);there is no message for this error.

Here is the SQL for the query

TRANSFORM Sum(tblCSLData.QTYOrdered) AS SumOfQTYOrdered
SELECT tblRCodes.RExplain, tblCSLData.DistCenter
FROM tblCSLData INNER JOIN tblRCodes ON (nz(tblCSLData.Rc,"n/a")) = (nz(tblRCodes.RCode,"n/a"))
GROUP BY tblCSLData.EscrV, tblRCodes.RExplain, tblCSLData.DistCenter
ORDER BY tblRCodes.RExplain, tblCSLData.DistCenter
PIVOT Format([orderdate],"mmm-yy");

Any ideas?
 
Why are you trying to join this way. What is your logic behind this? what are you hoping to acheive?
 
I am trying to work miracles, lol

Actually this query was working great until I seperated the tables and needed to put the join in. I only seperated the table because I am getting a code passed from an sap system, but the people want an explanation of what the code actually represents for the column headers.

I figured the best way to do that would be to set up a table that contained an explanation for the codes which would also allow it to be maintained as needed.

I'm open for suggestions if you have any.
 
You JOIN field names not strings.

Create another query to extract the Non Null values and join to that query.
 
I did that in the beginning, but the description never showed. I only went the direction I did because I couldn't figure out how else to get the description to show
 
You join them BEFORE creating the crosstab. Create query as a join between both tables, then use the query in the crosstab.
 
ty for your patience and helping me to see how tired I was. I should have known that.
 
That was what I meant in the post prior to that ;)

Glad you got it sorted :)
 

Users who are viewing this thread

Back
Top Bottom