Options

Hex 5F in SqlScripts

Hi
I have this problem when I compare data from two DB and I generate the sql scipts for align my destination db: in the file .sql that SqlDataCompare create, I have in some records with some Hex 5F that generates error when execute it from Management Studio 2017.
As result you read: N'J.ALJASMI          ' (Capture.PNG file attached) where from right of "ALJASMI", Management Studio don't read nothing, so the script has an error when try to execute. I've open in Hex mode, and it find 0000 (Hex.PNG file attached).

I have try to export, in SqlDataCompare, with all encoding in combo box, but the result not change.

I have attached an example file (Data.txt); if you try to copy one record and past, you can see that arrive at N'J.ALJASMI limit and not over..

Someone can help me?

Regards
Gianni


Tagged:

Answers

  • Options
    Hi @Gianx,

    I'm not sure I understand - is the Data.txt what you are using to insert the data in the first place or is this what is being output by SQL Data Compare (SDC)?

    When I open the Data.txt I see:

    This would match the output from SDC - now whether that is because it was output by SDC or because it was used to create the value and SDC is outputting it, it seems it could be either.

    If this is not what you used to create the data in the table, please provide that as well so that I can try to replicate the issue here locally, as I don't see any issue related to using an underscore in a value.  If you can also provide the creation script for the table that would help too!

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • Options
    GianxGianx Posts: 2 New member
    Hi Alex

    Yes, I've used SQL Data Compare (SDC) for align a database with option to create a sql file.
    When I past the file in ManagementStudio, I have an error in the insert line (inside the attached file, you can find also the create table script in Data.txt file). 
    When I copy and past the insert line, in my 
    ManagementStudio, the line is cut (as you can see in CutInsert.PNG file)

    Regards
    Gianni

  • Options
    Hi @Gianx,

    I need the data from the source, not that which was scripted out by Data Compare (as the problem is with how it is scripting it out it would seem).

    Can you provide what the original information is by doing a query against the database in SSMS and saving the results?  That way I can create the source as you have it and then see why SQL Data Compare might be scripting it out incorrectly.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.