Select INMSP300.M3OE# as “OEM_NO”, INMSP300.M3OEC as “ComprsOE”, INMSP300.M3PRD as “PN”, INMSP300.M3CLS as “PrdLine”, dbo_ECC_APP.OEM[/strong]_NO, dbo_ECC_APP.CARDONE_NO, dbo_ECC_APP.OE_FORMER2, dbo_ECC_APP.OE_REPLACED_BY, dbo_ECC_APP.ID_NO, dbo_ECC_APP.RELEASE
From RDB CARF1.INMSP300 INMSP300l LEFT join RDB dbo_ECC_APP dbo_ECC_APP
, ComprsOE=OEM_N0 ————— I think this should be something like
ON ComprsOE=OEM_N0 ————– this …
Where INMSP300.M3CLS =’78′ and INMSP300 is NULL;
Do you get any text with the error message?
I would make a very simple select first, then add one item at a time …
Found the text up above
SQL thinks you are refering to: dbo_edd_ppp
I don’t see it in this code but since this is a query on a query ????
Below is the code that I get.
[IBM][System i Access ODBC Drive][DB2 for i5/OS]sql5001 – Column qualifier or table DBO_ECC_APP undefined. (#-5001)
What I did is I went into accees and the designed a link by joining the different queries together and allowed the software to develop the SQL statement and this is what it came up with.
SELECT dbo_ECC_APP.CARDONE_NO, dbo_ECC_APP.OEM_NO, [78IN0140wOE].M3PRD, [78IN0140wOE].M3PRD
FROM dbo_ECC_APP INNER JOIN 78IN0140wOE ON dbo_ECC_APP.OEM_NO = [78IN0140wOE].[M3OE#];
Why the are there [ ] and what does that do? Why is it only on the table being joined and not the feild?
Access will put [ ] around a name that would otherwise confuse it —
- In access you can name a column with a space in it like EMPLOYEE NUMBER to clarify that for SQL it gets
the [EMPLOYEE NUMBER] treatment. So our editor has done something here [78IN0140wOE].[M3OE#] — it’s saying [78IN0140wOE] is a name of a file or column that SQL might have a problem understanding (the wOE in that name probably isn’t really wOE and it starts with a digit so it encloses it in .
It does the same for [M3OE#] — here it might be the # sign that gets Access a bit excited. As you said it works.