Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd Query Problem

Status
Not open for further replies.

MisterMan

Technical User
Jun 4, 2002
87
US
I am just full of annoying questions today.

I have a query that allows Data Entry into a table, but pulls some info from another table. For simplicity's sake, let us call one DETable and the other INFTable.

The query draws the PK from INFTable, plus 5 other fields.

The query also draws all the information from the DETable, except the FK.

The SQL language draws ALL of the rows from INFTable, and only those rows in DETable that match on the PK.

This works fine, until I attempt to enter information. When I try to enter data into a field from the DETable, it changes the PK from the INFTable to Zero, rendering it useless to me.

I tried to make this clear, but it doesn't seem to be too clear. Any suggestions though?
 
can you not JOIN the 2 tables on det.FK and Inf.PK?

--------------------
Procrastinate Now!
 
eh, you do know how to JOIN 2 tables in a query right?

--------------------
Procrastinate Now!
 
Of course, I just misunderstood your wording, sorry.

They are joined. I've never seen a query do this before.

(I was sitting here going "What's a Not Join?")
 
Actually, I do believe I had it figured out. Once I made the FK not the PK in the DETable, it worked fine. Thank you everyone!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top