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
 General SQL Server Forums
 New to SQL Server Programming
 forcing field output into HTML attribute

Author  Topic 

andrewcw
Posting Yak Master

133 Posts

Posted - 2010-01-05 : 00:20:40
Should be simple - but I can't seem to do the correct search..where rvalue are link requiring an anchor tag.

I would need double quotes for the HREF attribute...
<a href="url">my page</a>

SELECT '<a href='+rvalue +'> my page </a>' AS URLLink
FROM Table1;

I would like to do the html anchor in the stored procedure, rather than externally convert it.

Thanks !

andrewcw

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-01-05 : 00:35:16
This is best done on the application side rather than in TSQL. Who don't you want to "externally convert it"?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

andrewcw
Posting Yak Master

133 Posts

Posted - 2010-01-05 : 01:32:29
Thanks - yes it can be done as you suggest. I wanted to simply bind the output to a gridView rather than send the loop through all the rows of one field of the dataset. Just made a nice package & simplified the web page.

andrewcw
Go to Top of Page
   

- Advertisement -