Answered accessing data from 2 tables

  • Saturday, November 17, 2012 11:55 AM
     
     

    i have two tables , tblUser , tblJobAdv

    tblUser:                              tblJobAdv

    user id (pk)                            advId

    email                                   date

    address                               userId(F.K)


    Now i want to select all columns from tblJobAdv for only those userid's for which email = '123@yahoo.com' , in tblUser, 

    i did my best but spent 4 hours and couldn't achieve anything , Help !

All Replies

  • Saturday, November 17, 2012 4:43 PM
     
     Answered

    SELECT     tblJobAdv.advid, tblJobAdv.date, tblJobAdv.userID
    FROM         tblUser INNER JOIN
                          tblJobAdv ON tblUser.userID = tblJobAdv.userID
    WHERE     (tblUser.email = N'123@yahoo.com')

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed As Answer by Johnson T A Sunday, November 18, 2012 12:27 AM
    • Marked As Answer by Hunain Hafeez Thursday, November 22, 2012 11:52 AM
    •