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 - 2012 * SQL Query Help < Previous Next >

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

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19654
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 10:20 pm:    Edit Post Delete Post View Post/Check IP


Lenevo:




oracle apps...
Top of pagePrevious messageNext messageBottom of page Link to this message

Dobbey
Mudiripoyina Bewarse
Username: Dobbey

Post Number: 11142
Registered: 12-2009
Posted From: 24.107.202.203

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

Posted on Wednesday, April 11, 2012 - 10:08 pm:    Edit Post Delete Post View Post/Check IP


Lenevo:




Adii on lo untee maa roommate ee aapesthaadu .... Nen tellari legisi heater eskovalsi osthandii
CLIPART--smoke
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 217
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 10:05 pm:    Edit Post Delete Post View Post/Check IP

ac taginchukooo bayta climate baledu aslkeee MOVIEART--dv.exp1
Top of pagePrevious messageNext messageBottom of page Link to this message

Dobbey
Mudiripoyina Bewarse
Username: Dobbey

Post Number: 11140
Registered: 12-2009
Posted From: 24.107.202.203

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

Posted on Wednesday, April 11, 2012 - 10:01 pm:    Edit Post Delete Post View Post/Check IP


Lenevo:




Edi edi soup taaga muppav liter... Inkaa digindii padisam
CLIPART--smoke
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 216
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 9:59 pm:    Edit Post Delete Post View Post/Check IP

jafffa ,

mamlni pesanthamgaa matadu koniyavaaa MOVIEART--bemmi.lungi
Top of pagePrevious messageNext messageBottom of page Link to this message

Jaffaa
Mudiripoyina Bewarse
Username: Jaffaa

Post Number: 20716
Registered: 03-2008
Posted From: 24.7.65.4

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

Posted on Wednesday, April 11, 2012 - 9:57 pm:    Edit Post Delete Post View Post/Check IP


Dobbey:



Lenovo:


MOVIEART--bemmi.sarle
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 215
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 9:55 pm:    Edit Post Delete Post View Post/Check IP

vakeee bavay ,

inthaki maaan esaavaa

MOVIEART--bemmi.aggipulla
Top of pagePrevious messageNext messageBottom of page Link to this message

Dobbey
Mudiripoyina Bewarse
Username: Dobbey

Post Number: 11138
Registered: 12-2009
Posted From: 24.107.202.203

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

Posted on Wednesday, April 11, 2012 - 9:54 pm:    Edit Post Delete Post View Post/Check IP


Lenevo:




Naa technology ee bammardee..same to same
CLIPART--smoke
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 214
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 9:48 pm:    Edit Post Delete Post View Post/Check IP

no problem ravana ,
inthaki deni meda work sethntav nuvvu
MOVIEART--avataram
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19653
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 9:34 pm:    Edit Post Delete Post View Post/Check IP


Sasibabu:




MOVIEART--bemmi.madatha
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19652
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 9:29 pm:    Edit Post Delete Post View Post/Check IP


Lenevo:




sample ga ichaga baa..ikkada vere ga rasa similar logic..keka la working..thanks baa
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 213
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 9:12 pm:    Edit Post Delete Post View Post/Check IP

RAVANA BEMMA

antha kastapadi query antha sendalamga rase badulu subaramgaa 2 derived tables thesukuni left join sethe saripoyedi kdaaa, MOVIEART--bemmi.aggipulla
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19651
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 9:09 pm:    Edit Post Delete Post View Post/Check IP


Lenevo:




thanks baa...aagu test chestha :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19650
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 9:08 pm:    Edit Post Delete Post View Post/Check IP

select nvl(amount, select amount from table a
where end_date = (select max(end_date) from table a
where end_date <= effective_date
) ) from table a
where effective_date between start_date and end_date
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 212
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 9:08 pm:    Edit Post Delete Post View Post/Check IP

top 1 order by desc

else

max (end_date) where end_date < effect date ,,,

both will work
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 211
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 9:06 pm:    Edit Post Delete Post View Post/Check IP

ok then my ogic shoud work for u , i think ..
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19649
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 9:05 pm:    Edit Post Delete Post View Post/Check IP

ammani..neeku chepthunte query vachinattundi..aagu rastha..
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19648
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 9:04 pm:    Edit Post Delete Post View Post/Check IP


Lenevo:




kaadu annai...query ki effective_date anedi dynamic ga pass avuthundi. if the data doesn't fall in any of the start and end date of a record..then we need to get the record where the end_date is max of all end_dates <= effective_date..
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 210
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 8:59 pm:    Edit Post Delete Post View Post/Check IP

START DATE UNDI END DATE UNDI ,

MADYALO EFFECTIVE DATE ENTI //

o5-sep-2012 ki last max date ante 01-sep ravali kdaa?

am i wrong or miss understood
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 209
Registered: 05-2011
Posted From: 67.4.34.76

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

Posted on Wednesday, April 11, 2012 - 8:57 pm:    Edit Post Delete Post View Post/Check IP

1. IF FALLS IN THE START AND END DATES ,QUERY RAYI
TAKE @@ROWCOUNT VALUE IN VAR /

IF VAR = 0

THEN

GET MAX(END_DT) FROM TABLE WHERE END_DATE < 05-SEP ORDER BY DESC
Top of pagePrevious messageNext messageBottom of page Link to this message

Sasibabu
Yavvanam Kaatesina Bewarse
Username: Sasibabu

Post Number: 7729
Registered: 10-2010
Posted From: 160.109.62.97

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

Posted on Wednesday, April 11, 2012 - 8:52 pm:    Edit Post Delete Post View Post/Check IP


Ravanabrahma:


maayyaaaa ....aapu nee sodhi MOVIEART--bemmi.lungi
Jai Tara ,Jai Jai Tara
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19647
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 8:51 pm:    Edit Post Delete Post View Post/Check IP


Onlymovies:

where end_date < 'date' and rownum = 1 order by end_date desc




idi work avvadu baa...date value 05-sep-12 ani isthe it gets the 1st row where the end_date is 31-may-2012
Top of pagePrevious messageNext messageBottom of page Link to this message

Onlymovies
Mudiripoyina Bewarse
Username: Onlymovies

Post Number: 24963
Registered: 01-2009
Posted From: 69.250.72.135

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

Posted on Wednesday, April 11, 2012 - 8:40 pm:    Edit Post Delete Post View Post/Check IP

where end_date < 'date' and rownum = 1 order by end_date desc
SHER.. BABBAR SHER
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Mudiripoyina Bewarse
Username: Ravanabrahma

Post Number: 19646
Registered: 06-2004
Posted From: 99.67.73.204

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

Posted on Wednesday, April 11, 2012 - 8:33 pm:    Edit Post Delete Post View Post/Check IP

oka table lo data ila undi..

start date end_date amount

1-jan-12 31-may-12 1500

12-aug-12 01-sep-12 1345.76


12-nov-12 31-dec-12 1700

table where lo effective_date ani nenu 05-sep-12 ani isthe it should get the 2nd record. If the given date falls inbetween the start and end date then that record will be fetched. If not it should get the previous end date record. ela rayali query?

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