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 |
|
Johnhamman
Starting Member
37 Posts |
Posted - 2004-06-06 : 18:11:49
|
| Hi all, Im using the Space(T.Depth*2) function, but instead of creating a space. I would like to do the same thing with a or a "-".below is my code. thanksSELECT Space(T.Depth*2) + ST.Name AS Name,T.TopicId as TopicIdFROM dbo.Site_Topics ST INNER JOIN Site_Tree T ON ST.TopicId=T.TopicIdWhere T.Depth > 0ORDER BY T.Lineage + Ltrim(Str(T.NodeId,6,0))john |
|
|
kselvia
Aged Yak Warrior
526 Posts |
Posted - 2004-06-06 : 19:14:57
|
| Use REPLICATE ( '-' , T.Depth * 2 ) instead of Space() |
 |
|
|
|
|
|