select
Original
, LEN( Original ) as OriginalLen
, REPLACE( Original, '|', '' ) as OriginalWithoutPipes
, len( REPLACE( Original, '|', '' ) ) as OriginalWithoutPipesLen
, LEN( Original ) - len( REPLACE( Original, '|', '' ) ) as NumberOfPipes
from
(
select 'asdf|asdf|asdf'
as Original
) as V1
;
No comments:
Post a Comment