by usenet » Fri Jul 03, 2009 2:17 pm
Yes this should solve my problem.
Thanks!
"Sasha Nazarov [MSFT]" wrote:
> Hi Iven,
>
> Maybe something like this?
> -----------------------------------------------------
> WK_MyTable wk_MyTable;
> WK_MyTable wk_MyTableMatch;
> ;
>
> SELECT field1, field2, field3 FROM wk_MyTable
> group by field1, field2, field3
> exists join wk_MyTableMatch
> where wk_MyTableMatch.field1 == wk_MyTabld.field1
> && wk_MyTableMatch.field2 == wk_MyTabld.field2
> && wk_MyTableMatch.field3 == wk_MyTabld.field3
> && wk_MyTableMatch.RecID != wk_MyTable.RecID;
>
> --
> Best regards,
> Sasha Nazarov
>
>
> "Iven" wrote:
>[color=green]
> > I want to determine if a table has several fields with the same values. The
> > SQL syntax on the SQL-Server would be like this:
> >
> > SELECT field1, field2, field3 FROM WK_MyTable
> > group by field1, field2, field3
> > having count(*) > 1
> >
> > Is there any posibility to get this information in x++ with an select
> > statemen?
> >
> > Thanks
> > Iven[/color]