Simple Query Help

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.
 
G

GeoDude

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.
 
J

John Vinson

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]
 
Top