Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

wwwxxxAPC, How to unsubscrube from dategen spam, WWWXXXAPC, docmd.close 2585, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text, how to setup procmail html2text

Links

XODOX
Impressum

#1: finding duplicate fields

Posted on 2006-06-09 15:39:10 by Ike

This may be a particularly dumb question, but I'm wrestling with it anyways.
Is there a way, to discern a duplicate field among records in a table. For
example, suppose I have a table such that:

CREATE TABLE `sometable` (
`id` int(11) NOT NULL auto_increment,
`sometext` varchar(80) NOT NULL default '',
PRIMARY KEY (`id`)
)

I want to find all records where `sometext` = `sometext` in another
record. That is, I want to find those records where there is more than one
instance of `sometext` without regard to what `sometext` is. I may have a
row where `sometext` = "abc" and another where it is `zyx` and I do not
want to put a value for `sometext` into the WHERE portion of my sql select
statement. How can I find duplicated fields where I dont know what the value
of the field being duplicated is a priori? Thanks, Ike

Report this message

#2: Re: finding duplicate fields

Posted on 2007-05-19 18:08:22 by VeloMaster

On Fri, 09 Jun 2006 13:39:10 GMT, "Ike" <rxv@hotmail.com> wrote:

Try this:
SELECT f.*, s.* FROM firsttable f, secondtable s WHERE f.somecolumn =
s.somecolumn

>This may be a particularly dumb question, but I'm wrestling with it anyways.
>Is there a way, to discern a duplicate field among records in a table. For
>example, suppose I have a table such that:
>
>CREATE TABLE `sometable` (
> `id` int(11) NOT NULL auto_increment,
> `sometext` varchar(80) NOT NULL default '',
> PRIMARY KEY (`id`)
>)
>
>I want to find all records where `sometext` = `sometext` in another
>record. That is, I want to find those records where there is more than one
>instance of `sometext` without regard to what `sometext` is. I may have a
>row where `sometext` = "abc" and another where it is `zyx` and I do not
>want to put a value for `sometext` into the WHERE portion of my sql select
>statement. How can I find duplicated fields where I dont know what the value
>of the field being duplicated is a priori? Thanks, Ike
>

Report this message