fds_id | region | impact_value | condition_id
1..........West............1.02..............6
2..........West............2.02..............7
3..........South...........1.76..............6
Im trying to select distinct regions and their corresponding fds_id, impact vaule based on the condition_id. So in this example, for a condition_id of 6, I would like the records returned to be:
fds_id=1, region=West, impact_value=1.02
fds_id=2, region=South, impact_vaule=1.76
Im using the SQL statment:
"SELECT DISTINCT fds.region FROM fds WHERE EXISTS (Select fds.impact_value, fds.fds_id FROM fds WHERE fds.condition_id=6)"
The problem is that in the recordset returned, the impact_value and fds_id values arent being returned. Its only showing the distinct region names. How can I access the corresponding fds_id and impact_value?"
1..........West............1.02..............6
2..........West............2.02..............7
3..........South...........1.76..............6
Im trying to select distinct regions and their corresponding fds_id, impact vaule based on the condition_id. So in this example, for a condition_id of 6, I would like the records returned to be:
fds_id=1, region=West, impact_value=1.02
fds_id=2, region=South, impact_vaule=1.76
Im using the SQL statment:
"SELECT DISTINCT fds.region FROM fds WHERE EXISTS (Select fds.impact_value, fds.fds_id FROM fds WHERE fds.condition_id=6)"
The problem is that in the recordset returned, the impact_value and fds_id values arent being returned. Its only showing the distinct region names. How can I access the corresponding fds_id and impact_value?"