Click here to Skip to main content
15,915,076 members
Home / Discussions / Database
   

Database

 
QuestionHow to transfer local data to SQL Server 7.0? Pin
Rashar24-Apr-06 9:08
Rashar24-Apr-06 9:08 
AnswerRe: How to transfer local data to SQL Server 7.0? Pin
Frank Kerrigan25-Apr-06 0:33
Frank Kerrigan25-Apr-06 0:33 
GeneralRe: How to transfer local data to SQL Server 7.0? Pin
Rashar25-Apr-06 4:08
Rashar25-Apr-06 4:08 
Questionhow do i resolve DBConcurrencyException when inserting value that contains '[' character. Pin
AfzalHassen24-Apr-06 3:06
AfzalHassen24-Apr-06 3:06 
QuestionPlease help me about query Pin
taoquandecor24-Apr-06 2:17
taoquandecor24-Apr-06 2:17 
AnswerRe: Please help me about query Pin
Colin Angus Mackay24-Apr-06 2:31
Colin Angus Mackay24-Apr-06 2:31 
GeneralRe: Please help me about query Pin
taoquandecor24-Apr-06 18:29
taoquandecor24-Apr-06 18:29 
QuestionORDER BY with Renamed Columns Pin
myNameIsRon23-Apr-06 19:24
myNameIsRon23-Apr-06 19:24 
Hi,
I'm a little confused with the ORDER BY statement....

It seems I can't use a renamed column to sort using ORDER BY.
Eg:
SELECT LastName + ', ' + FirstName AS FullName FROM Suppliers ORDER BY FullName"// this gives an error

but if I have a UNION ALL statement, I do need to use the renamed column to sort:
SELECT LastName + ', ' + FirstName AS FullName FROM Suppliers WHERE LogNumber IS NULL UNION ALL SELECT LogNumber + ' - ' + LastName + ', ' + FirstName AS FullName FROM Suppliers WHERE LogNumber IS NOT NULL ORDER BY FullName"// this works

I realize that I can use ORDER BY LastName,FirstName in the first example, but I just wonder if I should be doing something different.

thanks,
Ron


AnswerRe: ORDER BY with Renamed Columns Pin
Colin Angus Mackay23-Apr-06 20:28
Colin Angus Mackay23-Apr-06 20:28 
GeneralRe: ORDER BY with Renamed Columns Pin
myNameIsRon24-Apr-06 14:46
myNameIsRon24-Apr-06 14:46 
QuestionMaking a field null Pin
myNameIsRon23-Apr-06 11:31
myNameIsRon23-Apr-06 11:31 
AnswerRe: Making a field null Pin
dadax_8523-Apr-06 11:51
dadax_8523-Apr-06 11:51 
GeneralRe: Making a field null Pin
Colin Angus Mackay23-Apr-06 12:59
Colin Angus Mackay23-Apr-06 12:59 
AnswerRe: Making a field null Pin
Colin Angus Mackay23-Apr-06 12:58
Colin Angus Mackay23-Apr-06 12:58 
GeneralRe: Making a field null Pin
myNameIsRon23-Apr-06 15:04
myNameIsRon23-Apr-06 15:04 
AnswerRe: Making a field null Pin
dansoft24-Apr-06 4:58
dansoft24-Apr-06 4:58 
Questionimport excel in sql server 2005 Pin
Sasuko23-Apr-06 8:04
Sasuko23-Apr-06 8:04 
AnswerRe: import excel in sql server 2005 Pin
Frank Kerrigan25-Apr-06 0:37
Frank Kerrigan25-Apr-06 0:37 
GeneralRe: import excel in sql server 2005 Pin
Susuko25-Apr-06 9:33
Susuko25-Apr-06 9:33 
GeneralRe: import excel in sql server 2005 Pin
Frank Kerrigan25-Apr-06 10:19
Frank Kerrigan25-Apr-06 10:19 
GeneralRe: import excel in sql server 2005 Pin
Colin Angus Mackay25-Apr-06 22:32
Colin Angus Mackay25-Apr-06 22:32 
QuestionReporting Services Pin
devvvy23-Apr-06 5:19
devvvy23-Apr-06 5:19 
QuestionSorting Upper and Lower Case Strings Pin
japel23-Apr-06 3:17
japel23-Apr-06 3:17 
AnswerRe: Sorting Upper and Lower Case Strings Pin
Colin Angus Mackay23-Apr-06 4:20
Colin Angus Mackay23-Apr-06 4:20 
QuestionSelf Join and Euqi join Pin
Rajesh_K_Sharma23-Apr-06 0:20
Rajesh_K_Sharma23-Apr-06 0:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.