Simple Query Help

  • Thread starter Thread starter GeoDude
  • Start date Start date
G

GeoDude

Hello,

I have two tables one with a status code and the other with a status
code and a description.

I've created a query so I can get the first table with descriptions
however I get no results. Below are the tables, query and a sample of
the data I'm looking for.

---SQL QRY----

SELECT [June Well Status].*, StatusCodes.Desc
FROM [June Well Status] INNER JOIN StatusCodes ON [June Well
Status].Status = StatusCodes.Status;

---Sample of (June Well Status) Table----

WellName County Well API FieldID Status GasProduction
Active subcheck
OPC-4 #5 43 20336 Hidden Dome PS 0 -1
-1

--Sample of (StatusCodes) Table ---

Status Desc
PS  Pumping Submersible


Thank you for your help.
 
Yes there both Text - 255 characters.

is the status field in both table of the same data type and SIZE?
GeoDude said:
Hello,

I have two tables one with a status code and the other with a status
code and a description.

I've created a query so I can get the first table with descriptions
however I get no results. Below are the tables, query and a sample of
the data I'm looking for.

---SQL QRY----

SELECT [June Well Status].*, StatusCodes.Desc
FROM [June Well Status] INNER JOIN StatusCodes ON [June Well
Status].Status = StatusCodes.Status;

---Sample of (June Well Status) Table----

WellName County Well API FieldID Status GasProduction
Active subcheck
OPC-4 #5 43 20336 Hidden Dome PS 0 -1
-1

--Sample of (StatusCodes) Table ---

Status Desc
PS Pumping Submersible


Thank you for your help.
 
I have two tables one with a status code and the other with a status
code and a description.

Your query looks correct. Might either table have Status defined as a
Lookup field? If so, the Lookup misfeature is concealing the actual
table contents!

John W. Vinson[MVP]
 

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

Back
Top