Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2008
    Posts
    56

    Unanswered: special character in bcp output

    Hi,
    I am having an issue where there are special characters being output to a file using bcp. The characters don't appear in the database but are in the file.
    For example. Our db shows a row with data as follows:

    column1
    (value*=*64)

    On the bcp using the -c option the output in the file is
    (value˙=˙64)

    Are the special characters in the db but I can't see them? Is there a way to determine this?
    We are running SQL Server 2005 but set to 2000 compat level.


    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I've found "hidden" characters before by joining to a numbers table. Along the lines of:
    Code:
    SELECT  theText, SUBSTRING(theText, number, 1), ASCII(SUBSTRING(theText, number, 1))
    FROM    dbo.myTable
    INNER JOIN 
            dbo.numbers
    ON  numbers.number  BETWEEN 1 AND LEN(theText)
    WHERE   pk = 'valid pk value'
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Oct 2008
    Posts
    56
    I think it might be from someone copying and pasting data in our forms that they get from an html page. I might need to have the application team filter data before it is inserted.

  4. #4
    Join Date
    Jun 2009
    Location
    CA, USA
    Posts
    59
    May be your query window in not configured to show special characters/unicode data...
    Try changing query results option to unicode to dispaly the current values in your query output...
    MohammedU
    SQL Server MVP

  5. #5
    Join Date
    Oct 2008
    Posts
    56
    Thanks,
    I am looking to see how to change the results to include unicode but don't see it on the SSMS query window. Where is it?

  6. #6
    Join Date
    Jun 2009
    Location
    CA, USA
    Posts
    59
    I did used in Query Analyser but I could not find it in SSMS...
    I will post is if I figure it out...
    MohammedU
    SQL Server MVP

  7. #7
    Join Date
    Oct 2008
    Posts
    56
    How do you do it in query analyzer?

  8. #8
    Join Date
    Jun 2009
    Location
    CA, USA
    Posts
    59
    Tools/Options/Fonts/
    Click on Results Text in Category:
    And click the drop down list of Font: to see the list...
    MohammedU
    SQL Server MVP

Posting Permissions

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