thanks for your reply.
if we query using group by and having it will pull records where any one parameter value matched for the same report_id.
example:
report param_name param_value
_id
61 @Customer HOME LOANS
61 Product SUPER
61 ShowChart NO
61 @StartDate 5/12/2006
61 @EndDate 6/12/2006
61 @Division NMN
61 @UseBizDaysOnly YES
61 @SubtractDaysInLegal YES
61 Customer Location ALL
61 @Customer COMMERCE MORTGAGE
61 Product SUPER
61 ShowChart NO
61 @StartDate 10/12/2006
61 @EndDate 13/12/2006
61 @Division NMN
61 @UseBizDaysOnly YES
61 @SubtractDaysInLegal YES
61 Customer Location ALL
when we query using group by having the result will be
report param_name param_value
_id
61 @Division NMN
61 @SubtractDaysInLegal YES
61 @UseBizDaysOnly YES
61 Customer Location ALL
61 Product SUPER
61 ShowChart NO
because these parameter values are repeated. but there should be no record for this report_id. only if all the parameter values matches for a particular report_id, it should return the report_id and values.
if you get any idea please let me know.
thanks for your time.
Quote:
quote:Originally posted by happygv
IMO, you need to create a list of ROWs of all variables that you wish to consider for duplicates using join between these tables and then look for count(*) > 1 grouped by all the variable columns in question in order.
Cheers
_________________________
- Vijay G
Strive for Perfection
|