On Thu, Sep 10, 2009 at 8:20 PM, free...@sohocare <[email protected]> wrote: > dear all GURU, > > Can anyone help me on how to use "SELECT * from stock .." command to get the > following result? > > STOCK.DBF > code description > 100 book > 100 +book > 101 paper > 102 pen > 102 +pen > 103 stamp > 104 brush > > > RESULT: (List of duplicate code) > code description > 100 book > 100 +book > 102 pen > 102 +pen > > ----------------------------------
Can you please explain why the above output is selected? Was it multiple code rows ( 2 #100 and 2# 102) or was it a + sign in the description as well as the text? for the + sign use this to identify the codes you want. Select code from myTable where description like "%+%" Now use that query to bring back all the values of code and description: Select code, description from myTable were code in ( Select code from myTable where description like "%+%" ) I believe that someone else has given the answer for Count>1 -- Stephen Russell Sr. Production Systems Programmer SQL Server DBA Web and Winform Development Independent Contractor Memphis TN 901.246-0159 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

