Board index » delphi » Looking for records with repeated data

Looking for records with repeated data

JJJJJJJHHHHGGGGGGG
    LRGM wrote in message ...
    About the Locate Method
    I have been using the LOCATE method to find out records in my DB tables. All is OK when I use it with Customer_Number key field (it has just one instanace), but others like First_Name or Last_Name can have repeated values in my long Customer.DB table. Although, I only can get the first of them. To sum it up, I want to create a searching routine loop usefull to keep in an ARRAY as many as repeated data I could find in the chosen FIELD. Finally, what is a practical way to show these selected data to pick up the record I really want to see.
    Biginner requesting help.

 

Re:Looking for records with repeated data


There's a lot of ways to do this. You could look into the Filter
property and the OnFilterRecord event of TTable/TQuery. You could also
do it with SQL, for example:
    SELECT * FROM TableName
    WHERE Last_Name = 'Jones'

These methods will return a dataset that contains only the records
that match the filter or SQL query conditions.

If you want to do a FindFirst...FindNext without filtering the table,
I can recommend a component called FxLocate which you should be able
to find (or locate!) on the usual Delphi component sites.
--
Stephen Brown

Quote
LRGM wrote in message ...

About the Locate Method
I have been using the LOCATE method to find out records in my DB
tables. All is OK when I use it with Customer_Number key field (it has
just one instanace), but others like First_Name or Last_Name can have
repeated values in my long Customer.DB table. Although, I only can get
the first of them. To sum it up, I want to create a searching routine
loop usefull to keep in an ARRAY as many as repeated data I could find
in the chosen FIELD. Finally, what is a practical way to show these
selected data to pick up the record I really want to see.
Biginner requesting help.

Re:Looking for records with repeated data


Take a look at our find component.  See
http://www.orbital.co.za/orbcomp.htm

On Tue, 16 Mar 1999 06:21:40 GMT, "LRGM" <luis...@bellsouth.net>
wrote:

Quote
>This is a multi-part message in MIME format.

>------=_NextPart_000_0013_01BE6F4B.E350B460
>Content-Type: text/plain;
>    charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable

>About the Locate Method
>I have been using the LOCATE method to find out records in my DB tables. =
>All is OK when I use it with Customer_Number key field (it has just one =
>instanace), but others like First_Name or Last_Name can have repeated =
>values in my long Customer.DB table. Although, I only can get the first =
>of them. To sum it up, I want to create a searching routine loop usefull =
>to keep in an ARRAY as many as repeated data I could find in the chosen =
>FIELD. Finally, what is a practical way to show these selected data to =
>pick up the record I really want to see.
>Biginner requesting help.

>------=_NextPart_000_0013_01BE6F4B.E350B460
>Content-Type: text/html;
>    charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable

><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
><HTML>
><HEAD>

><META content=3Dtext/html;charset=3Diso-8859-1 =
>http-equiv=3DContent-Type>
><META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
></HEAD>
><BODY bgColor=3D#ffffff>
><DIV>
><DIV><FONT color=3D#000000 size=3D2>About the Locate Method</FONT></DIV>
><DIV><FONT color=3D#000000 size=3D2>I have been using the <STRONG>LOCATE =

></STRONG>method to find out records in my DB tables. All is OK when I =
>use it=20
>with <STRONG>Customer_Number </STRONG>key field (it has just one =
>instanace), but=20
>others like <STRONG>First_Name </STRONG>or <STRONG>Last_Name =
></STRONG>can have=20
>repeated values in my long Customer.DB table. Although, I only can get =
>the first=20
>of them. To sum it up, I want to create a searching routine loop usefull =
>to keep=20
>in an <STRONG>ARRAY </STRONG>as many as repeated data I could find in =
>the chosen=20
>FIELD. Finally, what is a practical way to show these selected data to =
>pick up=20
>the record I really want to see.</FONT></DIV>
><DIV><FONT color=3D#ff0000 face=3D"" size=3D2>Biginner requesting=20
>help.</FONT></DIV></DIV></BODY></HTML>

>------=_NextPart_000_0013_01BE6F4B.E350B460--

David Lipschitz Database Specialist BSc(Hons) MBA da...@orbital.co.za
Orbital Decisions  Providing Simple Answers to Complex Problems
Orbital URL: http://www.orbital.co.za/contents.htm
Components/Apps (70% discount): http://www.orbital.co.za/orbcomp.htm
User Group URL: http://www.orbital.co.za/delphi.htm
David URL: http://www.orbital.co.za/cv.htm

Other Threads