Access query for SQL database to select records
Posted on 2008-11-13
We use Access to query a SQL database that is back end of our accounting software for reports. In SQL there is a table--History that has shows payroll deductions. A record for one employee's check will show the deductions as fields--ded1, ded2, ded3 etc. Numbers are used as codes in these fields to indicate what type of deduction such as 401 k. 401k deduction uses "29". However, that 29 will appear in different deduction fields depending on the employee--so that employee 1 might have "29" in ded1 and employee 2 might have "29" in ded2. We want to query this table to return all employees that have 29 in any of these fields and no other employees. When we insert 29 in the grid in Access select query design in all (ded1, ded2, etc.) this obviously does not work. I do not have sophisticated Access skills--any help on how to design this would be appreciated.