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--