I have 2 fields. [field_1] is text [field_2] is a memo field.
Field 2 contains "Air Force Airman John D Smith" or "Air Force Reserve Airman John D Smith" or "Air National Guard Airman John D Smith"
I would like to make Field 1 equal to "John D Smith"
I want this query to run 3-5 times a day, and I can handle that part, but writing such an animal is well above me. Thanks!
8 1223
Is there any realtion between field1 and field2 . or you simpy want to update field1 to some value.
No relation, just want to update.
Basically, field 1 is the "HEADLINE" and currently comes from an email subject. Field 2 is the story, and always begins as I stated "xxx Airman John D Smith has Graduated" My goal is that the list of stories will show the person's name as the headline. So, everything between the words AIRMAN and HAS.
Thanks
No takers, huh?
Thanks.
Tony
I have 2 fields. [field_1] is text [field_2] is a memo field.
Field 2 contains "Air Force Airman John D Smith" or "Air Force Reserve Airman John D Smith" or "Air National Guard Airman John D Smith"
I would like to make Field 1 equal to "John D Smith"
I want this query to run 3-5 times a day, and I can handle that part, but writing such an animal is well above me. Thanks!
Will the value of field1 will always needs to be updated to John D Smith or it varys for other values of field2??
Will the value of field1 will always needs to be updated to John D Smith or it varys for other values of field2??
It varies, for the most part it's First Name MI Last name, but sometimes there is no middle. If I have to fix 4-5 per week, that's fine, but right now I have to update 700+ weekly.
TIger
It varies, for the most part it's First Name MI Last name, but sometimes there is no middle. If I have to fix 4-5 per week, that's fine, but right now I have to update 700+ weekly.
TIger
Can you give few more data samples and explain??
If your data is all consistent, something like the following query might do what you want. - Update table set headline=(SELECT substr(field2, locate('Airman',field2)+7, locate('has Graduated',field2) - locate('Airman',field2)-8))
The substr grabs everything between 'Airman' and 'has Graduated', so name length, middle initials, etc shouldn't matter.
I am not a MySQL expert, so this may not be the best approach, it's just the only thing I came up with.
It's better than what I've gotten! Thank you VERY MUCH for the help!
Tony
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Joseph |
last post by:
hi
1) i plan on having an awt canvas component (to draw graphs) on a JFrame
with other swing components..will this be okay? i've read that swing and
awt aren't compatible..
2)Also, if i...
|
by: Niels Dekker - no reply address |
last post by:
The book "C++ Coding Standards" by Herb Sutter and Andrei Alexandrescu
warns against potential memory leaks when having multiple calls to
operator new within a single statement. (Item 13, page...
|
by: Dave |
last post by:
My web site is not particularly theme-based, but it contains an Art Gallery
I'd like to display in a different perspective. I would like to horizontally
scroll it, rather than vertically - as if...
|
by: Patrick Coghlan |
last post by:
I want to create about 4 forms with the same dimensions and background
colours, similar to the forms one has to traverse when installing
various software packages.
I'm using Visual Studio and...
|
by: Madison Kelly |
last post by:
Hi all,
I am new to the list and I didn't want to seem rude at all so I
wanted to ask if this was okay first.
I have a program I have written in perl which uses a postgresSQL
database as the...
|
by: Frederick Gotham |
last post by:
(Before I begin, please don't suggest to me to use "std::vector" rather
than actual arrays.)
I understand that an object can have resources (e.g. dynamically
allocated memory), and so we have to...
|
by: Frederick Gotham |
last post by:
(My dialect of English seems to puzzle people at times, so I'll first
clarify a few terms which I use in the following post:)
(1) By "domestic", I mean "ordinary, run-of-the-mill, not...
|
by: Highlander |
last post by:
Hello all. I'm a systems admin and not a developer. I work in a large
IT department with teams of developers. Currently we are asking them to
develop a utility for us that will migrate code, among...
|
by: zdenko |
last post by:
I have a multi user database and users were created by user level security
wizzard - as I mentioned in message before. Everything works fine for those
users, but now I have another problem. I have...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
| | |