Hello, I'm having some problems trying to access two tables in a SQL database at the same time and making some results out of them. Let me explain further: the first table has some information in that I'm going to be doing a select query on and reading out, but one of the columns in this table is a set of codes, the second table contains the codes in one column and their meanings in the other.
So I want to bring back the information from the first table and then select the information for the codes shown from the second table and print their meanings alongside the information from the first table. Could anyone help me out in figuring out how my SQL in the ASP page for this would be written? Sorry if this is a little confusing but im having a hard time visualising how to do this.
Cheers, it works. I've only been using very basic SQl views in the past so joins etc are new to me. I do have another question tho, I'm writing these queries in an ASP page and they are very long single lines at the mo, how do I break them up into seperate shorter lines?
Ok i've hit another snag with this, there are two different columns in the first table that are codes that need to be compared to the code listing in the 2nd table and then their code meanings sent back. I ve done this with one which is where u're first piece of code comes in handy but i can't join two columns in the 1st table to the one in the 2nd.