By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

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

P: 2
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
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,347
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

P: 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
Expert Mod 10K+
P: 12,347
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.