Retrieving columns from related tables

  • Hi everyone,

    I have a design like the one attached to this post and i want to be able to query the tiers table and return the name field from the 3 tables related to tiers.

    I want the the firstname and lastname in Person concatenated to name

    In the end i want something like this

    TierId NAME

    1 Gabriel G

    2 Microsoft

    3 My group

    Thank you

  • Would something like this work for you

    Select Concat ( firstName,LastName) OR Select firstName|| ' ' || LastName

    Into A.Name

    FRom Table A A Inner JOIN TableB B

    where A.ID = B.ID

  • Thanks SQLTestUser. I'd try it out and let you know

  • I get the code you have pasted but that really isn't what i want.

    The three tables related to tiers have somethings in common, the name field except for Persons that has firstname and lastname. I want to pull data from all the three tables along with the named field

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply