Jump to content

Simple Sql Query Doubt


tejak123

Recommended Posts

USER    | PRODUCT_BOUGHT_CATEGORY

 

 

A            |           YUI

B            |           JHI

C            |         WER

E            |         123

A            |         456

C            |           DFG

B            |          CFT

E            |          365

S            |          ASD

H            |         HJK

E            |         ASD

 

How can i get users who bought atleast one ALPHABET category product and didnt buy numeric Category products..??

 

my output should be 

 

B          

C

S

H

 

 

 

chi. neku idhi kuda raaadha ani thittttukokunda.. cheppandi boss.. :(

 

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

ila endhuku thittukuntaru anna ..... LTT for jambalheart

USER    | PRODUCT_BOUGHT_CATEGORY

 

 

A            |           YUI

B            |           JHI

C            |         WER

E            |         123

A            |         456

C            |           DFG

B            |          CFT

E            |          365

S            |          ASD

H            |         HJK

E            |         ASD

 

How can i get users who bought atleast one ALPHABET category product and didnt buy numeric Category products..??

 

my output should be 

 

B          

C

S

H

 

 

 

chi. neku idhi kuda raaadha ani thittttukokunda.. cheppandi boss.. :(

 

Link to comment
Share on other sites

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'     

///
 
 
What if this user bought both alphabet and numerical... We dont want him 
Link to comment
Share on other sites

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'     

 oka user ki product alpha bet and number unte idi workout kadu

Link to comment
Share on other sites

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'     

 

 

maya store procedure lo rayali emo .. query kavala..//

 

:)

idea.gif?1290057832

Link to comment
Share on other sites

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'    and  not like   '%[0-9]%' 

 

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'     

///
 
 
What if this user bought both alphabet and numerical... We dont want him 

 

Link to comment
Share on other sites

 

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'    and  not like   '%[0-9]%' 

 

 

work avvadu ba..

Link to comment
Share on other sites

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'    and  not like   '%[0-9]%' ..////

 

thanks ... chustha bhaiya...

 

 

Link to comment
Share on other sites

chinna mistake

 

 

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'    and  PRODUCT_BOUGHT_CATEGORY not like   '%[0-9]%' 

 

select  distinct  USER  from table_name

where  PRODUCT_BOUGHT_CATEGORY like  '%[a-z]%'    and  not like   '%[0-9]%' ..////

 

thanks ... chustha bhaiya...

 

 

Link to comment
Share on other sites

×
×
  • Create New...