Full Version: Unmatched Query Not Returning Any Values
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
nd_j
(this is a continuation from the original post re; querying against Oracle linked tables - that part is fixed but I am now having an issue strictly on the Access side)

HI everyone! Back at this - what I ended up doing was making a table with the information I want from the Oracle table (ex: 10200300, 10200400, 3045X000, etc. ) Access created that as a MEMO field, and I just changed to text.

*

So I have an Access table with a text field with values such as "10002000", "V5003000", etc.

I also have a query that selects portions of the whole account field (eg characters 2-10 should match the values in the text filed in the table above). This query shows the account portion "V5003000" of the field.

So, now I can see that I have some accounts in the normal query that DO NOT appear in the table text field, BUT the unmatched query does not return any values!

Here is the SQL:

SELECT [450qryPGL_GLAccount_GL].EM_EMPLOYEE_ID,
[450qryPGL_GLAccount_GL].PGL_GL_ACCT,
[450qryPGL_GLAccount_GL].Acct,
[450qryPGL_GLAccount_GL].PGL_RUN_ID,
[450qryPGL_GLAccount_GL].PGL_AMOUNT
FROM
450qryPGL_GLAccount_GL LEFT JOIN ORP5_VALID_ACCOUNTS ON [450qryPGL_GLAccount_GL].[Acct] = ORP5_VALID_ACCOUNTS.[Account]
WHERE (((ORP5_VALID_ACCOUNTS.Account) Is Null));

Thanks in advance!
nd
theDBguy
Hi nd,

welcome2UA.gif

If you take out the WHERE clause, do you get any records back? If so, then maybe the Account field is not really Null. Try this instead:

WHERE Len(Trim(Account))=0

Just my 2 cents... 2cents.gif
nd_j
That worked, thanks!

theDBguy
Hi,

yw.gif

Glad we could help. Good luck with your project.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.