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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling data from different dB Tables..

Status
Not open for further replies.

Webflex

Technical User
Apr 20, 2001
101
GB
Can anyone point me at a good tutorial or example on pulling data from different tables in a db (Access) and combining the results in one page. I am comfortable working with one table with ASP/Access and inserting/deleting/searching etc.

Thanks in advance
 
You probably need to get a good SQL reference book to help you learn SQL. In the meantime, for a tutorial online go to
Displaying data on a single page from different tables is not any different than displaying data from one table. What is different is the SQL statement that you have to write to get the data you want.

To join Table A with Table B, each table has to have a column that has values that are the same such as an ID column.

So

Select A.*, B.* from TableA A, TableB B
where A.ID = B.ID

You can also select certain columns in the tables based on what you need by replacing the A.*, B.* (which selects all columns in both tables).

Hope that helps,
Joli
 
Thanks, that was helpful, can you recommend a good usable SQL book for Web Programming, it seems to be a bit of a minefiled out there.
 
Unfortunately, I haven't found a great SQL book to recommend. We have a copy of SQL for Dummies which may be a good start.

Joli
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top