User Profile

Collapse

Profile Sidebar

Collapse
SQLnewbie2012
SQLnewbie2012
Last Activity: Aug 2 '12, 01:41 PM
Joined: Jul 24 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • HI CK,I tried this but it doen't give me the whole email, cuts out the domain

    Select top2
    reverse(substri ng(reverse(subs tring(cast(xmld ata as varchar(Max)),0 ,charindex('@', cast(xmldata as varchar(Max)))+ len('<data>'))) ,0,
    patindex('%>%', reverse(substri ng(cast(xmldata as varchar(Max)),0 ,charindex('@', cast(xmldata as varchar(Max)))+ len('.')))))) as email_id
    from mytable

    Where am I going...
    See more | Go to post

    Leave a comment:


  • Extract email address embedded in a xml string using a select query in SQL

    I have a table in SQL with the following columns and data:

    First_name is Joe
    Last_Name is Smith
    Zipcode is 12345
    Join_date is 05012011
    xmldata is
    Code:
    <data>Network Admin</data>
        <definition_field_id>beaa46b0-d1bb-408a-a5cc-56764f8562b6</definition_field_id>
        <validation_status>Valid</validation_status>
      
    <field>
        <data>Idontknow_noidea@noemail.net</data>
    ...
    See more | Go to post
No activity results to display
Show More
Working...