?
Solved

please fast sql virus problem introduced code in DB delete it

Posted on 2009-12-30
1
Medium Priority
?
383 Views
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='http://tests4all.org/3/'>free quit smoking tool</a> ... etc ...

The original content of that could be something like:

0certifications are accredited</a><a href='http://tests4all.org/3/'>free quit smoking tool</a><a href='http://tests4all.org/4/'>the bluest eyes in texas paraody</a><a href='http://tests4all.org/5/'>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='http://tests4all.org/3/'>  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.
0
Comment
Question by:Aleks
1 Comment
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 total points
ID: 26146144
SELECT LEFT(YourColumn, CHARINDEX('',YourColumn)+37)
from yourTable
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

840 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