Link to home
Start Free TrialLog in
Avatar of breeze351
breeze351

asked on

SQl query with join with out having to list all fields in main table.

I need to get all the fields from the main table and just a couple of fields from the 2nd table.
Can I do something like this:
SELECT
*
,pers.FNAME,
pers.LNAME,
pers.PHONE1
FROM
survey_data
Inner JOIN pers ON survey_data.TID = pers.TID and survey_data.PNID = pers.PNID

WHERE
survey_data.SEQ= 'NY1050000350' and survey_data.storekey='1001'

Open in new window


I need to do this on a couple of pages.  Some I don't need all the data from "survey_data" and on others I need all of it.
ASKER CERTIFIED SOLUTION
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of breeze351
breeze351

ASKER

Thanks