Results 1 to 8 of 8

Thread: Extra character

  1. #1
    Join Date
    Apr 2004
    Posts
    38

    Unanswered: Extra character

    Hi,

    I used excel to import data to my database, I found out a problem, my program is linked with the database, when the program show data from the database, it has an extra '@' symbol, In order to remove it, I need to go to the database to press space bar and backspace at the field. How could I use SQL instead of using space bar and backspace?

    Thanks
    Frenk

  2. #2
    Join Date
    May 2002
    Posts
    299
    Quote Originally Posted by fj8283888
    Hi,

    I used excel to import data to my database, I found out a problem, my program is linked with the database, when the program show data from the database, it has an extra '@' symbol, In order to remove it, I need to go to the database to press space bar and backspace at the field. How could I use SQL instead of using space bar and backspace?

    Thanks
    Frenk
    If this is not a display problem, you can use replace() function to clean up the text.

    e.g.
    select replace(col,'@',space(0))
    from tb
    --
    -oj
    http://www.rac4sql.net

  3. #3
    Join Date
    Apr 2004
    Posts
    38
    but the @ can not be seen in the database, and sometime it shows # instead could you please let me know what's happen

  4. #4
    Join Date
    Oct 2003
    Posts
    357
    Do those characters occur as the first character?
    Madhivanan

    Failing to plan is Planning to fail

  5. #5
    Join Date
    Apr 2004
    Posts
    38
    no, it occurs at last character

    that I normally do, first go to the last character, then press space bar and backspace, the @ or # will be disappeared

  6. #6
    Join Date
    Oct 2003
    Posts
    357
    Run this query and see if you see those characters

    Select SubString(yourCol,1,len(yourCol)-1) from yourTable
    Madhivanan

    Failing to plan is Planning to fail

  7. #7
    Join Date
    Apr 2004
    Posts
    38
    I can not see those character, the last character of each reocrd is missing.

  8. #8
    Join Date
    Oct 2003
    Posts
    357
    Well. Use that query to display in your application
    If you want to remove those from table, then

    Update yourTable Set yourCol=SubString(yourCol,1,len(yourCol)-1) where SubString(yourCol,1,len(yourCol)-1) in ('@','#')
    Madhivanan

    Failing to plan is Planning to fail

Posting Permissions

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