Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle memo field - How to remove html. 1

Status
Not open for further replies.

JetRamsey

Technical User
Oct 22, 2010
49
US
While using a "Oracle in Oraclient11g_home" driver I see "<h" displayed for a memo field. While using a Microsoft ODBC for Oracle, I now see all of the text for the memo field. However, I see that it starts with misc. HTML tags, then all of the text that I want to extract is displayed, and then ends with HTML tags. How can I extract the HTML tags in the beginning and end out and just display the text in the memo field? I tried using left() and mid() in a few combinations, but this does not work since the length of the starting and ending HTML tags are not always the same length.
 
Are you saying that the HTML tags are just random? If so, are they a constant number of characters or random?

If, for example the field always started with "<h" then you could use Replace eg, Replace({Table.Field}, "<h", "").

If it was always 2 characters, you could use something like the following:
Code:
Whileprintingrecords;
Local NumberVar L := Len({Table.Field});

Trim(Left(Right({Table.Field}, L-2),L-4))

If they are genuinely HTML tags, a simpler solution might jut be to set the Text Interpretation to HTML (right click on field => Format Field => Text Interpretation = HTML Text)

Hope this helps

Cheers
Pete
 
Set interpretation to HTML did it. I've never seen this one before. Thanks!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top