create table #tmp1 (fld1 varchar(50)) insert into #tmp1 select 'smith, joe a' union all select 'jones, steve'
I need to check if there is a 2nd space in a varchar field. The first row has 2 spaces (' '). The following check attempt is giving me an error:
select case charindex(' ', fld1, charindex(' ', fld1, 1) + 1) > 0 then 'yes', else 'no' end x1 from #tmp1
What is the way to do this?
Thanks
Rich P