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 |
|
adlo
Posting Yak Master
108 Posts |
Posted - 2004-09-16 : 13:04:58
|
| I need to write a query that gets a list of positions with their details.Table Position-Position_ID-PositionName-Description varchar(1000)Here is the problem:If the length of the description is 20 characters or less it must display the whole description. If the length of the description is more than 20 characters it must display the first 17 characters followed by '...' |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-09-16 : 13:09:23
|
select Position_ID, PositionName, case when len(Description )>20 then left(Description , 17)+'...' else Description end as Description from PositionGo with the flow & have fun! Else fight the flow |
 |
|
|
adlo
Posting Yak Master
108 Posts |
Posted - 2004-09-17 : 05:23:26
|
| Thanks |
 |
|
|
|
|
|