?
Solved

URL (hyperlink) in SQL server table

Posted on 2010-03-30
5
Medium Priority
?
1,399 Views
Last Modified: 2012-05-09
Hi,

Is it possible to make a URL in the return table in SQL server 2008

for example, in my case

I import excel data in to SQL server. and this is the result from select statement

<return table>
ID value
1   10
2    20
3    5

if I want to look back to my excel file, can I make a hyperlink possible in this kind of table.
 for example, make value 10 is both value and hyperlink, when I click "10" it will open the original excel file that I import from (e.g D:\sample.xls) or it can only be a separate column contains the hyperlink

Please teach me if it is possible and how to do it. thanks in advance
0
Comment
Question by:rmtogether
  • 3
  • 2
5 Comments
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 29096093
Then you need to store the hyperlink value ( html tag value) instead of value in your table..
Instead of storing the hyperlink in the manner you have requested, try storing the file location of the excel file..
0
 

Author Comment

by:rmtogether
ID: 29096537
so it can't be both "value" and "hyperlink value" am I correct?
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 29096784
Yes.. You can store Hyperlink in one column and data in another column and not in a single column..
0
 

Author Comment

by:rmtogether
ID: 29147494
could you give me a simple example to do this

like create a table and one column is hyperlink data-type and  an insert statement

thanks.
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 2000 total points
ID: 29151320
>> like create a table and one column is hyperlink data-type

Let me explain it more clear..
You don't have hyperlink datatype available and what I mentioned was to save the link in a varchar column like 'www.experts-exchange.com'

And a simple example for this would be:

create table test ( ID int , value int, hyperlink varchar(1000))
insert into test (ID, value, hyperlink )
values ( 1, 10, 'www.xyz.com')
insert into test (ID, value, hyperlink )
values ( 2, 20, 'C:\test_folder\test_file.txt')
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question