Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-03-20
5
Medium Priority
?
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 59

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 2000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

721 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