Posted by: stylish July 25, 2008
SQL Help
Login in to Rate this Post:     0       ?        

Hi Frens,

Create table table1

(

col1 varchar(10)

)

Create table table2

(

col2 int

)

insert into table1 values('1,2,3,4')

insert into table2 values(1)

insert into table2 values(2)

insert into table2 values(3)

insert into table2 values(4)

insert into table2 values(5)

insert into table2 values(6)

insert into table2 values(7)

insert into table2 values(8)

insert into table2 values(9)

 

So table1 has 1,2,3,4

Table2 has 1 - 9 as rows

  I want to write a stament so that i get the result set like this 1- 4 as rows that means those values that is in the table1 but remember folks the datatype here is varchar.

WIll appreciate ur help

 

Read Full Discussion Thread for this article