Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Sales puzzle


Sales puzzle

Author
Message
chgn01
chgn01
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1740 Visits: 1802
Comments posted to this topic are about the item Sales puzzle

--------------------------------------
;-)“Everything has beauty, but not everyone sees it.” ― Confucius
Lokesh Vij
Lokesh Vij
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1792 Visits: 1599
Ah! Very simple question to start the day. Thanks Gary:-)

~ Lokesh Vij

Guidelines for quicker answers on T-SQL question
Guidelines for answers on Performance questions

Link to my Blog Post --> www.SQLPathy.com

Follow me @Twitter


kapil_kk
kapil_kk
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2639 Visits: 2764
Lokesh Vij (8/13/2013)
Ah! Very simple question to start the day. Thanks Gary:-)

+1 :-)

_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Danny Ocean
Danny Ocean
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1458 Visits: 1549
kapil_kk (8/13/2013)
Lokesh Vij (8/13/2013)
Ah! Very simple question to start the day. Thanks Gary:-)

+1 :-)


+1:-)

Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
www.GrowWithSql.com
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSCertifiable
SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)

Group: General Forum Members
Points: 6636 Visits: 7200
Nice, Simple question, thanks

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Hany Helmy
Hany Helmy
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2656 Visits: 1108
Thanx 4 the easy question :-)
kaspencer
kaspencer
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2419 Visits: 821
I have worked with SQL Server on and off for many years, but I don't think I recall ever seeing "ORDER BY [number]" as it appears in this question.
Could some kindly person explain this to me, because a clear explanation seems to be difficult to locate in the documentation, and in searches. This little issue was why I failed this question!

Many thanks

Kenneth Spencer

You never know: reading my book: "All about your computer" might just tell you something you never knew!
lulu.com/kaspencer
Hany Helmy
Hany Helmy
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2656 Visits: 1108
kaspencer (8/14/2013)
I have worked with SQL Server on and off for many years, but I don't think I recall ever seeing "ORDER BY [number]" as it appears in this question.
Could some kindly person explain this to me, because a clear explanation seems to be difficult to locate in the documentation, and in searches. This little issue was why I failed this question!

Many thanks

Kenneth Spencer


Order by [some number], this number indicates the order of the column in the Select clause.

Hope that would help you.
Hany Helmy
Hany Helmy
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2656 Visits: 1108
hany.helmy (8/14/2013)
kaspencer (8/14/2013)
I have worked with SQL Server on and off for many years, but I don't think I recall ever seeing "ORDER BY [number]" as it appears in this question.
Could some kindly person explain this to me, because a clear explanation seems to be difficult to locate in the documentation, and in searches. This little issue was why I failed this question!

Many thanks

Kenneth Spencer

Order by [some number], this number indicates the order of the column in the Select clause.

Hope that would help you.


Like for example:

Select EmpId, EmpName, DeptId, DeptName
From SomeTable
Order by 2 -- this indicates that the result set will be sorted by column no. 2 in the Select clause which is 'EmpName'.



Regards,
Hany Helmy
Dineshbabu
Dineshbabu
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1114 Visits: 569
kaspencer (8/14/2013)
I have worked with SQL Server on and off for many years, but I don't think I recall ever seeing "ORDER BY [number]" as it appears in this question.
Could some kindly person explain this to me, because a clear explanation seems to be difficult to locate in the documentation, and in searches. This little issue was why I failed this question!

Many thanks

Kenneth Spencer


Hi kenneth,

In Order By we can specify integer representing the position of the column in the select list. The result set will be sorted based on the column. For further details pls refer

http://technet.microsoft.com/en-us/library/ms188385.aspx

Also FYI, Order By has no effect in this question, without sorting also you will get the same result, Its matter of Where clause.
I hope you are aware of Where clause will be applied before Order By.

--
Dineshbabu
Desire to learn new things..
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search