If that contains is really important you could add a where clause to the temp 
view:
WHERE colornum contains '123' OR colornum contains '456'

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis McGrath
Sent: Wednesday, September 03, 2008 10:06 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Lost my code and my memory

Dick,

One way to do it is create a temp view
Create temp view Tempview as SELECT Distinct product, colornum from Tablename

Then
SELECT Product from Tempview Group by Product having count(*) > 1

This will give you all the products that have more than one color.


Dennis McGrath



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dick Fey
Sent: Wednesday, September 03, 2008 9:46 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Lost my code and my memory

Some years back I had code in one of my apps to do a specific search.
Seemed no-one was using it, so I deleted it.  Now they want it back, and I
can't figure out how I did it in the first place.  Seems like a simple
problem.

Need to find a product in the database where more than one color number
matches a product.  Each color may exist in many products, but I want to see
the product(s) that have both colors.

ie:
Edit all from colorlist where colornum contains '123' and colornum contains
'456'

Anything I try gives me a syntax error, or a no rows exist error.
I know the rows are there, so its a syntax issue.

Suggestions appreciated.

Dick Fey
Carpet Broker Inc.

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================


Reply via email to