I hv tow table first asr having two attribute id and name
create table asr(
id int,
name varchar(30)
)
2nd table asr1 also having same attributes as shown below but id is in varchar..
create table asr1(
id varchar(30),
name varchar(30)
)
i hv split function which split string on the basis of any characther.....i m trying to split on the basis of ',' for which i use qurry like this:
DECLARE @name SYSNAME
SELECT @name =id FROM asr1
select a.name from asr a where convert(varchar,a.id) in
(select data from dbo.split (@name, ','))
But this querry split only last row as @name saves value of last row not all the rows.
how should i save result of all row in @name so that all 'name' of asr would display in o/p which satisfies the condition