Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ORDER table
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00810084
Message ID:
00810163
Views:
22
This message has been marked as the solution to the initial question of the thread.
Hi Nadya,

If table/filed name doesn't follow requiremebnts for MS SQL indetifiers, you can enclose them into square brackets. If you want to be the SQL-92 compliant, you can use double quotes but it requires SET QUOTED_IDENTIFIER to be set to ON at parse time.
Using column names or column #'s, is a matter of personal preference. I usually use column names so I can freely rearange columns in the list if I have to.

>Hi everyone,
>
>Sorry for such novice question, but it got me stumped for a moment. How can I use ORDER BY clause for ORDER table? Also what is better: name every field like select company, OrderNumber from [ORDER] order by company, OrderNumber or select company, OrderNumber from [ORDER] order by 1,2 ?
>
>Thanks in advance.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform