Check this out |
| santhosh kumar replied to Lokesh M at 04-Jul-08 02:17 |
Hi ,
This is the function:-
ALTER FUNCTION [dbo].[urlInfoHTML] ( @url_id int, @url_text varchar (250)) RETURNS varchar(600) AS BEGIN RETURN '<A href="http://localhost/myweb/UrlInfo.aspx?id=' + LTRIM(STR(@url_id)) + '">' + @url_text + '</A>' END
This is the function call in the stored procedure:-
create procedure test
as begin
SELECT distinct Events.ID AS 'ID', dbo.urlInfoHTML(Urls.id, Urls.url) AS 'URL', Events.alertTime AS 'Date/Time' FROM Users_Groups JOIN Groups on Users_Groups.Groups_id=Groups.id JOIN Urls on Groups.id=Urls.Groups_id
end
Regards, Santhosh
|
|