Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid Column Name Error
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01435010
Message ID:
01435059
Views:
24
>Ok then I'm not sure of the best way to accomplish this. I need to add an option to only include records where OpenQty < > 0.
>
>
>

Use CTE or derived table approach as I posted.

>>You can not use fields created in the query in the WHERE clause. The only place where you can use new fields is ORDER BY clause.
>>
>>You may either repeat the same condition in the where clause that creates this field or remove this condition from your original query, use your original as derived table or CTE and add an extra condition to it.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform