Home » SQL & PL/SQL » SQL & PL/SQL » Record count
Record count [message #243379] Thu, 07 June 2007 02:46 Go to next message
dr46014
Messages: 48
Registered: February 2007
Member
hi
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: 64119
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.

Regards
Michel

Re: Record count [message #243386 is a reply to message #243384] Thu, 07 June 2007 02:57 Go to previous message
ammishra
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')



--Yash

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

Report message to a moderator

Previous Topic: New member ! New Problem in query...help me !
Next Topic: Change of Order BY clause in Cursor
Goto Forum:
  


Current Time: Tue Dec 06 10:20:53 CST 2016

Total time taken to generate the page: 0.11040 seconds