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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Outputting nbsp instead of Space

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. thanks

SELECT Space(T.Depth*2) + ST.Name AS Name,T.TopicId as TopicId
FROM dbo.Site_Topics ST
INNER JOIN Site_Tree T ON ST.TopicId=T.TopicId
Where T.Depth > 0
ORDER 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()
Go to Top of Page
   

- Advertisement -