SELECT Col1 + " " + Col2 AS Person
FROM tblTable
ORDER BY 1 ASC
или
SELECT Col1 + " " + Col2 AS Person
FROM tblTable
ORDER BY Person ASC
Kak objedinith polja.
SELECT Col1 & " " & Col2 AS Person
FROM tblTable
ORDER BY Col1 & " "& Col2 ASC
Ja dumal sto prosta nuzna zamenith dvoichnije kavichki (") na prastije (') i vsjo. No neprenemajet.
Код:
SELECT RTRIM(Col1) + ' ' + RTRIM(Col2) AS Person
FROM tblTable
ORDER BY Person ASC
Цитата:
Originally posted by phoeniX79
Ja tolka hochu dobavit RTRIM - dlja jasnosthi.
Ja tolka hochu dobavit RTRIM - dlja jasnosthi.
Если RTRIM не покатит(скорей всего), попробуй TRIM, или
SELECT TRIM(TRAILING FROM Col1) + ' ' + TRIM(TRAILING FROM Col2) AS Person
FROM tblTable
ORDER BY Person ASC
SELECT RTRIM(prFirstName) + ' ' + RTRIM(prLastName) AS Person
FROM tblPersons
ORDER BY Person
Eta rabotajet prekrasno.
A TRIM i TRAILING FROM programa Query Analyer vobshe neponimajet.
Цитата:
Originally posted by phoeniX79
SELECT RTRIM(prFirstName) + ' ' + RTRIM(prLastName) AS Person
FROM tblPersons
ORDER BY Person
Eta rabotajet prekrasno.
A TRIM i TRAILING FROM programa Query Analyer vobshe neponimajet.
SELECT RTRIM(prFirstName) + ' ' + RTRIM(prLastName) AS Person
FROM tblPersons
ORDER BY Person
Eta rabotajet prekrasno.
A TRIM i TRAILING FROM programa Query Analyer vobshe neponimajet.
Странно. Возможно работаешь на Access.
Access ustanovlen na kompjutere.
No vobshe eta
Windows Server 2003 Standart Edition SP1,
MS SQL 2000 s SP3.
Nu a neponemajet imena programa Query Analyzer iz MS SQL 2000.
Цитата:
Originally posted by phoeniX79
Neponjal.
Access ustanovlen na kompjutere.
No vobshe eta
Windows Server 2003 Standart Edition SP1,
MS SQL 2000 s SP3.
Nu a neponemajet imena programa Query Analyzer iz MS SQL 2000.
Neponjal.
Access ustanovlen na kompjutere.
No vobshe eta
Windows Server 2003 Standart Edition SP1,
MS SQL 2000 s SP3.
Nu a neponemajet imena programa Query Analyzer iz MS SQL 2000.
Странно потому, что TRIM(...) входит в SQL-92. Довольно примитивный Borlandoвский SQL Explorer его поддерживает, но об LTRIM/RTRIM знать не хочет. (Capability not supported)
Цитата:
Originally posted by phoeniX79
Kak mozna v SQL objedinith polja. V Access eta ochen prosta.
SELECT Col1 & " " & Col2 AS Person
FROM tblTable
ORDER BY Col1 & " "& Col2 ASC
Ja dumal sto prosta nuzna zamenith dvoichnije kavichki (") na prastije (') i vsjo. No neprenemajet.
Kak mozna v SQL objedinith polja. V Access eta ochen prosta.
SELECT Col1 & " " & Col2 AS Person
FROM tblTable
ORDER BY Col1 & " "& Col2 ASC
Ja dumal sto prosta nuzna zamenith dvoichnije kavichki (") na prastije (') i vsjo. No neprenemajet.
Попробуй
SELECT Col1||' '||Col2 AS Person
FROM tblTable
ORDER BY Person ASC