JollyBoy Posted December 30, 2016 Report Posted December 30, 2016 1 minute ago, 4Vikram said: create cheyale table lo ledu.. its like new column for result set anthe alter table [tbl_APP_DROPDOWN_VALUES] add STATE_ID int idi run chesi malli payi query run chey Quote
4Vikram Posted December 30, 2016 Author Report Posted December 30, 2016 7 minutes ago, JollyBoy said: alter table [tbl_APP_DROPDOWN_VALUES] add STATE_ID int idi run chesi malli payi query run chey baa point endi ante cant add new column to that table.. General ga manam use chestam kada firstname +lastname = fullname ani result set lo atla ravali.. ill show you one query what I already used and its working now.. SELECT A.[MWC_ID] ,A.[CATEGORY_1] ,A.[CATEGORY_2] ,A.[STRING_VALUE1] ,A.[STRING_VALUE2] ,B.STATE_ID FROM [tbl_APP_DROPDOWN_VALUES] A LEFT JOIN (SELECT [STRING_VALUE1], DENSE_RANK() OVER (ORDER BY [STRING_VALUE1]) STATE_ID FROM [tbl_APP_DROPDOWN_VALUES] WHERE CATEGORY_1 = 'State' AND CATEGORY_2 = 'County') B ON A.[STRING_VALUE1]=B.[STRING_VALUE1] WHERE CATEGORY_1 = 'State' AND CATEGORY_2 = 'County' Quote
JollyBoy Posted December 30, 2016 Report Posted December 30, 2016 2 minutes ago, 4Vikram said: baa point endi ante cant add new column to that table.. General ga manam use chestam kada firstname +lastname = fullname ani result set lo atla ravali.. ill show you one query what I already used and its working now.. SELECT A.[MWC_ID] ,A.[CATEGORY_1] ,A.[CATEGORY_2] ,A.[STRING_VALUE1] ,A.[STRING_VALUE2] ,B.STATE_ID FROM [tbl_APP_DROPDOWN_VALUES] A LEFT JOIN (SELECT [STRING_VALUE1], DENSE_RANK() OVER (ORDER BY [STRING_VALUE1]) STATE_ID FROM [tbl_APP_DROPDOWN_VALUES] WHERE CATEGORY_1 = 'State' AND CATEGORY_2 = 'County') B ON A.[STRING_VALUE1]=B.[STRING_VALUE1] WHERE CATEGORY_1 = 'State' AND CATEGORY_2 = 'County' oh k i didnt read from start.. good, let me know if you need anything further Quote
KrishnaDevaRaya Posted December 30, 2016 Report Posted December 30, 2016 state name and StateID tho oka master table create chesuko, main table ni join chesuko master table ki. simple ga ayipodhi. case statements 47 states ki rasthe query chanthadu avvudhi.. Quote
4Vikram Posted December 30, 2016 Author Report Posted December 30, 2016 1 hour ago, JollyBoy said: oh k i didnt read from start.. good, let me know if you need anything further awight 49 minutes ago, KrishnaDevaRaya said: state name and StateID tho oka master table create chesuko, main table ni join chesuko master table ki. simple ga ayipodhi. case statements 47 states ki rasthe query chanthadu avvudhi.. ledu le case statements rayle antha ganam vere laga chesna and that worked well Quote
Picha lite Posted December 30, 2016 Report Posted December 30, 2016 @mettastar em chepthe adi chesi thread close chesi engu... ee thadu lo kuda dkcs enter ayi entertain chestunaru ga 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.