Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Duplication Query

Discussion in 'Information Technology' started by Dz0n&, Nov 11, 2005.

  1. Dz0n&

    Dz0n&
    Expand Collapse
    Guest

    My english is bad, sorry.

    I want to make query to show double entries in field "1" which have
    first 7 letters the same.

    I'm using this query:

    SELECT par.naziv_para, par.sifra, par.datum, par.vrijeme
    FROM par
    WHERE (((par.naziv_para) In (SELECT [naziv_para] FROM [par] As Tmp
    GROUP BY [naziv_para],left([naziv_para],7) HAVING
    Left([naziv_para],7) =Left([par].[naziv_para],7) and Count(*)>1 )))
    ORDER BY par.naziv_para;

    but that query dont work

    please help
     
  2. Loading...

    Similar Threads Forum Date
    Query about Jhatka Meat by Shooting in Head Sikh Sikhi Sikhism Aug 26, 2011
    Who is a sikh? A non sikh friend's query!! Sikh Sikhi Sikhism Apr 30, 2010
    General Query Hard Talk Sep 4, 2008
    Power of pauri's in Japji Sahib query Sikh Sikhi Sikhism Aug 17, 2006
    Sikhism a query Book Reviews & Editorials Aug 2, 2005

  3. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    Try:

    SELECT par.naziv_para, par.sifra, par.datum, par.vrijeme
    FROM par
    INNER JOIN
    (SELECT Left([naziv_para],7) AS ToMatch
    FROM [par]
    GROUP BY Left([naziv_para],7)
    HAVING Count(*) >1) AS Tmp
    ON Left(par.[naziv_para],7) = Tmp.ToMatch
    ORDER BY par.naziv_para;


    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Dz0n&" <alokin800@yahoo.com> wrote in message
    news:1131714812.226167.117040@g47g2000cwa.googlegroups.com...
    > My english is bad, sorry.
    >
    > I want to make query to show double entries in field "1" which have
    > first 7 letters the same.
    >
    > I'm using this query:
    >
    > SELECT par.naziv_para, par.sifra, par.datum, par.vrijeme
    > FROM par
    > WHERE (((par.naziv_para) In (SELECT [naziv_para] FROM [par] As Tmp
    > GROUP BY [naziv_para],left([naziv_para],7) HAVING
    > Left([naziv_para],7) =Left([par].[naziv_para],7) and Count(*)>1 )))
    > ORDER BY par.naziv_para;
    >
    > but that query dont work
    >
    > please help
    >
     

Share This Page