October 21, 2003 at 10:05 am
I am trying to embed established web addresses and other hot links into a field in a SQL Table. Help!
October 22, 2003 at 6:51 am
Can you be more explicit in your requirements. Table ddl, sample data and any output that is expected.
Edited by - davidburrows on 10/23/2003 06:36:53 AM
Far away is close at hand in the images of elsewhere.
Anon.
October 22, 2003 at 7:28 am
A shot in the dark!
Add a varchar(xxx) column to your table, insert your links and do the 'HTML' preparing at your client application.
In case your looking for an equivalent to the Access data type 'hyperlink', stop now, you'll be out of luck.
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
October 22, 2003 at 8:35 am
Frank is right. This is probably a presentation (client) issue.
You could of course add some intelligence to SQL Server by adding the HTML formatting to a procedure or view.
CREATE TABLE tmpHtml
(Link varchar(100),
LinkText varchar(100))
GO
CREATE VIEW vw_HtmlFormat
AS
SELECT "<A HREF=" + Link + ">" +
LinkText + "</A>"
FROM tmpHtml
GO
INSERT INTO tmpHtml
VALUES ('http://www.sqlservercentral.com', 'The SQL Server Resource')
SELECT * FROM vw_HtmlFormat
October 22, 2003 at 8:40 am
CREATE TABLE tmpHtml
(Link varchar(100),
LinkText varchar(100))
GO
CREATE VIEW vw_HtmlFormat
AS
SELECT "<A HREF=" + Link + " target="_blank">" +
LinkText + "</A>"
FROM tmpHtml
GO
INSERT INTO tmpHtml
VALUES ('http://www.sqlservercentral.com', 'The SQL Server Resource')
SELECT * FROM vw_HtmlFormat
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
October 23, 2003 at 6:34 am
quote:
CREATE TABLE tmpHtml
(Link varchar(100),
LinkText varchar(100))
GO
CREATE VIEW vw_HtmlFormat
AS
SELECT "<A HREF=" + Link + " target="_blank">" +
LinkText + "</A>"
FROM tmpHtml
GO
INSERT INTO tmpHtml
VALUES ('http://www.sqlservercentral.com', 'The SQL Server Resource')
SELECT * FROM vw_HtmlFormatFrank
October 23, 2003 at 6:36 am
???
shouldn't there be some differences
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply