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


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  SQL Server Function - Lokesh M  04-Jul-08 01:05 1:05:10 AM
      create a function in sql server and call from stroed proc - Deepak Ghule  04-Jul-08 01:40 1:40:18 AM
      create a function in sql server and call from stroed proc - Deepak Ghule  04-Jul-08 01:40 1:40:37 AM
      Use this way - A K  04-Jul-08 01:44 1:44:14 AM
      UDF - mv ark  04-Jul-08 01:47 1:47:42 AM
      SQL Server Function - Umapathy Kaliaperumal  04-Jul-08 02:15 2:15:25 AM
      Check this out - santhosh kumar  04-Jul-08 02:17 2:17:16 AM
      Sql server function - Sanjay Verma  04-Jul-08 05:17 5:17:30 AM
View Posts

promotion
Silverlight    WPF    WCF    WWF    LINQ   
JavaScript    AJAX    ASP.NET    XAML   
C#    VB.NET    VB 6.0    GDI+    IIS    XML   
.NET Generics    Anonymous Methods    Delegate   
Visual Studio .NET    Expression Blend    Virus   
Windows Vista    Windows XP    Windows Update   
Windows 2003 Server    Windows 2008 Server   
SQL Server    Microsoft Excel    Microsoft Word   
SharePoint    BizTalk    Virtual Earth   
.NET Compact Framework    Web Service   


"Everything" RSS / ATOM Feed Parser
How to send and receive messages through message queuing in .Net
How to Read text file as database
SQL Server 2005 Paging Performance Tip
Display code of web page.
Fully Scalable Excel File Importer class for .net using Microsoft Jet driver
Generic Chart Color Manager class that can be used for any charts
Helper class to style the infragistics wingrid
Using Reflection to detemine as Assembly Info in and out.
Helper class to play with Window (Owners and position)
Resolving displayname from the culture using the XmlLanguage and LanguageSpecificStringDictionary class