469,898 Members | 1,832 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

You tried to execute a query that does not include the specified expression 'X' as

im having this same problem ..

this is my query ..
Expand|Select|Wrap|Line Numbers
  1. select title, url,sum(visit_count),microsoft from (select * from data_repository where (username='prasad'and microsoft>0 or title like '%microsoft%')) group by url ,title order by sum(visit_count) desc, microsoft desc;
can u tell me how i can fix this problem ??

thanks in advancee
May 1 '13 #1
3 1344
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code. You have the field microsoft in your selection but you have not aggregated it or grouped by it. You need to do one or the other.
May 1 '13 #2
Expand|Select|Wrap|Line Numbers
  1. select title, url from (select * from data_repository where (username='daga'and java>0  or title like '%java%')) group by url ,title  order by Sum(visit_count) desc, java desc
is this fine ?

cause its still not working?
May 2 '13 #3
Rabbit
12,516 Expert Mod 8TB
I don't even understand what you're trying to do there... You've made it way more complicated. Just take your original query and either group by the microsoft field or aggregate it. Which one you choose depends on what you want to do with the microsoft field.
May 2 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Sheila King | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.