I have a table in Oracle that includes a date field (set up as DATE,
7). I'm trying to create a table showing the number of items entered on
that date in a range of dates. I figure the best way to do this is get
all the DISTINCT dates and check the counts for those dates in a
separate query.
However, I can't seem to get the distinct dates. I've tried:
select distinct(CUST_ADDDATE) from CUSTOMER where CUST_ADDDATE >=
to_date('$start', 'DD-MON-YY') and CUST_ADDDATE <= to_date('$end',
'DD-MON-YY') order by CUST_ADDDATE asc
but didn't get distincts. Figuring perhaps the TIME the item was
entered on that date made a difference, I tried:
select distinct(to_date(CUST_ADDDATE, 'DD-MON-YY')) from CUSTOMER
[etc...]
But got an error to the effect of "not a SELECTable item" or somesuch
as that.
SO --- how do I get distinct dates from an Oracle table?
Thanks,
_Bob
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/