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 |
|
paramu
Posting Yak Master
151 Posts |
Posted - 2009-03-16 : 04:31:41
|
| I looking for the following to utilize the VAL or INT functionswith select query in SQL-Serever 2005select * from emp_master order by val(emp_id) ascIdeas will be appreciatedThanks & RegardsPARAMUParamu @ PARANTHAMAN |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-03-16 : 04:50:35
|
| select * from emp_master order by cast(emp_id as INT) ascMadhivananFailing to plan is Planning to fail |
 |
|
|
paramu
Posting Yak Master
151 Posts |
Posted - 2009-03-16 : 05:08:15
|
| But field emp_id is also having the values like M-25,M-26,1792....so giving error.Paramu @ PARANTHAMAN |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-03-16 : 07:20:14
|
[code]SELECT *FROM emp_masterORDER BY LEN(emp_id), emp_id[/code] E 12°55'05.63"N 56°04'39.26" |
 |
|
|
paramu
Posting Yak Master
151 Posts |
Posted - 2009-03-16 : 08:32:05
|
| select * from emp_master order by len(emp_id),emp_idFine. & Thanks "Service To The Mankind Is The Way Of Piece"Paramu @ PARANTHAMAN |
 |
|
|
|
|
|