Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Subquery
Message
 
 
To
23/03/2012 19:02:07
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01539231
Message ID:
01539238
Views:
24
>>>Thanks, that's what I got working, but what was wrong with my logic/syntax?
>>
>>The error comes from this condition
>>receipts.policyheaderfk = policyloans.policyheaderfk
>>
>>This field can not be used in a query if we're not grouping by it. You can add it into GROUP BY to avoid the error or do the change as I did.
>
>So why did my test query work? I think I had also tried adding in the Group By but got a different error.
>
>This is not terribly important as I got it working, but I'm just trying to understand/learn.

In your test query you have this field in the GROUP BY. If you remove it from the GROUP BY, you most likely will get the same error.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform