thanks for you reply.
duplicates. number of parameters(param_id) for each report may vary. so i
"Uri Dimant" wrote:
> Hi
> I hope it will give you an idea.
>
http://dimantdatabasesolutions.blogspot.com/2007/02/dealing-with-duplicates.html >
>
>
>
>
> "vanitha" <gvanitha@firstam.com> wrote in message
> news:070BB9E5-D0BF-46E2-AD32-8B591E5A894E@microsoft.com...
> > Hi,
> >
> > I have 3 tables Scheduled, parameters, parametervalues. help me to
> > identify
> > duplicate scheduled instances. To be a duplicate all of the following
> > must
> > be the same:
> >
> > RID (ReportID)
> > Delivery Method (PDF or Excel)
> > Frequency
> > All parameter values must be identical
> >
> > the delivery method and the frequency for the particular RID is stored in
> > the Scheduled table. so there is no problem with these 2 columns.
> >
> > for the parameter values the data is stored in the parameters and
> > parametervalues table. these 2 tables are joined using Scheduled table.
> >
> > example
> >
> > Scheduled
> >
> > id report_id delivery_method freq_id
> > 555 95 2 2
> > 560 95 2 2
> > 565 96 2 2
> > 566 96 2 2
> >
> > Paramerters
> >
> > id report_id param_name
> > 107 95 @loc
> > 108 95 @Cust
> > 110 96 @Cust
> > 111 96 @Vendor
> >
> > Parametervalues
> >
> > id param_id sched_id param_value
> >
> > 1361 107 555 REPUBLIC TITLE DALLAS
> > 1362 108 555 HUD TX
> > 1381 107 560 REPUBLIC TITLE DALLAS
> > 1382 108 560 HUD TX
> > 1111 110 565 HUD CO
> > 1112 111 565 Sample
> > 1113 110 566 HUD CO
> > 1114 110 566 Sample2
> >
> > the parametervalues.param_id = parameters.id and parametervalues.sched_id
> > =
> > scheduled.id
> >
> > now i want to find out if all of the parameter values must be identical.
> > now
> > in this case for report_id = 95 the 2 different schedules(555,560) the
> > param
> > @loc is same i.e "REPUBLIC TITLE DALLAS", and the second param @Cust = HUD
> > TX
> > is same. so the 2 schedules are same i.e. duplicate.
> >
> > but in the case of report_id = 96, the param @vendor is different for 2
> > schedules... so it not a duplicate.
> >
> > please help me to find out the duplicate.
> >
> > Thank you
> > vanitha
>
>