Within a large database we inherited there is a problem of repetitive output of certain records.
In the query below for example (ID# 489),
when records for the (Metrics) CHLA or HISTC are produced,
and if the (Impaired) field lists " " the record will
print one line as seen in the 2nd row of ID#-489.
But if the (Impaired) field lists "IM" the record will
print one line as seen in the 3rd row of ID#-489.
This will ONLY happen on records where both the (Impaired) field is listed as "IM" & " ", for a given ID#.
An example of the records not repeating is seen at the bottom record (ID# 489A).
As you may have noticed this ONLY effects the (Metrics) with the (Impaired Metric) listed as "NUTR".
It is essential we that we have BOTH the (Impaired) "IM" and " " listing, but on only one line per ID#.
Any assistance would be greatly appreciated!!!
Punch01
ID# Impaired Metric Impaired Metric Name
Metric
-- -------- ------ -------- ---------------
489 BIO Biology
489 CHLA Chlorophyll
489 IM CHLA NUTR Chlorophyll
489 CHLOR Chloride
489 COND Conductance
489 DISS Dissolved Solids
489 IM DO DO Dissolved Oxygen
489 F Fluoride
489 IM FCOL FCOL Fecal Coliform
489 HISTC Historic Chlorophyll
489 IM HISTC NUTR Historic Chlorophyll
489A CHLA Chlorophyll
489A CHLOR Chloride
489A COND Conductance
489A DO Dissolved Oxygen
In the query below for example (ID# 489),
when records for the (Metrics) CHLA or HISTC are produced,
and if the (Impaired) field lists " " the record will
print one line as seen in the 2nd row of ID#-489.
But if the (Impaired) field lists "IM" the record will
print one line as seen in the 3rd row of ID#-489.
This will ONLY happen on records where both the (Impaired) field is listed as "IM" & " ", for a given ID#.
An example of the records not repeating is seen at the bottom record (ID# 489A).
As you may have noticed this ONLY effects the (Metrics) with the (Impaired Metric) listed as "NUTR".
It is essential we that we have BOTH the (Impaired) "IM" and " " listing, but on only one line per ID#.
Any assistance would be greatly appreciated!!!
Punch01
ID# Impaired Metric Impaired Metric Name
Metric
-- -------- ------ -------- ---------------
489 BIO Biology
489 CHLA Chlorophyll
489 IM CHLA NUTR Chlorophyll
489 CHLOR Chloride
489 COND Conductance
489 DISS Dissolved Solids
489 IM DO DO Dissolved Oxygen
489 F Fluoride
489 IM FCOL FCOL Fecal Coliform
489 HISTC Historic Chlorophyll
489 IM HISTC NUTR Historic Chlorophyll
489A CHLA Chlorophyll
489A CHLOR Chloride
489A COND Conductance
489A DO Dissolved Oxygen