This is a multi-part message in MIME format.

------=_NextPart_000_0019_01BFFCB1.51F1B830
Content-Type: text/plain;
        charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Re: Help! (2)This depends on the database.  Access will allow you to:

select distinct field1, field2, field3 from sometable

which will result in a number of rows less than the total number of rows =
in the table, in the result set.

Dc

  ----- Original Message -----=20
  From: Todd Ashworth=20
  To: [EMAIL PROTECTED]=20
  Sent: Wednesday, August 02, 2000 16:31
  Subject: Re: Help! (2)


  You can only select 1 distinct field.=20

  Pick 1 field that you want to be distinct and=20

  SELECT DISTINCT(that_field), other_field, other_field2, etc .... FROM =
table=20

  Be careful which field you select distinctly.=20

  Todd Ashworth=20

  ----- Original Message -----=20
  From: "aslam bajaria" <[EMAIL PROTECTED]>=20
  To: <[EMAIL PROTECTED]>=20
  Sent: Wednesday, August 02, 2000 10:30 AM=20
  Subject: RE: Help! (2)=20



  | select distinct(*) gives an error.=20
  | Also=20
  | select distinct(column1, column2,...,LastColumn) gives=20
  | an error.=20
  |=20
  | Can someone tell me how to avoid this error.=20
  |=20
  | Appreciate.=20
  | A.B.=20
  |=20
  |=20
  |=20
  | --- Johan Coens <[EMAIL PROTECTED]> wrote:=20
  | > Maybe:=20
  | >=20
  | > Step 1: SELECT DISTINCT ... (all colums), name it=20
  | > qryAllRecords=20
  | > Step 2: DELETE FROM <yourtable>, now you're table is=20
  | > empty=20
  | > Step 3: LOOP over qryAllRecords and insert them into=20
  | > the database.=20
  | >=20
  | > Make sure you have a backup and use CFTRANSACTION!=20
  | >=20
  | > Best Regards,=20
  | > Johan Coens=20
  | >=20
  | > -----Original Message-----=20
  | > From: aslam bajaria [mailto:[EMAIL PROTECTED]]=20
  | > Sent: woensdag 2 augustus 2000 6:30=20
  | > To: [EMAIL PROTECTED]=20
  | > Subject: Help!=20
  | >=20
  | >=20
  | > Hello All,=20
  | > There is a very seriuous problem I am facing. Please=20
  | > help. The problem is as follows:=20
  | >=20
  | > Somehow I have created duplicate records in SQL=20
  | > Server=20
  | > 7.0 table.=20
  | >=20
  | > I have to remove the duplicate the records. It all=20
  | > happened because there is no primary key when the=20
  | > record was created.=20
  | >=20
  | > If it were a few records, I could have manually=20
  | > deleted them. Now the records are in thousands. Can=20
  | > someone suggest me a code that would check for=20
  | > duplicate values in a table and delete them.=20
  | >=20
  | > Please help.=20
  | >=20
  | > A.B.=20
  | >=20
  | > __________________________________________________=20
  | > Do You Yahoo!?=20
  | > Kick off your party with Yahoo! Invites.=20
  | > http://invites.yahoo.com/=20
  | >=20
  | =
-------------------------------------------------------------------------=
-=20
  --=20
  | > --=20
  | > Archives:=20
  | >=20
  | http://www.mail-archive.com/[email protected]/=20
  | > To Unsubscribe visit=20
  | >=20
  | =
http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dlists/cf_ta=
lk=20
  | > or=20
  | > send a message to [EMAIL PROTECTED]=20
  | > with 'unsubscribe' in=20
  | > the body.=20
  | >=20
  | >=20
  | =
-------------------------------------------------------------------------=
-=20
  ----=20
  | > Archives:=20
  | >=20
  | http://www.mail-archive.com/[email protected]/=20
  | > To Unsubscribe visit=20
  | >=20
  | =
http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dlists/cf_ta=
lk=20
  | > or send a message to=20
  | > [EMAIL PROTECTED] with 'unsubscribe'=20
  | > in the body.=20
  |=20
  |=20
  | __________________________________________________=20
  | Do You Yahoo!?=20
  | Kick off your party with Yahoo! Invites.=20
  | http://invites.yahoo.com/=20
  | =
-------------------------------------------------------------------------=
-=20
  ----=20
  | Archives: http://www.mail-archive.com/[email protected]/=20
  | To Unsubscribe visit=20
  =
http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dlists/cf_ta=
lk or=20
  send a message to [EMAIL PROTECTED] with 'unsubscribe' =
in=20
  the body.=20
  |=20



  =
-------------------------------------------------------------------------=
-----=20
  Archives: http://www.mail-archive.com/[email protected]/=20
  To Unsubscribe visit =
http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dlists/cf_ta=
lk or send a message to [EMAIL PROTECTED] with =
'unsubscribe' in the body.


------=_NextPart_000_0019_01BFFCB1.51F1B830
Content-Type: text/html;
        charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Re: Help! (2)</TITLE>
<META content=3D"text/html; charset=3Dwindows-1252" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3018.900" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>This depends on the database.&nbsp; =
Access will=20
allow you to:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>select distinct field1, field2, field3 =
from=20
sometable</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>which will result in a number of rows =
less than the=20
total number of rows in the table, in the result set.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Dc</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:[EMAIL PROTECTED]" [EMAIL PROTECTED]>Todd =
Ashworth</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  href=3D"mailto:[EMAIL PROTECTED]"=20
  [EMAIL PROTECTED]>[EMAIL PROTECTED]</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, August 02, =
2000=20
  16:31</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Help! (2)</DIV>
  <DIV><BR></DIV>
  <P><FONT size=3D2>You can only select 1 distinct field.</FONT> </P>
  <P><FONT size=3D2>Pick 1 field that you want to be distinct and</FONT> =
</P>
  <P><FONT size=3D2>SELECT DISTINCT(that_field), other_field, =
other_field2, etc=20
  .... FROM table</FONT> </P>
  <P><FONT size=3D2>Be careful which field you select distinctly.</FONT> =
</P>
  <P><FONT size=3D2>Todd Ashworth</FONT> </P>
  <P><FONT size=3D2>----- Original Message -----</FONT> <BR><FONT =
size=3D2>From:=20
  "aslam bajaria" &lt;<A=20
  =
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A>&gt;</FO=
NT>=20
  <BR><FONT size=3D2>To: &lt;<A=20
  =
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A>&g=
t;</FONT>=20
  <BR><FONT size=3D2>Sent: Wednesday, August 02, 2000 10:30 AM</FONT> =
<BR><FONT=20
  size=3D2>Subject: RE: Help! (2)</FONT> </P><BR>
  <P><FONT size=3D2>| select distinct(*) gives an error.</FONT> =
<BR><FONT size=3D2>|=20
  Also</FONT> <BR><FONT size=3D2>| select distinct(column1,=20
  column2,...,LastColumn) gives</FONT> <BR><FONT size=3D2>| an =
error.</FONT>=20
  <BR><FONT size=3D2>|</FONT> <BR><FONT size=3D2>| Can someone tell me =
how to avoid=20
  this error.</FONT> <BR><FONT size=3D2>|</FONT> <BR><FONT size=3D2>|=20
  Appreciate.</FONT> <BR><FONT size=3D2>| A.B.</FONT> <BR><FONT =
size=3D2>|</FONT>=20
  <BR><FONT size=3D2>|</FONT> <BR><FONT size=3D2>|</FONT> <BR><FONT =
size=3D2>| ---=20
  Johan Coens &lt;[EMAIL PROTECTED]&gt; wrote:</FONT> <BR><FONT =
size=3D2>|=20
  &gt; Maybe:</FONT> <BR><FONT size=3D2>| &gt;</FONT> <BR><FONT =
size=3D2>| &gt; Step=20
  1: SELECT DISTINCT ... (all colums), name it</FONT> <BR><FONT =
size=3D2>| &gt;=20
  qryAllRecords</FONT> <BR><FONT size=3D2>| &gt; Step 2: DELETE FROM=20
  &lt;yourtable&gt;, now you're table is</FONT> <BR><FONT size=3D2>| =
&gt;=20
  empty</FONT> <BR><FONT size=3D2>| &gt; Step 3: LOOP over qryAllRecords =
and=20
  insert them into</FONT> <BR><FONT size=3D2>| &gt; the database.</FONT> =
<BR><FONT=20
  size=3D2>| &gt;</FONT> <BR><FONT size=3D2>| &gt; Make sure you have a =
backup and=20
  use CFTRANSACTION!</FONT> <BR><FONT size=3D2>| &gt;</FONT> <BR><FONT =
size=3D2>|=20
  &gt; Best Regards,</FONT> <BR><FONT size=3D2>| &gt; Johan Coens</FONT> =
<BR><FONT=20
  size=3D2>| &gt;</FONT> <BR><FONT size=3D2>| &gt; -----Original =
Message-----</FONT>=20
  <BR><FONT size=3D2>| &gt; From: aslam bajaria [<A=20
  =
href=3D"mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</A>]=
</FONT>=20
  <BR><FONT size=3D2>| &gt; Sent: woensdag 2 augustus 2000 6:30</FONT> =
<BR><FONT=20
  size=3D2>| &gt; To: [EMAIL PROTECTED]</FONT> <BR><FONT =
size=3D2>| &gt;=20
  Subject: Help!</FONT> <BR><FONT size=3D2>| &gt;</FONT> <BR><FONT =
size=3D2>|=20
  &gt;</FONT> <BR><FONT size=3D2>| &gt; Hello All,</FONT> <BR><FONT =
size=3D2>| &gt;=20
  There is a very seriuous problem I am facing. Please</FONT> <BR><FONT =
size=3D2>|=20
  &gt; help. The problem is as follows:</FONT> <BR><FONT size=3D2>| =
&gt;</FONT>=20
  <BR><FONT size=3D2>| &gt; Somehow I have created duplicate records in =
SQL</FONT>=20
  <BR><FONT size=3D2>| &gt; Server</FONT> <BR><FONT size=3D2>| &gt; 7.0=20
  table.</FONT> <BR><FONT size=3D2>| &gt;</FONT> <BR><FONT size=3D2>| =
&gt; I have to=20
  remove the duplicate the records. It all</FONT> <BR><FONT size=3D2>| =
&gt;=20
  happened because there is no primary key when the</FONT> <BR><FONT =
size=3D2>|=20
  &gt; record was created.</FONT> <BR><FONT size=3D2>| &gt;</FONT> =
<BR><FONT=20
  size=3D2>| &gt; If it were a few records, I could have manually</FONT> =
<BR><FONT=20
  size=3D2>| &gt; deleted them. Now the records are in thousands. =
Can</FONT>=20
  <BR><FONT size=3D2>| &gt; someone suggest me a code that would check =
for</FONT>=20
  <BR><FONT size=3D2>| &gt; duplicate values in a table and delete =
them.</FONT>=20
  <BR><FONT size=3D2>| &gt;</FONT> <BR><FONT size=3D2>| &gt; Please =
help.</FONT>=20
  <BR><FONT size=3D2>| &gt;</FONT> <BR><FONT size=3D2>| &gt; A.B.</FONT> =
<BR><FONT=20
  size=3D2>| &gt;</FONT> <BR><FONT size=3D2>| &gt;=20
  __________________________________________________</FONT> <BR><FONT =
size=3D2>|=20
  &gt; Do You Yahoo!?</FONT> <BR><FONT size=3D2>| &gt; Kick off your =
party with=20
  Yahoo! Invites.</FONT> <BR><FONT size=3D2>| &gt; <A=20
  href=3D"http://invites.yahoo.com/"=20
  target=3D_blank>http://invites.yahoo.com/</A></FONT> <BR><FONT =
size=3D2>|=20
  &gt;</FONT> <BR><FONT size=3D2>|=20
  =
-------------------------------------------------------------------------=
-</FONT>=20
  <BR><FONT size=3D2>--</FONT> <BR><FONT size=3D2>| &gt; --</FONT> =
<BR><FONT=20
  size=3D2>| &gt; Archives:</FONT> <BR><FONT size=3D2>| &gt;</FONT> =
<BR><FONT=20
  size=3D2>| <A =
href=3D"http://www.mail-archive.com/[email protected]/"=20
  =
target=3D_blank>http://www.mail-archive.com/[email protected]/</A=
></FONT>=20
  <BR><FONT size=3D2>| &gt; To Unsubscribe visit</FONT> <BR><FONT =
size=3D2>|=20
  &gt;</FONT> <BR><FONT size=3D2>| <A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A></FONT>=20
  <BR><FONT size=3D2>| &gt; or</FONT> <BR><FONT size=3D2>| &gt; send a =
message to=20
  [EMAIL PROTECTED]</FONT> <BR><FONT size=3D2>| &gt; =
with=20
  'unsubscribe' in</FONT> <BR><FONT size=3D2>| &gt; the body.</FONT> =
<BR><FONT=20
  size=3D2>| &gt;</FONT> <BR><FONT size=3D2>| &gt;</FONT> <BR><FONT =
size=3D2>|=20
  =
-------------------------------------------------------------------------=
-</FONT>=20
  <BR><FONT size=3D2>----</FONT> <BR><FONT size=3D2>| &gt; =
Archives:</FONT>=20
  <BR><FONT size=3D2>| &gt;</FONT> <BR><FONT size=3D2>| <A=20
  href=3D"http://www.mail-archive.com/[email protected]/"=20
  =
target=3D_blank>http://www.mail-archive.com/[email protected]/</A=
></FONT>=20
  <BR><FONT size=3D2>| &gt; To Unsubscribe visit</FONT> <BR><FONT =
size=3D2>|=20
  &gt;</FONT> <BR><FONT size=3D2>| <A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A></FONT>=20
  <BR><FONT size=3D2>| &gt; or send a message to</FONT> <BR><FONT =
size=3D2>| &gt;=20
  [EMAIL PROTECTED] with 'unsubscribe'</FONT> <BR><FONT =
size=3D2>|=20
  &gt; in the body.</FONT> <BR><FONT size=3D2>|</FONT> <BR><FONT =
size=3D2>|</FONT>=20
  <BR><FONT size=3D2>| =
__________________________________________________</FONT>=20
  <BR><FONT size=3D2>| Do You Yahoo!?</FONT> <BR><FONT size=3D2>| Kick =
off your=20
  party with Yahoo! Invites.</FONT> <BR><FONT size=3D2>| <A=20
  href=3D"http://invites.yahoo.com/"=20
  target=3D_blank>http://invites.yahoo.com/</A></FONT> <BR><FONT =
size=3D2>|=20
  =
-------------------------------------------------------------------------=
-</FONT>=20
  <BR><FONT size=3D2>----</FONT> <BR><FONT size=3D2>| Archives: <A=20
  href=3D"http://www.mail-archive.com/[email protected]/"=20
  =
target=3D_blank>http://www.mail-archive.com/[email protected]/</A=
></FONT>=20
  <BR><FONT size=3D2>| To Unsubscribe visit</FONT> <BR><FONT size=3D2><A =

  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A>=20
  or</FONT> <BR><FONT size=3D2>send a message to =
[EMAIL PROTECTED]=20
  with 'unsubscribe' in</FONT> <BR><FONT size=3D2>the body.</FONT> =
<BR><FONT=20
  size=3D2>|</FONT> </P><BR>
  <P><FONT=20
  =
size=3D2>----------------------------------------------------------------=
--------------</FONT>=20
  <BR><FONT size=3D2>Archives: <A=20
  href=3D"http://www.mail-archive.com/[email protected]/"=20
  =
target=3D_blank>http://www.mail-archive.com/[email protected]/</A=
></FONT>=20
  <BR><FONT size=3D2>To Unsubscribe visit <A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A>=20
  or send a message to [EMAIL PROTECTED] with =
'unsubscribe' in=20
  the body.</FONT></P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0019_01BFFCB1.51F1B830--

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to