KaNTRhi Posted February 16, 2017 Author Share Posted February 16, 2017 Aa case statement lo prathi condition ki same value return chesthunnaav kadaa (a.tree_node)? Why? A.tree_node lo ne Tree Level Desc store avuddi (ex: Tree_level_num = 1 then A.tree_node = Account Tree_level_num = 1= 2 then Cash.. ilaa store avuthayi values.) Link to comment Share on other sites More sharing options...
nbk@myHeart Posted February 16, 2017 Share Posted February 16, 2017 Group by ettesi distinct petti choodu with the case statement I have give above Link to comment Share on other sites More sharing options...
nbk@myHeart Posted February 16, 2017 Share Posted February 16, 2017 It wont work.. Case statement syntax ye wrong.. we are using when in each statement and not ending.. syntax error ane coming at 1st statement only (case) Aa alias ettesinaa koodaa pani cheyyatledaa? Link to comment Share on other sites More sharing options...
Ramarajyam Posted February 16, 2017 Share Posted February 16, 2017 Asuming ur table name is tabA and columns are id, col1 col2 etc.... Select a.id, a. Col1, coalesce(a.col2, b.col2, c.col2....), coalesce(a.col3, b.col3, c.col3...) ..... From TabA a Left. Join TabA b On a.id = b.id Left join TabA c On a.id = c.id . . . . . Where B. Col2 is not null And c.col3 is not null And d.col4 is not null . . . ; Assuming ur id is PK Link to comment Share on other sites More sharing options...
chsrk Posted February 16, 2017 Share Posted February 16, 2017 Venky uncle..please charge kuplee Rs 10,000 for consultation fee....free ga solutions provide chesthe marinni questions aduguthaadu.. Link to comment Share on other sites More sharing options...
nbk@myHeart Posted February 16, 2017 Share Posted February 16, 2017 Venky uncle..please charge kuplee Rs 10,000 for consultation fee....free ga solutions provide chesthe marinni questions aduguthaadu.. Mana medadu ki metha annattu Link to comment Share on other sites More sharing options...
AP_RaituBidda Posted February 16, 2017 Share Posted February 16, 2017 Mana medadu ki metha annattu adi alaa undaali pratidi SRK laaga commercial gaa kaadu Link to comment Share on other sites More sharing options...
chsrk Posted February 16, 2017 Share Posted February 16, 2017 Mana medadu ki metha annattu Adhi Kuplee Medhadu ki kootha Venky uncle...akkai ki adhi ettagu ledhu kabatti asalu godave ledhu..Bemmie laugh Link to comment Share on other sites More sharing options...
AP_RaituBidda Posted February 16, 2017 Share Posted February 16, 2017 Adhi Kuplee Medhadu ki kootha Venky uncle...akkai ki adhi ettagu ledhu kabatti asalu godave ledhu..Bemmie laugh adi lekundaanee job chestunna naa Link to comment Share on other sites More sharing options...
nbk@myHeart Posted February 16, 2017 Share Posted February 16, 2017 Link to comment Share on other sites More sharing options...
AP_RaituBidda Posted February 16, 2017 Share Posted February 16, 2017 :( Link to comment Share on other sites More sharing options...
SasiBabu Posted February 16, 2017 Share Posted February 16, 2017 annay neku oka row ne kavala ayte neku ye columns not null kavalo vatiki max thagilinchi ..ye columns ayte null expect chestunaro avi columns list lo petti vatiki group by thagilinchandi Link to comment Share on other sites More sharing options...
KaNTRhi Posted February 16, 2017 Author Share Posted February 16, 2017 annay neku oka row ne kavala ayte neku ye columns not null kavalo vatiki max thagilinchi ..ye columns ayte null expect chestunaro avi columns list lo petti vatiki group by thagilinchandi Uncle... aa Case when lo elaa isthamu ee values (For each level)?? Link to comment Share on other sites More sharing options...
chsrk Posted February 16, 2017 Share Posted February 16, 2017 Kuplee..yaak thupuk Link to comment Share on other sites More sharing options...
KaNTRhi Posted February 16, 2017 Author Share Posted February 16, 2017 Asuming ur table name is tabA and columns are id, col1 col2 etc.... Select a.id, a. Col1, coalesce(a.col2, b.col2, c.col2....), coalesce(a.col3, b.col3, c.col3...) ..... From TabA a Left. Join TabA b On a.id = b.id Left join TabA c On a.id = c.id . . . . . Where B. Col2 is not null And c.col3 is not null And d.col4 is not null . . . ; Assuming ur id is PK RR uncle.. konchem aa SQL lo ne.. miru paina vesina syntax ki modify chesi ivvavaaa Link to comment Share on other sites More sharing options...
KaNTRhi Posted February 16, 2017 Author Share Posted February 16, 2017 Kuplee..yaak thupuk Ebbey.. theliyanide ga asking Niku thelisthe solution cheppu Link to comment Share on other sites More sharing options...
KaNTRhi Posted February 16, 2017 Author Share Posted February 16, 2017 annay neku oka row ne kavala ayte neku ye columns not null kavalo vatiki max thagilinchi ..ye columns ayte null expect chestunaro avi columns list lo petti vatiki group by thagilinchandi Edaina oka example vadulu uncle Link to comment Share on other sites More sharing options...
AP_RaituBidda Posted February 16, 2017 Share Posted February 16, 2017 Ebbey.. theliyanide ga asking Niku thelisthe solution cheppu evarini yem adugutunnav daatar goru ni SQl kupleee kochen asking aaa Link to comment Share on other sites More sharing options...
KaNTRhi Posted February 16, 2017 Author Share Posted February 16, 2017 Group by ettesi distinct petti choodu with the case statement I have give above Ok.. malli repu office ki poyina tharuvatha kusthi padali Link to comment Share on other sites More sharing options...
AP_RaituBidda Posted February 16, 2017 Share Posted February 16, 2017 Ok.. malli repu office ki poyina tharuvatha kusthi padali congrats uncle Link to comment Share on other sites More sharing options...
KaNTRhi Posted February 16, 2017 Author Share Posted February 16, 2017 evarini yem adugutunnav daatar goru ni SQl kupleee kochen asking aaa Ayana savantharyami... ayanaki rani technology ledu Akkai.. please spam cheyaku Link to comment Share on other sites More sharing options...
SasiBabu Posted February 16, 2017 Share Posted February 16, 2017 Uncle... aa Case when lo elaa isthamu ee values (For each level)?? just ni query lo case mundhu max pettu annay Link to comment Share on other sites More sharing options...
chsrk Posted February 16, 2017 Share Posted February 16, 2017 Ebbey.. theliyanide ga asking Niku thelisthe solution cheppu okosaari Pedda rocket kooda chinna bolt sarileka aagipothundhi...inkosaari simple problems ki kooda solutions dorakka ginjukuntam...asumantappudu duppati kappukuni thongunta nenaithe....thellarayye sariki adhe solve aiyyiddi...anxiety disorder ni pakkana etti peaceful mind tho alosinchu solution Nee Pakka llo undiddi.. Link to comment Share on other sites More sharing options...
AP_RaituBidda Posted February 16, 2017 Share Posted February 16, 2017 Ayana savantharyami... ayanaki rani technology ledu Akkai.. please spam cheyaku anthe antaava ayyithe ok Link to comment Share on other sites More sharing options...
Ramarajyam Posted February 16, 2017 Share Posted February 16, 2017 RR uncle.. konchem aa SQL lo ne.. miru paina vesina syntax ki modify chesi ivvavaaa Nee table name and column list vai code raasi pamputha Link to comment Share on other sites More sharing options...
aditya2304 Posted February 16, 2017 Share Posted February 16, 2017 Use xml auto to stuff data Just look into it Link to comment Share on other sites More sharing options...
Husker Posted February 16, 2017 Share Posted February 16, 2017 CTE work avvada Link to comment Share on other sites More sharing options...
SasiBabu Posted February 16, 2017 Share Posted February 16, 2017 Edaina oka example vadulu uncle annay oka select statement rayi aa select statement lo anni columns mention cheyi(ne actual qry lo vunnavi) ni actual qry ni from clause lo petti appudu max and group by use chey Link to comment Share on other sites More sharing options...
KaNTRhi Posted February 16, 2017 Author Share Posted February 16, 2017 Nee table name and column list vai code raasi pamputha SELECT D.ACCOUNT, A.TREE_NAME,A.EFFDT,D.DESCR, D.SETID, C.range_from , c.range_to, (Tree_node = 1,2,3,4,5,6,7,8,9 as Level_1 to Level_9) FROM PSTREENODE A, PSTREENODE B, PSTREEBRANCH E, PSTREELEAF C, PS_GL_ACCOUNT_TBL D Criteria: A B C E laki Effdt criteria undi.. A.SETID = 'COP' A.TREE_NAME = 'ACCT' and d.account between '101' and '102' Ivi anni delivered tables.. so niku online lo kooda keys dorukuthai... Link to comment Share on other sites More sharing options...
SasiBabu Posted February 16, 2017 Share Posted February 16, 2017 CTE work avvada ya nenu pyna cheppina logic ki alternative cte kakapothe nenu sub qry use chesanu Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.