SQL Server Performance
  1. harneetsingh New Member


    I have a table USER_DETAILS as below

    CREATE TABLE USER_DETAILS (
    USER_ID BIGINT NOT NULL,
    PASSWORD VARBINARY(MAX),
    IS_ENABLED TINYINT,
    DEFAULT_USERCLASS_ID BIGINT NOT NULL,
    CONSTRAINT CHK_USRDET_ISENAB CHECK (IS_ENABLED IN (0,1)),
    CONSTRAINT PK_USRDET_USERID PRIMARY KEY (USER_ID)
    ON INDEX_QPP
    ) ON DATA_QPP
    TEXTIMAGE_ON BLOB_QPP
    GO

    Value is inserted as below

    INSERT INTO USER_DETAILS VALUES (1,convert ( varbinary(max), '¦¼Ê+±ðáEºxÆ ª××?ºƒŽ¾dï:·vì×k?'),1,1);


    But when I query this table,

    select cast(password as char) from user_details;

    i get
    "¦¼Ê+±ðáEºxÆ ª××?ºƒŽ¾dï:·vì×" instead of
    "¦¼Ê+±ðáEºxÆ ª××?ºƒŽ¾dï:·vì×k?"

    Coould you please let me know how to get the exact value that was stored in the database.
    This is a encrypted string and I need this to compare it back.

    Thanks
    Harneet
  2. FrankKalis Moderator

Share This Page