query returns uppercase data

R

rbchildrn

I have a simple query that returns name and employer from two tables
(matching Employer field from People table and OrgName field from
Organizations table). All data in the tables is in the appropriate
case (usually Proper case unless something else is trademarked).
However, the query described above returns _some_ of the OrgName data
in all uppercase. Does anyone have any idea why this would happen, or
how I can fix it? Let me know what additional information might be
helpful. Thanks
 
T

Tom Ellison

Dear RB:

Unless your query explicitly changes the case, it is showing what is in the
table.

You could post the SQL of the query here and I'd take a look to see if the
query is explicitly changing the case. If you also show a sample of the
data and results it might be possible to see more of what you're
experiencing.

Tom Ellison
 
R

rbchildrn

Here is the SQL:
SELECT TblOrganizations.CID, TblPeople.FirstName+" "+"
"+TblPeople.LastName AS Expr1, TblPeople.Employer
FROM TblPeople, TblOrganizations
WHERE (((TblPeople.Employer)=[TblOrganizations].[OrgName]));

I have verified that the original data in the tables is indeed not all
caps as the query results show for some records. Unless there is
something in the background that could cause the tables to show Proper
case when their value is uppercase... Do you know if I can double-check
that?
 
T

Tom Ellison

Dear RB:

Please try this query:

SELECT FirstName FROM (
SELECT FirstName, ASC(Mid(FirstName, 2)) AS Val
FROM TblPeople
WHERE FirstName IS NOT NULL
AND Len(Nz(FirstName, "")) >= 2
) WHERE Val BETWEEN ASC("A") AND ASC("Z")

This searches for all the first names where the second character is upper
case. What does it find? You can try it for LastName as well. Perhaps
this will help find what's up here.

Tom Ellison
 
R

rbchildrn

That is some excellent code. It seemed to work perfectly as you
described, but none of the ones that became all caps in the other
query showed up in this one (I used OrgName for FirstName since that
was where the errors were showing up). Perhaps I have hit on some very
strange bug. I will try the original query again from scratch and let
you know if anything changes. Thanks a lot!
 
R

rbchildrn

That is some excellent code. It seemed to work perfectly as you
described, but none of the ones that became all caps in the other
query showed up in this one (I used OrgName for FirstName since that
was where the errors were showing up). Perhaps I have hit on some very
strange bug. I will try the original query again from scratch and let
you know if anything changes. Thanks a lot!
 
R

rbchildrn

I rebuilt the query in design view and got the following SQL:

SELECT [TblPeople.FirstName]+" "+"
"+[TblPeople.LastName] AS [Full Name], TblOrganizations.OrgName
FROM TblOrganizations INNER JOIN TblPeople ON TblOrganizations.OrgName
= TblPeople.Employer
WHERE ((([TblPeople.Employer])=[TblOrganizations.OrgName]));

I'm not sure why the first query didn't pick up the join, or what that
might have to do with case, but it works now! Very strange. Thanks
for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top