Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> QUERY help.. not sure how to do this

QUERY help.. not sure how to do this

From: Kevin Blount <kevin_at_questionmark.com>
Date: 1 Aug 2005 12:21:12 -0700
Message-ID: <1122924072.668695.267210@g43g2000cwa.googlegroups.com>


I need some help creating a QUERY..

here's an example of what I need to do: say for instance my database contains 3 values:

4012345
3012345
4055555

I want to create a query that will count the number of records where the last 5 are unique. In the example that count would equal 2

How would I go about this? My first though would be to use DISTINCT, but I don't know how to format the SELECT DISINCT part of the query.. is there some kind of RIGHT(field,5) method I can use?

any help would be appreciated. Received on Mon Aug 01 2005 - 14:21:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US