michaelng
July 11th, 2006, 04:45 PM
Hi,
Table1:
1 dog
2 cat
3 turtle
Table2:
1 teeth
1 jaws
2 teeth
2 jaws
3 teeth
3 jaws
Table3:
1 bones
1 vegetables
2 bones
2 vegetables
3 vegetables
I need to do a query that would select only one row of table1. I am trying to fix a report that is keying on table2 and table3 using "teeth" and "bones" as identifier, but whoever created it in the first doesn't realize that not all rows in table1 uses those two identifier; thus "turtles" from table1 is left out.
I can easily do it in MS Access by creating another table with a selection of "first" or "last" grouping on table2 and table3, then joining it again. I am not sure how I can do this in Crystals since I am fairly new to it.
Basically, I want to do a query with one unique row of table1 to appear regardless what type they have in table2 and table3. I know I can just not join table1 with table2 and table3 and get the same result, but I need other information in table2 and table3 that requires me to join them.
Any help would be appreciated...
Thanks
Table1:
1 dog
2 cat
3 turtle
Table2:
1 teeth
1 jaws
2 teeth
2 jaws
3 teeth
3 jaws
Table3:
1 bones
1 vegetables
2 bones
2 vegetables
3 vegetables
I need to do a query that would select only one row of table1. I am trying to fix a report that is keying on table2 and table3 using "teeth" and "bones" as identifier, but whoever created it in the first doesn't realize that not all rows in table1 uses those two identifier; thus "turtles" from table1 is left out.
I can easily do it in MS Access by creating another table with a selection of "first" or "last" grouping on table2 and table3, then joining it again. I am not sure how I can do this in Crystals since I am fairly new to it.
Basically, I want to do a query with one unique row of table1 to appear regardless what type they have in table2 and table3. I know I can just not join table1 with table2 and table3 and get the same result, but I need other information in table2 and table3 that requires me to join them.
Any help would be appreciated...
Thanks