Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MS-Access
i have created three table table1 BookingDetails,table2 Customerdetails,table3 booking, i want to get the details from table2 and table3 ...in all tables customerid is common....
and the details in the table3 are saved with the id's not name....example towerid ,flatid and i need tower name and flat name...and these are stored in another two tables table4 towermaster,table5 flat master,and in this there is no customerid...only towerid and flatid...how its possible it will possible are not??
 
thnk q
Posted 12-Sep-12 21:00pm
Edited 12-Sep-12 21:02pm
v2
Comments
Kuthuparakkal at 13-Sep-12 2:02am
   
Learn SQL Join
_Amy at 13-Sep-12 2:31am
   
:thumbsup: I could have given you +5 for this comment. :)
rajushyamu7 at 13-Sep-12 5:17am
   
thank you.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

As suggested, you need a JOIN statement:
 
Get name from other table:
    Alias has AKAName and ActorID
    Actors has Name and Id

    SELECT a.Name, b.AKAName
     FROM Actors a JOIN Alias b ON a.Id = b.ActorId
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 5,170
1 DamithSL 4,357
2 Maciej Los 3,750
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,851


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 13 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100