Create query

  • Thread starter Thread starter Stanis
  • Start date Start date
S

Stanis

Hello,
I have a table with some field names -for example:
field name:Number|Name| Date1 | Date2| Date3| Date4|
and records: 1|Slr |5/6/04 |6/4/04|7/5/04|12/23/04
2|Pld |6/3/04 |8/8/4|9/7/04|10/7/04
i want to create a query, which shows a record thereby:
1|Slr|5/6/04
1|Slr|6/4/04 in case of parameter for date1,2,3,
1|Slr|7/5/04 or 4 in criteria,query will show a
1|Slr|12/23/04 record with any date,for example:
2|Pld|6/3/04 <#7/5/04#
2|Pld|8/8?04
2|Pld|9/7/04
2|Pld|10/7/04
 
Please tell me that you are doing this so you can normalize your table and,
thus, remove your multiple date fields. You have to use a union query to do
it.

Select Number, Name, Date1
From YourTable
UNION
Select Number, Name, Date2
From YourTable
UNION
Select Number, Name, Date3
From YourTable
UNION
Select Number, Name,Date4
From YourTable;
 
Back
Top