|
We have 2 datatables both with a FileNumber column.
First Table:
Continuence:
FileNumber | ContinuedDate
Second Table:
FileNumber | OriginalSaleDate
There can be many ContinuedDates corresponding to the FileNumber in the Continuence table.
ex: FileNumberContinuedDate 12301/02/03 12302/03/04 12303/04/05 23412/15/02
There can be only one FileNumber in the OriginalSaleDate table.
ex: FileNumberOriginalSaleDate 12312/15/02 23412/18/04 34512/15/02 ...etc (no more then 1 FileNumber per OriginalSaleDate)
How do we query and create one table with one OriginalSaleDate per FileNumber but many ContinuedDates per FileNUmber?
We need to query by OriginalSaleDate and ContinuedDate. The user must search by a date. Either ContinuedDate or OriginalSaleDate. If either column has the value entered its row is returned. Basically, we need to search for one date in both tables and return one table with OriginalSaleDate, ContinuedDate and the FileNumber.
ex: (user searches for 12/15/02) The following table would be returned:
FileNumberOriginalSaleDateContinuedDate 12312/15/0201/02/03 12312/15/0202/03/04 12312/15/0203/04/05 23412/18/0412/15/02 34512/15/02
We have to have 2 separate tables in our database. We're looking to create a dynamic datatable with the above data, then populate a datagrid/crystal report.
|