declare @T table (id int, fname varchar(50), tname varchar(50), email varchar(200))
insert into @T values (1, 'fname1', 'tname1', 'xxxxxx@msn.com xxx.xxxxx.com')
insert into @T values (2, 'fname2', 'tname2', 'just a bunch of usless data')
insert into @T values (3, 'fname3', 'tname3', 'xxx@xx.xx.com')
insert into @T values (4, 'fname4', 'tname4', 'xxx@xx.xx.com xxx@yahoo.com')
insert into @T values (5, 'fname5', 'tname5', 'xxx@gmail.com xxxx.msn.com')
insert into @T values (3, 'fname6', 'tname6', 'xxx@msn.com')
I have a table with data as shown above, some good emails some bad..
i need to select this data into a new temporary table that i will genereate emails from, I need to create one row for each valid email address, so i would duplicate fname, tname, email for each valid email. I don't mind if i get a row with a bad email address, as long as i get a row for each valid one.
Could someone help with that select query?
I would appreciate it. Thanks