- This topic is empty.
- The forum ‘Back End’ is closed to new topics and replies.
I have two tables in the database, tableOne and tableTwo. In tableOne there is a column called fieldOne and a column called ID. In tableTwo there is a column called fieldTwo and a column called ID.
I have the value of fieldOne but that is it. I need a single statement that will get the value of ID from the row that fieldOne is in, match the ID with ID in tableTwo and return the value of fieldTwo.
i hope this makes sense, was quite hard to right out properly. I was thinking of using a join but im not really sure how.
Wouldn’t that be something like:
WHERE tableTwo.ID = tableOne.ID
I don’t know for sure, my SQL knowledge is a bit rusty. Actually, I only used MSSQL in school a few years ago.
Thanks for the reply, I just came back to make this thread solved.
I’m not sure if your code will work but as it turns out you can use a WHERE clause with a JOIN so was pretty simple in the end.