Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Oracle > Last day using accounting_period and fiscal_year

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-02-08, 11:36
nandinir nandinir is offline
Registered User
 
Join Date: Jul 2005
Posts: 234
Last day using accounting_period and fiscal_year

Hi,

I want to retrieve the amounts from a table with ledger value xxx for the end of period processing(month end). I have fiscal year and accounting_period. Can someone please tell me how I can get this.

Thanks in advance!

Nandini
Reply With Quote
  #2 (permalink)  
Old 07-02-08, 12:25
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 3,564
create a lookup table that contains the data you desire & populate it.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
Reply With Quote
  #3 (permalink)  
Old 07-02-08, 13:47
nandinir nandinir is offline
Registered User
 
Join Date: Jul 2005
Posts: 234
But how do I get the last_day using fiscal_year and accounting_period using LAST_DAY function?
Reply With Quote
  #4 (permalink)  
Old 07-02-08, 14:04
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 3,564
Does every final day of every accounting_period always occur on the last day of a month?
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
Reply With Quote
  #5 (permalink)  
Old 07-02-08, 14:20
nandinir nandinir is offline
Registered User
 
Join Date: Jul 2005
Posts: 234
No, its different for every record. Infact I want the last_day of the previous month. Supposedly, I'm running a report today, I want all the records as of Jun 30, 08.

Hope I'm clear.
Reply With Quote
  #6 (permalink)  
Old 07-02-08, 14:26
beilstwh beilstwh is offline
Registered User
 
Join Date: Jun 2004
Location: Liverpool, NY USA
Posts: 1,642
say you have table with the accounting periods

Code:
period number start_date date; end_date date; select a.start_date - 1 into end_prev_period from periods a where trunc(sysdate) between a.start_date and a.end_date;
__________________
Bill
Cream always raises to the top, and so does the scum!!
Reply With Quote
  #7 (permalink)  
Old 07-14-08, 10:08
nandinir nandinir is offline
Registered User
 
Join Date: Jul 2005
Posts: 234
I'm sorry everyone. I didnt get a chance to reply.
What I'm looking for is as follows-

Sno. date
1. 11-jan-2008
2. 5-apr-2007
3 17-dec-2007
4 4-jul-2008
5 10-jul-2008
.
.
Assume I'm running the report today, I want all the records for the current period. In this situation, if I'm running the report in Jul it will return 4 and 5 records.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On