kittaya Posted December 29, 2016 Report Posted December 29, 2016 4 minutes ago, mettastar said: decode Quote
4Vikram Posted December 29, 2016 Author Report Posted December 29, 2016 4 minutes ago, kittaya said: function rasi danini call chesuko statement lo ... rayali mari aekkado oka chota thappadhu will check thanks 1 minute ago, ceelogreen said: oka table la 47 entries eskoni aa table ni nee query lo join sesko... nice thanks Quote
4Vikram Posted December 29, 2016 Author Report Posted December 29, 2016 5 minutes ago, johnubhai_01 said: aa output ki kotthaga inkem chestham man.. nasty vuncle Quote
mettastar Posted December 29, 2016 Report Posted December 29, 2016 select A.state, NVL(B.RNK,'SOMEDEFAULT') from table A left join (select distinct state, dense_rank() (order by state) rnk from table) B on A.STATE=B.STATE This works if you are numbering the states in sequential order Quote
mettastar Posted December 29, 2016 Report Posted December 29, 2016 5 minutes ago, johnubhai_01 said: RANK vadda rank kuda raasa vuncle Quote
johnubhai_01 Posted December 29, 2016 Report Posted December 29, 2016 3 minutes ago, mettastar said: rank kuda raasa vuncle nenu ade iddamanukunna but varchar ki ranking ivvaru kada ani post cheyaled. Quote
4Vikram Posted December 29, 2016 Author Report Posted December 29, 2016 8 minutes ago, mettastar said: select A.state, NVL(B.RNK,'SOMEDEFAULT') from table A left join (select distinct state, dense_rank() (order by state) rnk from table) B on A.STATE=B.STATE This works if you are numbering the states in sequential order this would be perfect but ipude susna aa table la states names tho paatu inka chaala unai like numbers and some other values also Quote
kick_seenu Posted December 29, 2016 Report Posted December 29, 2016 select var = ROW_NUMBER() over (partition by AD order by AD) from your table Quote
Manikyam Posted December 29, 2016 Report Posted December 29, 2016 1 hour ago, 4Vikram said: this would be perfect but ipude susna aa table la states names tho paatu inka chaala unai like numbers and some other values also still tat works Quote
4Vikram Posted December 29, 2016 Author Report Posted December 29, 2016 6 minutes ago, kick_seenu said: select var = ROW_NUMBER() over (partition by AD order by AD) from your table this works if I have only states man but akada aa table lo inka vere values kuda unai so idhi not working.. paina mettastar vuncle chepindi working Quote
Manikyam Posted December 29, 2016 Report Posted December 29, 2016 Just now, 4Vikram said: this works if I have only states man but akada aa table lo inka vere values kuda unai so idhi not working.. paina mettastar vuncle chepindi working select only state field Quote
4Vikram Posted December 29, 2016 Author Report Posted December 29, 2016 13 minutes ago, Manikyam said: select only state field yeah cheyochu but county ani inko column kuda undi adi kuda kavale anduke not working Quote
ranku_mogudu Posted December 29, 2016 Report Posted December 29, 2016 mettastar ichina ref table with rank is the best way to do, migatha values as per state untey add chesuko Quote
JollyBoy Posted December 29, 2016 Report Posted December 29, 2016 19 minutes ago, 4Vikram said: yeah cheyochu but county ani inko column kuda undi adi kuda kavale anduke not working nuv rasina query ikada vey.. sample columns and update column Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.