Topics Topics Help/Instructions Help Edit Profile Profile Member List Register Paatha Gnyapakaalu - Archives from Old DB  
Search New Posts 1 | 2 | 8 Hours Search New Posts 1 | 3 | 7 Days Search Search Tree View Tree View Latest tweets Live Tweets
Bewarse Talk Discussion Board * Archives - 2009 * Bewarse Bewarse Bewarse * Archive through March 11, 2009 * How to extract fiscal year and month from sysdate < Previous Next >

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Bewarse Legend
Username: Nayakudu

Post Number: 10800
Registered: 05-2005
Posted From: 72.24.41.92

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 7:58 pm:    Edit Post Delete Post View Post/Check IP

GOSI baaa manam guntur biddalam mana kaka pothey evaru rastharu queries
hasta la victoria siempre
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Bewarse Legend
Username: Nayakudu

Post Number: 10799
Registered: 05-2005
Posted From: 72.24.41.92

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 7:57 pm:    Edit Post Delete Post View Post/Check IP

ohhh ok mama cool aithey
hasta la victoria siempre
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8844
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 7:51 pm:    Edit Post Delete Post View Post/Check IP

jan-09 ante dec data raavali..

jan ante fm vachi 7 kaani naa logic prakaram 6(means dec data) vasthadi..

month(1) is <= 7 kabatti same year 2009 untundi as fm which is correct for dec-08 data...so it works..
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Bewarse Legend
Username: Nayakudu

Post Number: 10798
Registered: 05-2005
Posted From: 72.24.41.92

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 7:48 pm:    Edit Post Delete Post View Post/Check IP

ledu sysdate jan-09 petti chudu... dec-08 raka povochhu yemo
hasta la victoria siempre
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8843
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 7:45 pm:    Edit Post Delete Post View Post/Check IP

sysdate dec-08 anaa mama??

appudu manaki nov data ravali..so fm = 6 kani naa coding lo 5 so nov data nee...inka month > 7 kabatti fy vachi 2009...so data bagane untundi...
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Bewarse Legend
Username: Nayakudu

Post Number: 10794
Registered: 05-2005
Posted From: 72.24.41.92

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 7:41 pm:    Edit Post Delete Post View Post/Check IP

hemu baa yendukaina better dec 08 data vasthundo ledo check cheyyii naku yenduko ekkado apasruthi anipisthundi
hasta la victoria siempre
Top of pagePrevious messageNext messageBottom of page Link to this message

Blazewada
Kurra Bewarse
Username: Blazewada

Post Number: 947
Registered: 08-2008
Posted From: 218.186.12.229

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 7:17 pm:    Edit Post Delete Post View Post/Check IP

mottanikee mana DB lo DB experts baane unnarugaa...
New politics for a New Generation -
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8842
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 7:05 pm:    Edit Post Delete Post View Post/Check IP

nayakesh kummesthadu assala coding lo..

packages create chesi padesa views create chesi..inka concurrent programs create chesthunna..output xls file ni email cheselaga..kiki..testing chesthunna inka ala email vasthunda leda ani...kiki..
Top of pagePrevious messageNext messageBottom of page Link to this message

Gochi
Bewarse Legend
Username: Gochi

Post Number: 58990
Registered: 07-2004
Posted From: 24.229.138.244

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:55 pm:    Edit Post Delete Post View Post/Check IP

decodes tho kummesaavgaa nayakesh,good job...nenukotam fiscal year ki edo sepcific function kooda unduntundhi oracle lo


Bewarse Legend Of The Year 2008 Award winner
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8841
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:54 pm:    Edit Post Delete Post View Post/Check IP

sys_calander table ledu mama..nenu Oracle vaduthunna..aagu chostha..
Top of pagePrevious messageNext messageBottom of page Link to this message

Infinity
Celebrity Bewarse
Username: Infinity

Post Number: 5875
Registered: 04-2005
Posted From: 75.181.165.158

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:36 pm:    Edit Post Delete Post View Post/Check IP

simple ga sys_calendar tho join cheyyi on date to get any calander specific values

sel c.fiscal_year, c.fiscal_month, t.date from table1 t, sys_calander c
where t.date = c.calander_date

where sys_calander is system default calander table. In retail the DW model should have fiscal_calander table with above columns. check it
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8840
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:34 pm:    Edit Post Delete Post View Post/Check IP

thanks nayakesh
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8839
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:32 pm:    Edit Post Delete Post View Post/Check IP

hehe..kathi laga work ayyindi nayakesh...feb data vachesindi..hehe..kani ekkadanna edanna month ki thanthuda extreme case ani chosthunna..like Jan, jul ala months lo..ekkada thannetattu ledu...
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8838
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:28 pm:    Edit Post Delete Post View Post/Check IP

sorry..this is the logic.


WHERE sde.f_accounting_period_yr = CASE
WHEN EXTRACT(MONTH FROM SYSDATE) <= 7 THEN EXTRACT(YEAR FROM SYSDATE)
ELSE EXTRACT(YEAR FROM SYSDATE) + 1
END
AND sde.f_accounting_period_mm = DECODE(EXTRACT(MONTH FROM SYSDATE), 1, 6,
2, 7,
3, 8,
4, 9,
5, 10,
6, 11,
7, 12,
8, 1,
9, 2,
10, 3,
11, 4,
12, 5)
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8837
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:26 pm:    Edit Post Delete Post View Post/Check IP

suppose ippudu jul-09 anuko sysdate..general ga ayithe fy 2010..kani nenu jun-09 data raavali..ante fy 2009 ee pass cheyyali so <= 7 ayithe current year ee undetattu petta...
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8836
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:25 pm:    Edit Post Delete Post View Post/Check IP

thappa...

ippudu sysdate Mar-09 anuko..I need to get the data for Feb-09 mama...so decode lo oka month thaggincha...
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8835
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:24 pm:    Edit Post Delete Post View Post/Check IP

nayakesh...nuvvu racha assala...nee logic ni konchem marchukunna na req laaga..kummesav assala logic...add chesesa where condition lo..looks like its running fine..konchem time paduthundi.results vachaka cheptha..

WHERE sde.f_accounting_period_yr = CASE
WHEN EXTRACT(MONTH FROM SYSDATE) <= 7 THEN EXTRACT(YEAR FROM SYSDATE)
ELSE EXTRACT(YEAR FROM SYSDATE) + 1
END
AND sde.f_accounting_period_mm = DECODE(EXTRACT(MONTH FROM SYSDATE), 1, 7,
2, 8,
3, 9,
4, 10,
5, 11,
6, 12,
7, 1,
8, 2,
9, 3,
10, 4,
11, 5,
12, 6)
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Bewarse Legend
Username: Nayakudu

Post Number: 10793
Registered: 05-2005
Posted From: 72.24.41.92

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:20 pm:    Edit Post Delete Post View Post/Check IP

adi thappu
hasta la victoria siempre
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8834
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:13 pm:    Edit Post Delete Post View Post/Check IP

since I need the previous month data..I need to reduce one month...

DECODE(EXTRACT(MONTH FROM SYSDATE), 1, 6,
2, 7,
3, 8,
4, 9,
5, 10,
6, 11,
7, 12,
8, 1,
9, 2,
10, 3,
11, 4,
12, 5)
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8833
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:11 pm:    Edit Post Delete Post View Post/Check IP

hehe..decode for month is working...inka year di soodali..
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8832
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:09 pm:    Edit Post Delete Post View Post/Check IP

where condition lo ee decode pani chesthada nayakesh...aagu chostha..
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Bewarse Legend
Username: Nayakudu

Post Number: 10792
Registered: 05-2005
Posted From: 72.24.41.92

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:05 pm:    Edit Post Delete Post View Post/Check IP

case
when get_date_part(sysdate, 'MM') <= 6 THEN get_date_part(sysdate, 'YYYY')
else get_date_part(sysdate, 'YYYY') + 1
end

idi fiscal year ki
hasta la victoria siempre
Top of pagePrevious messageNext messageBottom of page Link to this message

Nayakudu
Bewarse Legend
Username: Nayakudu

Post Number: 10791
Registered: 05-2005
Posted From: 72.24.41.92

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 6:03 pm:    Edit Post Delete Post View Post/Check IP

decode(get_date_part(sysdate, 'MM'), 1, 7,
2, 8,
3, 9,
4, 10,
5, 11,
6, 12,
7, 1,
8, 2,
9, 3,
10, 4,
11, 5,
12, 6)

idi fiscal month ki
hasta la victoria siempre
Top of pagePrevious messageNext messageBottom of page Link to this message

One
Pilla Bewarse
Username: One

Post Number: 178
Registered: 02-2009
Posted From: 76.184.165.237

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 5:47 pm:    Edit Post Delete Post View Post/Check IP


Action:-Be slow in action and when you act be steady
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8831
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 5:44 pm:    Edit Post Delete Post View Post/Check IP

Top of pagePrevious messageNext messageBottom of page Link to this message

One
Pilla Bewarse
Username: One

Post Number: 177
Registered: 02-2009
Posted From: 76.184.165.237

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 5:43 pm:    Edit Post Delete Post View Post/Check IP


Action:-Be slow in action and when you act be steady
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8830
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 5:36 pm:    Edit Post Delete Post View Post/Check IP

these are the values for fiscal year and month

Jan-09 ante fy = 2009 fm = 7
Feb-09 ante fy = 2009 fm = 8
Jun-09 ante fy = 2009 fm = 12


Jul-09 ante fy = 2010 fm = 1
Dec-09 ante fy = 2010 fm = 6
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 8829
Registered: 06-2004
Posted From: 65.196.167.82

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, March 03, 2009 - 5:32 pm:    Edit Post Delete Post View Post/Check IP

ippudu sysdate 03-Mar-09 undi..

ante fiscal year 2009 and fiscal month = 9

avi ela extract cheyyali??

I am creating a report where I need to pass these values in where condition. This report runs on every month 1st. so Jan 1st 2009 run avuthundi ante previous month ki run avvali..ante dec 2008 ki..ante fy= 2009 and fm = 6 annattu..

ela thesukuravali ee fy and fm

Topics | Last Hour | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration