Re: How to add to a new field based on information in existing field?

From: Brendan Reynolds (brenreyn)
Date: 09/29/04


Date: Wed, 29 Sep 2004 17:40:00 +0100

I think you'd be better to add a table with the French descriptions and use
a query to join the two tables. For example, Table1 includes fields TestID
and Description, Table2 includes fields Description and DescriptionFr. The
following query will list all records in Table1 with any matching records in
Table2. Note the user of an outer join - otherwise the query would exclude
any records from Table1 that had no matching record in Table2.

SELECT Table1.*, Table2.DescriptionFr
FROM Table1 LEFT JOIN Table2 ON Table1.Description = Table2.Description;

-- 
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
"Ara" <Ara@discussions.microsoft.com> wrote in message 
news:56C77986-E323-4A71-93EF-666ACF114531@microsoft.com...
>I still really need some help with this - should I be asking in another 
>forum?
>
> "Ara" wrote:
>
>> Hi, I'm stuck and need advice on how to do the following:
>> I have a table that contains a field "Description" and I have added a new
>> field "DescriptionFr".  I need a command that will search the existing
>> records, and place information into the new field based on a legend of 
>> sorts
>> that I will create.  For example, if the record contained an entry in the
>> Description field that = "red", the command would then enter "rouge" into 
>> the
>> DescriptionFr field for that record.  I would specify (somewhere?) the 
>> words
>> to search for and the appropriate translation to be entered into the new
>> field.
>> I will also need to be able to edit the "legend" as there could be new 
>> words
>> added in the future.
>> Any help would be greatly appreciated!  I did try searching the boards, 
>> but
>> couldn't seem to find anything like this.
>> 


Relevant Pages


Loading