I need to add "FOR IMMEDIATE RELEASE." to all of my records.
I know I can use ConCat, but approximately 75% of my records contain some HTML at the beginning for formatting. I need to add the statement to the Beginning of the text (after </DEV>) or at the beginning of the record, whichever is closer.
So, a record without HMTL will be:
"FOR IMMEDIATE RELEASE.
Private John G dough has graduated......"
And with will be:
"<PHOTO>
FOR IMMEDIATE RELEASE.
Private Gina I Jane has graduated......"
Is there an easy way to say "look for </DEV>" and if not, do it anyways?
The reason is this: I later pull my title from everything after "RELEASE. " and before "HAS GRADUATED"
Thanks!
Tony
4 1337
I need to add "FOR IMMEDIATE RELEASE." to all of my records.
I know I can use ConCat, but approximately 75% of my records contain some HTML at the beginning for formatting. I need to add the statement to the Beginning of the text (after </DEV>) or at the beginning of the record, whichever is closer.
So, a record without HMTL will be:
"FOR IMMEDIATE RELEASE.
Private John G dough has graduated......"
And with will be:
"<PHOTO>
FOR IMMEDIATE RELEASE.
Private Gina I Jane has graduated......"
Is there an easy way to say "look for </DEV>" and if not, do it anyways?
The reason is this: I later pull my title from everything after "RELEASE. " and before "HAS GRADUATED"
Thanks!
Tony
But in your sample data, you show it as after <PHOTO>?
You want the text to be inserted after <PHOTO> or after </DEV>?
But in your sample data, you show it as after <PHOTO>?
You want the text to be inserted after <PHOTO> or after </DEV>?
</DEV>
sorry. I was using that as an example. <photo> meant that is where the photo appears when the record is displayed.
Tony
</DEV>
sorry. I was using that as an example. <photo> meant that is where the photo appears when the record is displayed.
Tony
I will suggest you to use two different updates as shown below: -
-
UPDATE table1 SET column1 = CONCAT('FOR IMMEDIATE RELEASE',column1) WHERE INSTR(column1, '</Dev>') = 0
-
/
-
-
UPDATE table1 SET column1 = CONCAT(SUBSTRING(column1,1,INSTR(column1,'</DEV>') + 6),' FOR IMMEDIATE RELEASE ',SUBSTRING(column1,INSTR(column1,'</DEV>') + 6)) WHERE INSTR(column1,'</DEV>') > 0
-
/
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Andy |
last post by:
Hi,
I am complete JavaScript novice and would really appreciate some help with
this code:
=====================================================================
<%@LANGUAGE="VBSCRIPT"...
|
by: Felipe Gasper |
last post by:
I'm trying to make some "sub-cells" in an HTML table and to control
their positioning and content presentation via CSS. In the table at
the following URL:
...
|
by: Brett |
last post by:
In Yahoo mail, I click the Inbox link and see my messages. If I view
source, I don't have HTML which contains the URL of each message. The
source HTML contains javascripting and framesets. This...
|
by: ALPO |
last post by:
We have a datagrid built using template columns. Many are
text boxes. These text boxes are bound to a datasource as
follows: <ItemTemplate>
<asp:TextBox
id="txtPeriod1"
runat="server"...
|
by: Jim Corey |
last post by:
I have an ASP app that I've recreated in ASP.NET and have
a problem recreating one part of it.
The original includes a dropdown (an html select object with name='Origin')
that I populate using...
|
by: AMD Desktop |
last post by:
Hi,
I need to add a header to a datagrid.
This is the code I am trying to use:
Dim dgStaffingReport As New DataGrid
Dim dgitem As New DataGridItem(0, 0, ListItemType.Header)
Dim mycell...
|
by: paul |
last post by:
HI! I keep on getting this error and I have tried different things but I am
not sure how to send the expiring date.
The error that I am getting in Firefox 1.5 is
"Error: expires.toGMTString is...
|
by: rpupkin77 |
last post by:
Hey,
How does one going about their user's geographical location? Is that
even a PHP question.
For example, a site may say "Find others near Boston", but if you were
in New York, it would say...
|
by: tshad |
last post by:
I have the following class in my VS 2008 project that has a namespace of
MyFunctions.
*********************************
Imports System
Imports System.Text.RegularExpressions
Namespace...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |