please fast sql virus problem introduced code in DB delete it

Posted on 2009-12-30
Last Modified: 2012-05-08
A virus has introduced code into my SQL Database, at least in one table. The table has its original content, but then it has added the following code:

</a><a href=''>free quit smoking tool</a> ... etc ...

The original content of that could be something like:

0certifications are accredited</a><a href=''>free quit smoking tool</a><a href=''>the bluest eyes in texas paraody</a><a href=''>sayings cheated off the rode</a><artner parts</a><a href='
How can I run an sql in that table ('activities' table)  to delete all the text that its after the </a><a href=''>  code, including that code ?  

I as you can imagine this is VERY urgent, also, how can i search for this code in all the other tables of my database without having to go table by table opening them up ?

Later the bigger problem will be to do something to cleanup if there is a virus and prevent this from happening again.
Question by:amucinobluedot
    1 Comment
    LVL 75

    Accepted Solution

    SELECT LEFT(YourColumn, CHARINDEX('',YourColumn)+37)
    from yourTable

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now