Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    23

    Unanswered: Little tiny squares

    Hi just imported a bunch of fields from a text file and now have a bunch of little squares iat the end of each field, I assume that they are linebreaks or carriage returns, what is the easiest way to get rid of these?

    D--
    "Everything is possible, somethings are just less likely then others"

  2. #2
    Join Date
    Jul 2003
    Location
    Penang, Malaysia
    Posts
    212
    You can use the replace command.

    Eg.

    declare @string varchar(100)
    set @string='ABD'

    select replace(@string,'D','C')


    Play around with it and you know how to use it for your problem.
    Patrick Chua
    LBMS ( Learn By My Self) NPQ ( No paper Qualification )

  3. #3
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447
    Originally posted by Patrick Chua
    You can use the replace command.

    Eg.

    declare @string varchar(100)
    set @string='ABD'

    select replace(@string,'D','C')


    Play around with it and you know how to use it for your problem.
    You should use it in an Update statement:

    UPDATE <TableName> Set <FieldName> =
    replace(<FieldName>, CHAR(x), '')

    x is the ASCII code to identify your quares; try 10 (= CR), or 13 (= LF)
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  4. #4
    Join Date
    Jul 2003
    Posts
    23

    thanks

    worked like a charm thanks char(13) was it
    "Everything is possible, somethings are just less likely then others"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •