473,651 Members | 3,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replacing all entries with "Re:"

Ok here's the thing... I have a vBulletin forum database... there is a
table in there called "post" which has all of my forums posts in it.

What I have are many posts with regular titles like "Oh hello how are
you" or whatever, and many posts (which are replies) with "Re:" before
them and whatever message following that.

I have recently updated my forums not to show the Re: thing, and I need
a quick way to execute a query or something that will CLEAR all titles
that have this "Re:" in the title area of the post table entries.

Anyone know how I can do this?

The table is called "post" and the cell (?) I guess is called "title."

There are over 8,000 entries in this post table so I really need to
find an efficient way to remove all of the titles with "Re:" ...
manually is just too long and too hard.

Thanks for your help.... by the way I'm running MySQL version 4.0.25 I
believe.

Oct 27 '05 #1
14 1656
<ss******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Ok here's the thing... I have a vBulletin forum database... there is a
table in there called "post" which has all of my forums posts in it.

What I have are many posts with regular titles like "Oh hello how are
you" or whatever, and many posts (which are replies) with "Re:" before
them and whatever message following that.

I have recently updated my forums not to show the Re: thing, and I need
a quick way to execute a query or something that will CLEAR all titles
that have this "Re:" in the title area of the post table entries.

Anyone know how I can do this?

The table is called "post" and the cell (?) I guess is called "title."

There are over 8,000 entries in this post table so I really need to
find an efficient way to remove all of the titles with "Re:" ...
manually is just too long and too hard.

Thanks for your help.... by the way I'm running MySQL version 4.0.25 I
believe.

Well - what is it you want to do? It helps to be specific!
It is unclear whether you are trying to query or you wish to actually modify
the data in your table.

------------------------------------
Query for only titles that don't begin "Re:"

SELECT title
FROM post
WHERE NOT (title LIKE 'Re:%')
------------------------------------------
Query all titles but hide the leading "Re:"

SELECT title
IF (LEFT(title,3)= 'Re', RIGHT(title, LENGTH(title)-3), title) As
AdjustedTitle
FROM post
--------------------------------------------
Surely you didn't mean to delete those records when you said "CLEAR"

DELETE FROM post
WHERE title LIKE 'Re:';

------------------------------------------------
Or perhaps you meant to keep the records but remove the leading "Re:" from
[titles] in the table post !

UPDATE post
SET title = LEFT(title,3)=' Re', RIGHT(title, LENGTH(title)-3)
WHERE title LIKE 'Re:';
---------------------------------------------------------

Thomas Bartkus
Oct 28 '05 #2
<ss******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Ok here's the thing... I have a vBulletin forum database... there is a
table in there called "post" which has all of my forums posts in it.

What I have are many posts with regular titles like "Oh hello how are
you" or whatever, and many posts (which are replies) with "Re:" before
them and whatever message following that.

I have recently updated my forums not to show the Re: thing, and I need
a quick way to execute a query or something that will CLEAR all titles
that have this "Re:" in the title area of the post table entries.

Anyone know how I can do this?

The table is called "post" and the cell (?) I guess is called "title."

There are over 8,000 entries in this post table so I really need to
find an efficient way to remove all of the titles with "Re:" ...
manually is just too long and too hard.

Thanks for your help.... by the way I'm running MySQL version 4.0.25 I
believe.

Well - what is it you want to do? It helps to be specific!
It is unclear whether you are trying to query or you wish to actually modify
the data in your table.

------------------------------------
Query for only titles that don't begin "Re:"

SELECT title
FROM post
WHERE NOT (title LIKE 'Re:%')
------------------------------------------
Query all titles but hide the leading "Re:"

SELECT title
IF (LEFT(title,3)= 'Re', RIGHT(title, LENGTH(title)-3), title) As
AdjustedTitle
FROM post
--------------------------------------------
Surely you didn't mean to delete those records when you said "CLEAR"

DELETE FROM post
WHERE title LIKE 'Re:%';

------------------------------------------------
Or perhaps you meant to keep the records but remove the leading "Re:" from
[titles] in the table post !

UPDATE post
SET title = LEFT(title,3)=' Re', RIGHT(title, LENGTH(title)-3)
WHERE title LIKE 'Re:%';
---------------------------------------------------------

Thomas Bartkus


Oct 28 '05 #3
Hey Thomas!
Thanks for helping me out

heres what I need to do

I have a table, called post, and theres a section called "title" ....
tons and tons of titles on all my entries, but I want to clear out all
the titles that contain "Re:" in them so that only ones without "Re:"
remain.

Your help is greatly appreciated!

Oct 28 '05 #4

<ss******@gmail .com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Hey Thomas!
Thanks for helping me out

heres what I need to do

I have a table, called post, and theres a section called "title" ....
tons and tons of titles on all my entries, but I want to clear out all
the titles that contain "Re:" in them so that only ones without "Re:"
remain.

Your help is greatly appreciated!


Tables don't have "section"s. I believe you meant "field" or "column" and
your goal is to delete all records (rows) where the entry in the title
(column=field) begins with "Re:".

If this is so, you already have it:

DELETE FROM post
WHERE title LIKE 'Re:%';

Bang! They're gone.
No more records (rows!) where the title begins with "Re:".

AND no way to "undo" unless you have a backup!
Thomas Bartkus

Oct 28 '05 #5
Thomas..... you are my hero. If there is any way I can repay you let me
know. If you have a site or service, I will def. help advertise.

Theo

Oct 28 '05 #6
http://img483.imageshack.us/img483/8664/okok4da.jpg

Please see that screenshot

My goal is to erase the titles that have "Re:" in them.

Thanks again for your help man!!

Oct 28 '05 #7
But remember I still want to keep the actual entries in post... all of
them.

Oct 28 '05 #8
I was interested in your previous replies and saw this suggestion you
made, Thomas:
Or perhaps you meant to keep the records but remove the leading "Re:"
from
[titles] in the table post !

UPDATE post
SET title = LEFT(title,3)=' Re', RIGHT(title, LENGTH(title)-3)
WHERE title LIKE 'Re:%';

Perhaps a modification of that would allow keeping the records but
moving the entire title, which is exactly what I want to do with the
titles containing Re:

Thanks so much again
Theo

Oct 28 '05 #9
I was interested in your previous replies and saw this suggestion you
made, Thomas:
Or perhaps you meant to keep the records but remove the leading "Re:"
from
[titles] in the table post !

UPDATE post
SET title = LEFT(title,3)=' Re', RIGHT(title, LENGTH(title)-3)
WHERE title LIKE 'Re:%';

Perhaps a modification of that would allow keeping the records but
removing the entire title, which is exactly what I want to do with the
titles containing Re:

Thanks so much again

Theo

Oct 28 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2839
by: Sander Tekelenburg | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The HTML specs speak of "replaced" and "non-replaced" elements, yet for the life of me I can't find an explanation of what "replaced" is supposed to mean in this context. Can someone explain? TIA
14
3035
by: Jeffery Tyree | last post by:
A friend is developing a Access 2003 database. I am developing a simple installer package using C#Net. We are looking for best methods, suggestions and definately code examples for: 1. Setting a 'version number' type property of the Access .MDB/.MDE file within Access/VBA 2. Then how to read the.MDB/.MDE's 'version number' from C#.Net TIA
2
1719
by: mark | last post by:
How can I use "Group By" or a formula to group my query results in 1-year periods from a given date, e.g. 3 groups: 1 Sept 2001 - 1 Sept 2002 1 Sept 2002 - 1 Sept 2003 1 Sept 2003 - 1 Sept 2004 Thanks, Mark
1
1996
by: ian.davies52 | last post by:
I'm having a problem running a query. I get the "too many fields" error message, but I only have 162 fields in the query and I thought the limit was 255. The problem query (Query1) is based on query2 that pulls together records from two tables. Could the problem be that some of the fields in Query1 use expressions using (SELECT "", "query2",">3")? The rest of the fields in Query1 just use Avg. Thanks in advance, Ian
4
1457
by: MLH | last post by:
I get something like this a percentage of the time when I open an A97 report by dbl-clicking it in the database window. I can not remember seeing tnis when the report is opened in code, I can not remember it happening when the report is opened first into design view and then into report view. But I can remember it happening when first opening the report in design view. Trouble is, this does not happen all the time. Lets just say less...
6
6598
by: Dan | last post by:
I wish to replace all the occurrances of " with &quot; within a string. I have tried using myString.Replace("\"", "&quot;"), but this does not work Any suggestions will be greatly appreciated Thanks
1
4929
by: Anurag | last post by:
Hi, I have 2 related questions. DB2 UDB ESE v8.x (8.1 till 8.2 FP2 - all fixpaks included) on AIX 5.4.x _____________________________________________________________________________ (QUESTION 1) Output of "db2ilist" does not list all the instances on my AIX box. DB2 functions normally - I do not get any unexpected errors. Any ideas what configuration has been missed out?...
1
15432
by: yoram.ayalon | last post by:
Hello, we have this situation. web farm, several server 2003 machines, and several win2K, SP 4 machines all machines access files on a Network appliance using CIFS I am testing a ASP.NET 2.0 project that is residing on the share. I
2
1301
by: GB | last post by:
I the Start page of the VS 2005 IDE, I would like to be able to delete obsolete entries in "Recents projects" list, but I dont find any way todo it. Any suggestion?
0
8361
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8701
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.