Jump to content

Simple Sql Query Doubt


tejak123

Recommended Posts

subquery lo outer query lo unna user tho validate cheyali, ledante outer query lo prathi row ki inner query lo table mottam validate chestadi, not effective. Also, NOT IN kante not exists use cheyadam better performance antaaru.

 

cool..

 

nenu edo paina paina sql.. we use sql but edhi better in performance antha idea ledu :3D_Smiles_56: .. rest/soap wcf and azure mathrame better idea undi 

Link to comment
Share on other sites

  • Replies 67
  • Created
  • Last Reply

Top Posters In This Topic

  • tejak123

    16

  • puli_keka

    12

  • JollyBoy

    11

  • SUbba LIngam

    10

Popular Days

Top Posters In This Topic

size batti man .. small sets ki ok

 

general ga prathi table lo bagane untadi kada data,,,,,,,, nenu ayithe evaina harcoded values validation ki matrame use chesta NOT IN

Link to comment
Share on other sites

ante?

 

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY  not like   '%[0-9]%' 

.///
 
 
idhi user konna  numeric category product  theesi albhabet category konnadhi ni isthe .. :(

 

 

Link to comment
Share on other sites

ardam kale

 

evaranna nannu quote chesthe notification ravali ani theddu vesa and settings changed and you are first one to quote me after setting change 

Link to comment
Share on other sites

evaranna nannu quote chesthe notification ravali ani theddu vesa and settings changed and you are first one to quote me after setting change 

 


PK-1.gif

Link to comment
Share on other sites

@KaatiKapari    naa query ni nuvvu cheppina prakaram optimize karke idhar paste kar

 

nuv vesina post paina ne undi man, chudu.

Link to comment
Share on other sites

SELECT DISTINCT userid
FROM temptable
WHERE userid NOT IN (
        SELECT DISTINCT userid
        
FROM temptable
        
WHERE PRODUCT_BOUGHT_CATEGORY LIKE '%[0-9]%'
        ).///

 

 

 

Error...cannot recognise select, distinct, userid in expression specification ani error vasthundhi bhaiya

Link to comment
Share on other sites

cool..

 

nenu edo paina paina sql.. we use sql but edhi better in performance antha idea ledu  .. rest/soap wcf and azure mathrame better idea undi 

 

naku bhi em raadu mayya, asalu first job ekkemundu varaku database ante kuda idea lekunde  :3D_Smiles_56:

Link to comment
Share on other sites

SELECT DISTINCT userid
FROM temptable
WHERE userid NOT IN (
        SELECT DISTINCT userid
        
FROM temptable
        
WHERE PRODUCT_BOUGHT_CATEGORY LIKE '%[0-9]%'
        ).///

 

 

 

Error...cannot recognise select, distinct, userid in expression specification ani error vasthundhi bhaiya

 

nenu temptable ani create cheskoni test chesa.. change table column names ragada8.gif

Link to comment
Share on other sites

this was the same argument that came up last week with an architect..I defended it saying both are same performance(and its true they are same at least it is justified based on the execution plan) but it is advisable because its more clear to the second eye what the intention is and sometimes not in works weirdly based on the column property..grammar thapul unte kshminchu asal ardam lekunte marninchu

subquery lo outer query lo unna user tho validate cheyali, ledante outer query lo prathi row ki inner query lo table mottam validate chestadi, not effective. Also, NOT IN kante not exists use cheyadam better performance antaaru.

 

Link to comment
Share on other sites

this was the same argument that came up last week with an architect..I defended it saying both are same performance(and its true they are same at least it is justified based on the execution plan) but it is advisable because its more clear to the second eye what the intention is and sometimes not in works weirdly based on the column property..grammar thapul unte kshminchu asal ardam lekunte marninchu

 

sunil1.gif

Link to comment
Share on other sites

Select user from tablename where LENGTH(TRIM(TRANSLATE(product_brought_category', ' +-.0123456789',' '))) is not null... This should work i guess

 

<>  meeda click chesi code paste chey when you edit and select SQL

Link to comment
Share on other sites

×
×
  • Create New...