Solved

To clean up all of the old records in the database which have a particular URL

Posted on 2012-03-20
5
175 Views
Last Modified: 2012-03-28
Hi experts,
I need to clean up all of the old records in the database which have a particular URL - for example:
http://am.com/c/links.zx?nocache=1#cause,
Please suggest the query that I can use to do that
0
Comment
Question by:sqlcurious
  • 2
  • 2
5 Comments
 
LVL 18

Expert Comment

by:UnifiedIS
ID: 37743928
This would be the format of a delete query to delete specific records

DELETE FROM tablename
WHERE column = your url
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 37744133
give more info...
what is your table structure, give some sample data...
0
 

Author Comment

by:sqlcurious
ID: 37744244
I am not sure where it would be, it could be in stored procedures or in any columns of a table, so thats the challenge, please let me know if we have a way to figure out where it exists in the first place, thanks!
0
 
LVL 18

Accepted Solution

by:
UnifiedIS earned 500 total points
ID: 37744612
You can check stored procedures easily enough by scripting all your objects and dumping it into notepad or Word and then do some "finds".  If it is data within a table and you don't know which table or columns, it's certainly more involved.  
If you don't have too many tables/columns you can just manually query all the columns that could hold it.  SELECT * FROM table WHERE column LIKE '% your url %'

If there are too many tables/columns, you'd probably want to build a looping routine to look at all the tables.
0
 

Author Closing Comment

by:sqlcurious
ID: 37778744
thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

746 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

9 Experts available now in Live!

Get 1:1 Help Now