| | |
Query Help
Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2008
Posts: 4
Reputation:
Solved Threads: 0
I am writing my first database app (windows form in c#) and I am using an access database.
I have 2 tables with the following fields:
payroll
--Store
--lastName
--PayFreq
--SSN (PK)
--HireDate
--EffectiveDate
--TermDate
--DeductionCode
--Deduction
--NAD CHAR
hrconnection
--Store
--lastName
--CoTime
--Plan
--Dependants
--HireDate
--EffectiveDate
--TermDate
--SSN (PK)
--Deduction
First two queries:
I want to find the records based on SSN that are in the payroll table and are not in the hrconnection tables and then find the record based on SSN that are in the hrconnection but are not in the paypal table
For these I came up with
and
They don't really come out right. So I thought I would post here for some help on the first queries and the following queries.
Next query:
I want to find data that does not match between hrconnection and payroll then output which fields do not match and list what record has the mismatch last name and SSN next to them.
Next query
I want to take all the records that do match 100% and are in both tables add the deduction field for all record and output a total deduction.
Next Query.
I want to output all records that match 100% and are in both tables that are within 45 days of the effective date and list how many days they are away from the effective date.
Any help on these queries would be great!
Thanks
I have 2 tables with the following fields:
payroll
--Store
--lastName
--PayFreq
--SSN (PK)
--HireDate
--EffectiveDate
--TermDate
--DeductionCode
--Deduction
--NAD CHAR
hrconnection
--Store
--lastName
--CoTime
--Plan
--Dependants
--HireDate
--EffectiveDate
--TermDate
--SSN (PK)
--Deduction
First two queries:
I want to find the records based on SSN that are in the payroll table and are not in the hrconnection tables and then find the record based on SSN that are in the hrconnection but are not in the paypal table
For these I came up with
SELECT hrconnection.Store, hrconnection.lastName, hrconnection.HireDate, hrconnection.EffectiveDate, hrconnection.TermDate, hrconnection.SSN, hrconnection.Deduction "
+ "FROM hrconnection LEFT JOIN payroll ON hrconnection.SSN = payroll.SSN "
+ "WHERE (((payroll.SSN) Is Null))";and
SELECT payroll.Store, payroll.lastName, payroll.SSN, payroll.HireDate, payroll.EffectiveDate, payroll.TermDate, payroll.Deduction"
+ " FROM payroll LEFT JOIN hrconnection ON payroll.SSN=hrconnection.SSN"
+ " WHERE (((hrconnection.SSN) Is Null))";They don't really come out right. So I thought I would post here for some help on the first queries and the following queries.
Next query:
I want to find data that does not match between hrconnection and payroll then output which fields do not match and list what record has the mismatch last name and SSN next to them.
Next query
I want to take all the records that do match 100% and are in both tables add the deduction field for all record and output a total deduction.
Next Query.
I want to output all records that match 100% and are in both tables that are within 45 days of the effective date and list how many days they are away from the effective date.
Any help on these queries would be great!
Thanks
![]() |
Similar Threads
- Sql Query (VB.NET)
- Removing Query Strings (ASP.NET)
- Double MySQL Query (PHP)
- Dynamic Query (JSP)
- MySQL nested query / joined query conversion help (MySQL)
- problem with lengthy query (Java)
- Retreiving variables from a sql query into a form (PHP)
- Query Building (Database Design)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: Powerpoint Automation + VB 6.0
- Next Thread: How to convert my MS Access file to Application??
| Thread Tools | Search this Thread |
Tag cloud for MS Access and FileMaker Pro





