Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Is there a Text to column option ? MID and LEN

edited October 2008 in General
?I have database I am wotking on that has an inconsistant text entered
into a field.
Examples of data

TDR-posn23am--
TDR-position211am
TDR-Depat3443--

I want to show only the characters between the "-"
Is this possible?

-Caralene
QHR Software

--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited October 2008
    Hi Caralene,

    You might try formatting the text as you retrieve it from the database. Use
    the DBText.OnGetText event to check for the position of the "-" character
    and assign the Text parameter to the altered text. Something like the
    following...

    liPosition := Pos('-', Text);
    Text := Copy(Text, 1, liPosition);

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2008
    Thanks Nico

    I appreciate your time in helping me out with this one.

    Car

    -Caralene
    QHR Software

    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.