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 |
|
sqllover
Constraint Violating Yak Guru
338 Posts |
Posted - 2007-03-01 : 04:28:55
|
| how to include asc near order byselect @sql= ' select u.userid,u.user_name, u.password, c.code_description as role_code,u.expiry_date,u.created_date,u.active from [usermaster] u inner join [codeMaster] con u.role_code=c.code where u.' + @columnname + ' like ''' + @recordname + '%'' order by u.' + @columnname |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-03-01 : 04:43:02
|
| order by u.' + @columnname + ' asc'==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-03-01 : 05:55:23
|
| No need to add ASC specifically, it is by default.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
sqllover
Constraint Violating Yak Guru
338 Posts |
Posted - 2007-03-01 : 06:12:28
|
| hi harsh and nr thanks i have done that. |
 |
|
|
|
|
|