Jump to content

Simple Sql Query Doubt


tejak123

Recommended Posts

select  distinct  a.USER  from table_name a

where  instr(a.PRODUCT_BOUGHT_CATEGORY) like  '%[a-z]%' and not exists (select 'x' from table_name b

where  a.user=b.user and instr(b.PRODUCT_BOUGHT_CATEGORY) like '%[0-9]%')

 

idi try chesi chudu okasari, not sure abt 'like' results,,,,,,,,,, intikellaaka okasari manchiga think chesi cheptaa.

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

y re...ill work

 

okasari rasi chudu ba.. work avadu.. multiple statememts kavali

 

A  |  123

A  |  xyz

 

 

ne query above condition lo A user tesuku vastadi
 

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]%'
		)

 

change column names :)

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]%'
		)

 

change column names :)

 

 

+1 grp by avi pettuko.. nenu ekuva think chesa

 

Link to comment
Share on other sites

+1 grp by avi pettuko.. nenu ekuva think chesa

 

 

?? 

 

BTW i just got notification that you quoted me.. naa settings update for this notification is tested and signed off bemmiRTlaugh.gif

Link to comment
Share on other sites

simple ga   idi panichestadi ga......vadu only numeric vadu annadu

so

 

select  distinct  USER  from table_name

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

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]%'
		)

 

change column names :)

 

 

 

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

okasari rasi chudu ba.. work avadu.. multiple statememts kavali

 

A  |  123

A  |  xyz

 

 

ne query above condition lo A user tesuku vastadi
 

correste...aithe this works....

 

 

select  distinct  USER  from table_name

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

Link to comment
Share on other sites

 

simple ga   idi panichestadi ga......vadu only numeric vadu annadu

so

 

select  distinct  USER  from table_name

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

 

 

no man, this may return rows that can have both char and num data.

Link to comment
Share on other sites

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.

 

size batti man .. small sets ki ok

Link to comment
Share on other sites

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

?? 

 

BTW i just got notification that you quoted me.. naa settings update for this notification is tested and signed off bemmiRTlaugh.gif

 

ardam kale

Link to comment
Share on other sites

 

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 .. :(

 

hoouse stark di use chey

Link to comment
Share on other sites

 

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 .. :(

 

 

 

paina vere sql suggest chesam kada vay emaindi try cheyaleda

Link to comment
Share on other sites

×
×
  • Create New...