how find all position with patindex in tbale or variable?
declare @name nvarchar(max)
set @name ='ali reza dar yek shabe barani ba yek dokhtare khoshkel be disco raft va ali baraye 1 saat anja bud va sepas... ali...'
select patindex('%ali%',@name) as pos
up select return 1 but i want all results
pos
=====
1
74
113