Get correct mail id

Hi Team,

I have below data , could you please help to get correct mail id in oracle only.

bhatt,rabi rabi.bhatt@n.com, test, mishra test.mishra@n.com, skype, amit skype.amit@n.com,

output like :

rabi.bhatt@n.com 
test.mishra@n.com
skype.amit@n.com

Hello Jewel,

Kindly use code tags for commands/codes/Inputs which you are using into your posts as per forum rules. Could you please try following and let us know if this helps you.

awk '{match($0,/.*@.*.com/);if(substr($0,RSTART,RLENGTH)){print substr($0,RSTART,RLENGTH)}}' RS=" "   Input_file

Thanks,
R. Singh

1 Like

thanks, but I need this oracle

Hello Jewel,

Could you please elaborate your requirement more here, seems you had edited your 1st post like you needed it in Oracle. Could you please let us know if this is a SQL query which you are doing for a field and there you need to do a check?

Thanks,
R. Singh

need SQL for below

I ve below data , could you please help to get correct mail id in oracle only.

bhatt,rabi rabi.bhatt@n.com, test, mishra test.mishra@n.com, skype, amit skype.amit@n.com,

output like :

rabi.bhatt@n.com 
test.mishra@n.com
skype.amit@n.com

Any attempts from your side?

Where do your data come from? How did you generate them? Post the DB data structures.

Moderator comments were removed during original forum migration.
2 Likes