Link to home
Start Free TrialLog in
Avatar of Allen Pitts
Allen PittsFlag for United States of America

asked on

PL\SQL Search for rows with month

Hello experts,

Have a table in Oracle DB called CCM.CCM_ASSOCIATION
with field ASSOCIATION_EXPIRE_DATE.
the data looks like

24-APR-12 04.16.51.723000000 PM
19-JUN-12 12.00.00.000000000 AM
29-JUL-10 12.00.00.000000000 AM
30-MAY-12 12.00.00.000000000 AM
13-JAN-14 01.47.34.052000000 PM
07-MAY-12 12.00.00.000000000 AM
13-JAN-14 12.00.00.000000000 AM

Would like to see all the rows that
have are in the  month of JAN
.
SELECT ASSOCIATION_EXPIRE_DATE FROM CCM.CCM_ASSOCIATION
where month = JAN

I know this is not right. Have searched for an hour
for syntax. There are lots of queries for extracting
a month from a date but can't find anything
for extracting rows withj certain month or year.

Thanks.

Allen in Dallas
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Allen Pitts

ASKER

The data type is data.
The query works well.
Thanks.