Home » SQL & PL/SQL » SQL & PL/SQL » Record count
Record count [message #243379] Thu, 07 June 2007 02:46 Go to next message
Messages: 48
Registered: February 2007
i have a table named statement_fact where have around 10-15 columns out of which posting date and transaction date are two major columns.i want to find the record count where posting date between 1st of a month and 10 th of next month.
suppose i am pulling for the month of may then posting date between 1st of may to 10th of june.and transaction date between 1st of may to 31 of may.wat should be the query so that i can get the desired record count
Re: Record count [message #243384 is a reply to message #243379] Thu, 07 June 2007 02:52 Go to previous messageGo to next message
Michel Cadot
Messages: 65150
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post what you already tried.
Have a look at BETWEEN operator, TRUNC and ADD_MONTHS may be of some help.

Please post your Oracle version (4 decimals).
Please read and apply How to format your posts.


Re: Record count [message #243386 is a reply to message #243384] Thu, 07 June 2007 02:57 Go to previous message
Messages: 179
Registered: January 2007
Location: india
Senior Member
try some thing like this

select count(*) from employee 
where hire_date between to_date('7/9/1998','mm/dd/yyyy') and to_date('3/19/2007','mm/dd/yyyy')


[Updated on: Thu, 07 June 2007 03:06] by Moderator

Report message to a moderator

Previous Topic: Help
Next Topic: How to release locks on a table
Goto Forum:

Current Time: Mon Aug 21 16:49:49 CDT 2017

Total time taken to generate the page: 0.15136 seconds