Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2002

    Unanswered: Query-problem (with attachment)

    I have 2 tables :
    - tblDepartmentPerEmployee (159 records)
    --> contains 2 fields :
    - aov_wn_nr wich is employeeID
    - ao2_afd which is the departmentcode the employee belongs to

    - tblAccessRightsCurrentUser (3 records)
    --> contains 1 field :
    - kp wich represents de departments the CurrentUser have access to.

    My question is quite simple, however I don't get it working.
    What I want is filtering from the first table all the employees who belong to a department which are specified in the second table.

    That means (in this example) all aov_wn_nr where ao2_afd = 92353 or 92354 or 92355.
    The result-table should contain 36 records.

    I tried this :

    SELECT aov_wn_nr 
    FROM tblDepartmentPerEmployee 
    WHERE val(tblDepartmentPerEmployee.ao2_afd) IN (SELECT * FROM tblAccessRightsCurrentUser);
    It looks good to me but the result only shows me the employees who belong to department 92353.

    Is there anyone who can help me out?

    Be aware that depending on the currentUser these numbers vary, so I can not use these values in the where-statement.
    Also notice that ao2_afd is a string and kp is nummeric.
    Attached Files Attached Files
    Last edited by artemide; 08-08-03 at 04:00.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts