• fdthompson35 (2/25/2015)


    we want the following fields from the PERSON table

    personid

    personnum

    fullnm

    we want the following field from the ASSIGNPAYRULE TABLE

    payruleid

    where the personid from the PERSON table = the employerid in the ASSIGNPAYRULE table AND the expirationdtm field in the ASSIGNPAYRULE table is > today

    Replace your first sentence with SELECT. Add comma's after the column names and make sure you assign the table owners. You've already got the FROM statement, just add a JOIN clause to define the rules. Then use the WHERE clause for the filter and you're there.

    In short, we'll help you with your homework, but we won't do it for you.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning