User Profile

Collapse

Profile Sidebar

Collapse
hailua
hailua
Last Activity: Jan 28 '08, 11:01 PM
Joined: Jan 7 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hailua
    replied to not all code paths return a value
    code use C# tag. I solve the problem with ==>Else. Thanks for reading my post.
    See more | Go to post

    Leave a comment:


  • Or you can use
    -----------------------------
    Create FUNCTION [dbo].[replace_blank]
    ( @input nvarchar(4000))
    RETURNS nvarchar(4000) As
    Begin
    While 1=1
    Begin
    IF PATINDEX('% %',@input) = 0 BREAK
    SET @input = replace(@input, ' ',' ')
    End
    SET @input = ltrim(rtrim(@in put))
    Return @input
    End
    -------------------------------
    -- select dbo.replace_bla nk('hello...
    See more | Go to post

    Leave a comment:


  • Create FUNCTION [dbo].[replace_blank]
    ( @input nvarchar(max))
    RETURNS nvarchar(4000) As
    Begin
    Declare @output nvarchar(4000)
    SET @input = ltrim(rtrim(@in put))
    SET @output = ''

    While 1=1
    Begin
    IF PATINDEX('% %',@input) = 0 BREAK
    SET @output = ltrim(rtrim(@ou tput))+' '+ltrim(rtrim(S ubString(@input ,1,CharIndex(' ',@input))))
    SET @input = SubString(@inpu t,CharIndex('...
    See more | Go to post

    Leave a comment:


  • hailua
    started a topic not all code paths return a value

    not all code paths return a value

    [code=vbnet]
    using System;
    using System.Data;
    using System.Data.Sql Client;
    using System.Data.Sql Types;
    using Microsoft.SqlSe rver.Server;
    using System.Collecti ons;

    public partial class UserDefinedFunc tions
    {
    [Microsoft.SqlSe rver.Server.Sql Function(FillRo wMethodName="Ob j_Row",
    IsDeterministic =true,
    ...
    See more | Go to post
    Last edited by debasisdas; Jan 7 '08, 12:32 PM. Reason: Formatted using code=vbnet tags
No activity results to display
Show More
Working...