Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DISTINCT WITH SUBSTR ????

Kodiak_SeattleSep 11 2009 — edited Sep 11 2009
Ok my query works, but I need to pull in the distinct 5DIGIT ZIP CODE, am on 10g.

Putting it in front of the SUBSTR function, doesn't seem to work.


SELECT FLS_STORE_OF_PROMOTION_NUM, DISTINCT SUBSTR(ADDR_POSTAL_CODE, 1, 5) as ZIP5
FROM TABLE;

How do I do that ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2009
Added on Sep 11 2009
14 comments
7,961 views