1

I have this simple code in an sql stored procedure:

Declare  @EmailBody varchar(MAX),
 @MyURL varchar(2000);
SET @MyURL ='www.google.com';

SET @EmailBody = 'Please go here: <a href="' + @MyURL + '">'; 

Now, the EmailBody contains: "Please go here: www.google.com". Instead, I want the url (www.google.com) to be embedded inside the word here.

2

1 Answer 1

0

I think your html is wrong. Try this:

SET @EmailBody = 'Please go <a href="' + @MyURL + '">here</a>:'; 
2
  • 3
    It should also use http:// or https:// at the start of the url to designate the protocol to use.
    – gmiley
    Dec 1, 2015 at 12:53
  • I already solved it, sorry to post such easy stuff!But will acceot your answer! Dec 1, 2015 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.