Code looks great, so I know I must be doing something wrong (yes, I'm a
newbie).
My table is named "t_images" and the column is named "Keywords". Here's
what I put in:
UPDATE "t_images" set "Keywords" =
REPLACE("t_images"."Keywords", 'Darkwood', 'Dark Wood')
WHERE locate('Darkwood', "t_images"."Keywords") <> 0
But it returns the error: "Undefined function 'REPLACE' in expression."
venicite wrote:
>
> Excellent! Works well for single item entries, but what about, in the
> following example, if I want to change "Darkwood" to "Dark Wood" but the
> table allows multiple keywords per record in the 'keyword' TextColumn?
> "Darkwood" is in many records, but with different other keywords following
> it:
> TextColumn for Record 37 (just a random #) contains
> "Darkwood,Kitchen,Island"
> TextColumn for Record 181 contains "Darkwood,Island,Burners", etc.
> There are a couple thousand records - do I have to replace all 'Darkwoods'
> by hand, or is there some sort of wildcard?
> Thanks!
>
>
>
>
> drewjensen wrote:
>>
>> Clifton Liles wrote:
>>> Hi All
>>> Is there a way to search and replace in an open office Base database.
>>> In a field I would like to find and replace a value.
>>> There is a good search, but no replace, that I can find. Thanks
>>>
>> Hello Clifton,
>>
>> The query designer doesn't support update/delete queries - but - if you
>> are working with a Base file that has an embedded database or is
>> connecting to a database server ( MySQL, Postgres, SQL Server, etc) then
>> there is a way to do this.
>>
>> I'll assume that you have a Base file with an embedded database. (If you
>> aren't sure then you most likely do)
>>
>> This means that you can use a standard SQL UPDATE command, entered in
>> the SQL Window.
>>
>> For instance - if I had a table Table1 with a column TextColumn and I
>> wanted to change all records with the string 'Hello' in that column to
>> 'GoodBye' I could do so with:
>>
>> Open the SQL Window ( Tools>SQL)
>>
>> Enter the update command:
>> UPDATE "Table1" SET "TextColumn" = 'GoodBye' WHERE "TextColumn" = 'Hello'
>>
>> Click on the Execute Button.
>>
>> You can find general information regarding the UPDATE command by doing
>> an internet search for 'SQL UPDATE' or specific information regarding
>> the HSQLdb database engine (used by Base) at
>> http://hsqldb.org/web/hsqlDocsFrame.html
>> Chapter 9. SQL Syntax.
>> or
>> just ask for more details here.
>>
>> HTH
>>
>> Drew
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>
>
--
View this message in context:
http://old.nabble.com/Find-and-replace-in-OObase-tp22956254p28249051.html
Sent from the openoffice - dba users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]