Imbedding Web Address in a field

  • I am trying to embed established web addresses and other hot links into a field in a SQL Table. Help!

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

  • 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

    http://www.insidesql.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • 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
  • 
    
    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

    http://www.insidesql.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • 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_HtmlFormat

    Frank

    http://www.insidesql.de


  • ???

    shouldn't there be some differences

    Frank

    http://www.insidesql.de

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