Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Bulk edit of titles

Quote Reply
Bulk edit of titles
Is there a way to bulk edit the titles in the database?

Example: "Title of site"

Lets say I wanted to remove just the " from the front and back of all links in the database. Can this be done without doing them one by one?

Thanks!
Quote Reply
Re: [Teambldr] Bulk edit of titles In reply to
UPDATE Links SET Title = REPLACE(Title, '"Some Title"', 'Some Title') WHERE Title = '"Some Title"'

Something like that I guess.

Last edited by:

Paul: Oct 1, 2002, 3:49 PM
Quote Reply
Re: [Paul] Bulk edit of titles In reply to
Would it be easier to say "Delete all " from all titles" Paul?
Quote Reply
Re: [Teambldr] Bulk edit of titles In reply to
"DELETE" would do just that...delete all records that contain the "".
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Bulk edit of titles In reply to
Thanks but I do not want to delete the files only the " within the title
Quote Reply
Re: [Teambldr] Bulk edit of titles In reply to
Right...and within SQL...DELETE function will do just that, so your example of using DELETE ALL is illogical and inaccurate.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Bulk edit of titles In reply to
Then why is this whole statement in quotes?

"Delete all " from all titles"

It says delete all quote marks from all titles! Not use a delete all function.

Please do not reply to my posts. Your information is not needed. Thank you.

Last edited by:

Teambldr: Oct 2, 2002, 1:44 PM
Quote Reply
Re: [Teambldr] Bulk edit of titles In reply to
Quote:
Would it be easier to say "Delete all " from all titles" Paul?

Do you mean instead of replacing the title with the non-quoted title, just remove the " ?

If so, I think you'd still end up having to do a replace command. There's no way of deleting specific data from a column. A delete will delete your entire row.

Last edited by:

Paul: Oct 2, 2002, 1:52 PM
Quote Reply
Re: [Paul] Bulk edit of titles In reply to
Thanks Paul!

Looks like I have about 5000, make that 10,000 quote marks to manually remove! LOLCrazy
Quote Reply
Re: [Teambldr] Bulk edit of titles In reply to
I've removed the off-topic posts. I was going to lock the thread but opted for a detach so that you could come back if the query didn't work or if anyone else had questions about it.
Quote Reply
Re: [Teambldr] Bulk edit of titles In reply to
To remove all leading quotes, you could do:

UPDATE lsql_Links SET Title=SUBSTRING(Title,1)
WHERE Title LIKE '"%'

and to remove trailing quotes, you could do:

UPDATE lsql_Links SET Title=SUBSTRING(Title,0,LENGTH(Title) - 1)
WHERE Title LIKE '%"'

Be sure to backup your database first of course. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Bulk edit of titles In reply to
I should have edited my post above to read:

Quote:
I was going to lock the thread but opted for a detach so that you could come back if the query didn't work or if anyone else had questions about it or a better solution.

Wink
Quote Reply
Re: [Alex] Bulk edit of titles In reply to
Hi Alex,

So this will look at the first (or the last) letter/number/character see if it is a quote mark and if it is remove it. Very cool!

I will give it a shot.

Thank you!

Paul: Thank you too