Re: Find and Replace against set of rules in 2nd table
- From: "Hank Rouse" <hank_top_sf@xxxxxxxxxxx>
- Date: Sat, 31 Dec 2005 20:36:32 GMT
Marshall,
This solution worked PERFECTLY!!!
Now I want to perform the following query:
Delete TBL1 Record if TBL1,COL1 contains any partial text match from
TBL3,COL1
DELETE FROM Tbl1
WHERE Tbl1.Col1 Like "*" & Tbl3.Col1
It keeps prompting me to enter a parameter. The Parameters are the contents
of Tbl3.Col1.
What am I missing?
"Marshall Barton" <marshbarton@xxxxxxxxxx> wrote in message
news:j8fdr1dk6mtbgkonhqcng6l10n85dgo9j6@xxxxxxxxxx
> You can use an update query something like:
>
> UPDATE Tbl1 INNER JOIN Tbl2
> ON Tbl1.Col1 Like "*" & Tbl2.Col2 & "*"
> SET Tbl1.Col1 = Replace(Tbl1.Col1, Tbl2.Col2, Tbl2.Col1)
>
> WARNING - This may change more that you intend if you are
> not very careful about what you use in Tbl2.Col1. Be sure
> to test this on a copy of Tbl1 so you don't garble any real
> data unitl you're sure it's doing exactly what you want.
> --
> Marsh
> MVP [MS Access]
>
>
> Hank Rouse wrote:
>
> >TBL1
> >
> >COL1
> >Mari Johnson
> >Jim Evans
> >Charles Stanley
> >Jerry Straight
> >
> >TBL2
> >
> >COL1 COL2
> >Mari Mary
> >Straight Strait
> >
> >See, I'm simply searching TBL1, COL1 for any match in TBL2, COL1.
> >If a match is found, Bad data in TBL1, COL1 is replaced by TBL2, COL2
> >
> >
> >"Hank Rouse" <hank_top_sf@xxxxxxxxxxx> wrote
> >> Looking for a tool, or code that does the following.
> >>
> >> Edit [partial field data] in TBL1, if [partial field data] meets
criteria
> >in
> >> TBL2, COL1. TBL2, COL2 has the REPLACE WITH information.
> >>
> >> Not sure if this edited data can be written directly to the TBL1, or
needs
> >> to write to a TEMP TBL. (Would prefer an Update Query to update TBL1)
> >>
> >> As I will continue to be tweaking and TBL2 COL1 & COL2, I would like
this
> >to
> >> be a query so that I can run it as needed.
.
- Follow-Ups:
- Re: Find and Replace against set of rules in 2nd table
- From: Marshall Barton
- Re: Find and Replace against set of rules in 2nd table
- References:
- Find and Replace against set of rules in 2nd table
- From: Hank Rouse
- Re: Find and Replace against set of rules in 2nd table
- From: Hank Rouse
- Re: Find and Replace against set of rules in 2nd table
- From: Marshall Barton
- Find and Replace against set of rules in 2nd table
- Prev by Date: Executing Multiple Queries
- Next by Date: Re: Find and Replace against set of rules in 2nd table
- Previous by thread: Re: Find and Replace against set of rules in 2nd table
- Next by thread: Re: Find and Replace against set of rules in 2nd table
- Index(es):
Relevant Pages
|