simple follow this query :
select newno into #t3 from #t2,#t1 where #t2.oldNo =#t1.oldNo
here t1,t2 are yr table
oldno ,newno r column names of t2
t3 is new table created as a result of your query.
here you can write any condition as just you write in any other query.