Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WHERE has to be before ORDER
Message
 
 
To
07/03/2008 00:37:45
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01299623
Message ID:
01299654
Views:
11
>I just found out that in SQL Server, the WHERE clause has to be before the ORDER clause. Can someone confirms me that? If yes, is there a setting that affect that? It is not a big problem for me to adjust the code to support that however.

Yes, SQL Server is picky about the order of the clauses. It expects them in the order shown in BOL
SELECT select_list 
  FROM table_source 
  WHERE search_condition 
  GROUP BY group_by_expression 
  HAVING search_condition  
  ORDER BY order_expression 
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform