hello,i have this code below to parse a CSV string. it uses the tempdb. I would like to criticisms to know how efficient this code is ?thanksCode:use tempdb Go create procedure ProcessArray ( @InArray as Varchar(8000), @Delimter Char(1) ) AS --declarations declare @Element Varchar(8000) declare @continue int declare @cPos int -- set @continue = 1 --add a trailing delimiter to the array select @InArray = @InArray + ',' --create a temporary table to hold each element create table #tmpArray (idx smallint identity(0,1) Primary Key, elementValue varchar(8000)) WHILE (@continue >= 1) BEGIN select @cPos = CHARINDEX(@Delimter, @InArray) select @Element = Rtrim(Ltrim(SUBSTRING(@InArray,1, @cPos -1))) BEGIN INSERT #tmpArray (elementValue) VALUES (@Element) END select @InArray = SUBSTRING(@InArray, @cPos + 1, DATALENGTH(@InArray)) select @continue = CHARINDEX(@Delimter, @InArray) END --Return the element values, we could do some more work on the values here select * from #tmpArray drop table #tmpArray GO --Run the stored procedure Declare @RC int EXEC @RC = ProcessArray @InArray = 'george, fred, mary, ehioze, lekan, Jay, moni, hello, afrika', @Delimter = ',' Go --get rid of the clutter, it was just an example drop procedure ProcessArray GO