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 |
|
ASP_DRUG_DEALER
Yak Posting Veteran
61 Posts |
Posted - 2004-06-30 : 15:44:00
|
| Anyone got a cool way of doing this? I really would like to do this in my stored procedure.SELECT CO_ID, (IIF (LEN(CO_DESC) < 22), CO_DESC, (LEFT(CO_DESC,22) + '...')) AS COURSENAME --CO_ID, ('(' + CO_ID + ') ' + LEFT(CO_DESC,22) + '...') AS COURSENAME FROM COURSE WHERE (CO_ACTIVE = 'A') ORDER BY CO_ID; |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-06-30 : 15:49:50
|
| You can use CASE in a SELECT statement.Tara |
 |
|
|
|
|
|