Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
Removing sections of text from MEMO fields with SQL |
Fri, Oct 5 2007 11:57 AM | Permanent Link |
adam | I want to write a script to do something like this:
UPDATE DocumentItem SET MainContent = REPLACE('<style>%</style>' WITH '' IN MainContent) WHERE [some condition] ; i.e. I have a bunch of web-pages in a table & they contain identical style-sheets embedded in each document ... I want to remove these so I can set the styles programatically. What I need is for DBISAM to accept wild-cards in its REPLACE function ... so that it can delete out longer/variable sections of text. The above syntax doesn't work. Is there another version that does? If not, any chance of adding it to the "ToDo" ... ?? adam |
Fri, Oct 5 2007 1:53 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | adam
A bit more longwinded but what about using SUBSTR and POS - almost certainly wrong but UPDATE DocumentItem SET MainContent = SUBSTR(MainContent,1,POS('<style>',MainContent))+SUBSTR(MainContent,POS('</style>',MainContent)+7,LENGTH(MainContent)) WHERE [some condition] ; Roy Lambert |
Mon, Oct 8 2007 11:45 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< What I need is for DBISAM to accept wild-cards in its REPLACE function .... so that it can delete out longer/variable sections of text. The above syntax doesn't work. Is there another version that does? >> No, but you can add this type of functionality very easily via a custom function. See here: http://www.elevatesoft.com/dbisam4d7_customizing_engine.htm -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |