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

querying different tables

Status
Not open for further replies.

09876

Programmer
Nov 29, 2001
10
US
I've successfully created a query in DWMX that retrieves my customer’s info, but i was wondering how to add more info to the page, from a different table such as credit card info(which is on a different table than the one I'm querying), etc... And associate this info with the customer

PS: The local DB is Access but the one live will be SQL
Thanks,
 
You must have defined a primary key in the tables. Then you would just create a different query based on the primary key.

I hope that helps.

Wow JT that almost looked like you knew what you were doing!
 
Hi pizx8r,


I'm afraid not :-( can you please be more especific? I'm not experienced... but, I did look on the DB and found out that theres key on both tables.. Is there a tutorials for it?

Thanks,
 

:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
in the select statement u have maybe something like

select * from customer_info just add to this

select * from customer info
inner join credit_card where customer_info_id is
credit_card_id

there must be a link between the two tables......something like customer no that is unique in both tables...then you will get all the information from the tables.

You may have many credit card details associated to the customer info

i.e customer info
cust a credit card 124
a 125


when displaying just jump over the cust a......if the same
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top