Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Cursor join
Starting Member
8 Posts |
Posted - 2013-01-10 : 10:44:23
|
SELECT Employee_ID,EMployee_Name, city FROM city INNER JOIN Employees ON city.Employee_Id_fk = _Employees.vc_Employee_id_pk order by Employees.Employee_id aschere is my query iwant the out put like1 a2 b11 c22 dbut my o/p is like1 a11 c2 bc22 d |
|
Cursor join
Starting Member
8 Posts |
Posted - 2013-01-10 : 10:48:37
|
pls suggest. |
|
|
Cursor join
Starting Member
8 Posts |
Posted - 2013-01-10 : 12:17:58
|
?? |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2013-01-10 : 13:04:08
|
SELECT Employee_ID,EMployee_Name, city FROM city INNER JOIN Employees ON city.Employee_Id_fk = _Employees.vc_Employee_id_pk order by convert(int,Employees.Employee_id) asc Too old to Rock'n'Roll too young to die. |
|
|
Cursor join
Starting Member
8 Posts |
Posted - 2013-01-10 : 13:04:46
|
me only providing the solution..EMP ID is defined with varchar data type |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2013-01-10 : 13:11:27
|
If you can't convert to int like I suggested above then try this:order by len(Employees.Employee_id), Employees.Employee_id Too old to Rock'n'Roll too young to die. |
|
|
|
|
|