Re: I Need to replace many text area in a field with replace funct



Thanks for your input. It's really appreciated.

I see your point.

So basically, I should a create a single Query per attribute name that I'd
like to replace. And than run them in sequence or use a macro to do the whole
sequence.

Is that correct ?

Regards

uberblick

"Smartin" wrote:

Hi uberlick,

Not to discourage you from your quest, but I see no way it is possible.
Your suggestion is intriguing but I tried a couple variations on that
theme and came up empty.

The UPDATE query will only accept one argument per field. If you concat
several REPLACE statements here, they appear to be evaluated as a single
boolean value passed to the update. IOW, they will not be executed
sequentially. E.g.,

update RedGreen
set color = replace(color, 'r', 'orange') & color = replace(color, 'e',
'blue')

results in FALSE throughout.

Also UPDATE will not allow you to update the same field more than once.

update RedGreen
set
color = replace(color, 'r', 'orange'),
color = replace(color, 'e', 'blue')

is not valid SQL.

Sorry!

<
Totally OT, but I'm compelled to share a picture of mine that suits your
nym (^:
http://i51.photobucket.com/albums/f400/smartin108/profile/124_2467.jpg
>


uberblick wrote:
If I do an Update Query by using a CONCAT or "&" function to perform several
replacements within the same expression and within the max characters limit
allowed by the Expression Builder, would it work ??

"Smartin" wrote:

uberblick wrote:
Hello Access Community,

I'm using Access 2003.

I have a generic HTML template for ebay that contains html code.

In that HTML code we have some field or attribute names like {{ORIGINAL
TITLE}}, {{GENRE}}, {{MPAA}} etc. that we would like to customize for each
SKU.

We would like to create a customized html code per SKU that contains the
right attribute values. So in Fact we have to replace all attribute names by
their respective attributes values.

Up to now I was able to replace 1 attribute but I don't know how to build my
formula to replace 12 attributes within the same string expression.

This an example: <Start Here>Detail1:
Replace(Templates!HTML,"{{IMAGE(ITEMIMAGEURL1)}}",[Oztion_Images&Flags]!Filename)<End Here>

The HTML field is a MEMO field.

The expected result would be an append or make table query that will
contains fields named "UPC" and "Detail", the customized html code.


I'm using the Expression Builder not VBA.


Thanks in advance for any input.

Your help will be very appreciated since I'm working on that since a week.

Regards

Stephan
I don't think you can replace multiple targets in one sweep. But since
you have 12 attributes, a relatively small number and probably fixed,
you could create 12 separate expressions.

If you want all 12 expressions to fire from one control, you could put
them each in separate queries, create a macro to fire each query in
turn, and point the control at the macro.

--
Smartin



--
Smartin

.



Relevant Pages

  • Re: I Need to replace many text area in a field with replace funct
    ... uberblick wrote: ... I should a create a single Query per attribute name that I'd like to replace. ... I have a generic HTML template for ebay that contains html code. ...
    (microsoft.public.access.queries)
  • Re: Spin calling John 100% identity (Human & Gekko)
    ... Unfortunately there are no other sequences to use in checking the accuracy of that EST, i.e. no Gekko atpase sequences, and the study the sequence comes from is unpublished. ... Query 4427 ... Sbjct 6 ... TCTGACATGGGGCCACCCCACAGGTCAGAGTGGTGGTAGAACCCCTTCAGGACTCCCAGC 245 ...
    (talk.origins)
  • Re: Group By Sequential Records
    ... Is there any way to speed up the query? ... in each "sequence" where Group and AltID are the same and ID numbers are ... remains the same throughout each "sequence". ... FROM AddrCent AS Sub ...
    (microsoft.public.access.queries)
  • Re: Doubling the order
    ... The early SQLs were based on existing file systems. ... relational database and it is not the best one. ... the gap in the sequence is not filled in and the sequence ... Since a query result is a table, and a table is a set which has no ...
    (microsoft.public.sqlserver.programming)
  • Re: Doubling the order
    ... 1.PRODUCTID) - primary Key ... > data model or any data integrity. ... the gap in the sequence is not filled in and the sequence ... > Since a query result is a table, and a table is a set which has no ...
    (microsoft.public.sqlserver.programming)

Loading