Author |
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: |
|
GOSI baaa manam guntur biddalam mana kaka pothey evaru rastharu queries hasta la victoria siempre
|
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: |
|
ohhh ok mama cool aithey hasta la victoria siempre
|
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: |
|
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.. |
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: |
|
ledu sysdate jan-09 petti chudu... dec-08 raka povochhu yemo hasta la victoria siempre
|
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: |
|
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... |
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: |
|
hemu baa yendukaina better dec 08 data vasthundo ledo check cheyyii naku yenduko ekkado apasruthi anipisthundi hasta la victoria siempre
|
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: |
|
mottanikee mana DB lo DB experts baane unnarugaa... New politics for a New Generation -
|
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: |
|
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.. |
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: |
|
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
|
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: |
|
sys_calander table ledu mama..nenu Oracle vaduthunna..aagu chostha.. |
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: |
|
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 |
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: |
|
thanks nayakesh |
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: |
|
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... |
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: |
|
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) |
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: |
|
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... |
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: |
|
thappa... ippudu sysdate Mar-09 anuko..I need to get the data for Feb-09 mama...so decode lo oka month thaggincha... |
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: |
|
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) |
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: |
|
adi thappu hasta la victoria siempre
|
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: |
|
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) |
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: |
|
hehe..decode for month is working...inka year di soodali.. |
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: |
|
where condition lo ee decode pani chesthada nayakesh...aagu chostha.. |
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: |
|
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
|
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: |
|
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
|
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: |
|
Action:-Be slow in action and when you act be steady
|
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: |
|
|
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: |
|
Action:-Be slow in action and when you act be steady
|
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: |
|
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 |
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: |
|
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 |