|
Posted by Jorgen [DK/2600] on 02/20/07 13:28
Solutions was :
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [sapserviceaccount].[UNTRUNK2] (@inp as varchar(100))
RETURNS varchar(20) AS
BEGIN
declare @out varchar(20);
if LEN(@inp) > 0
begin
set @out = right( @INP, (LEN(@INP)-CHARINDEX('@', @INP)))
end
else
begin
set @out = @inp;
end
return @out
END
"Jorgen [DK/2600]" <nyhedsgruppe_hejhej_@gmail.com> wrote in message
news:45daf1e7$0$90272$14726298@news.sunsite.dk...
> Hi,
>
> another problem I have is that have compounded fields in my sql table.
>
> Example
>
> product@customer
>
> I need a simple function to return "customer", so it should return the
> value
> after "@", unfortunate "@" will sometimes be character number 6, sometimes
> character number 7 etc.
>
> regards
> Jorgen
>
>
>
Navigation:
[Reply to this message]
|