dbTalk Databases Forums  

Order By

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Order By in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pkruti@hotmail.com
 
Posts: n/a

Default Order By - 02-21-2006 , 10:52 AM






How would i add order by to the syntax below:

"Select * Into ETCLog_holding from etclog where box# BETWEEN " & Box1 &
" and " & Box2

i have tried adding it after Box2 but it doesnt work.

Any ideas?


Reply With Quote
  #2  
Old   
cedutang@hotmail.com
 
Posts: n/a

Default Re: Order By - 02-21-2006 , 11:12 AM






I have tried and its executed ok adding "Order by" after Box2....may be
you shoud to revise "box#" part.

Good luck.


Reply With Quote
  #3  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Order By - 02-21-2006 , 04:39 PM



(pkruti (AT) hotmail (DOT) com) writes:
Quote:
How would i add order by to the syntax below:

"Select * Into ETCLog_holding from etclog where box# BETWEEN " & Box1 &
" and " & Box2

i have tried adding it after Box2 but it doesnt work.
You can add an ORDER BY clause after Box2, just to be careful to add a
space.

However, it is a fairly pointless thing to do. If you expect data in
ETCLog_holding to have a certain order, you are forgetting the fact
that tables are unordered sets.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.