October 5, 2018 at 10:23 am
I have a database without any real diagrams/explanations. There is a definition table hold a description field that has numeric stored as fixed char(105) field that I'm hoping someone will recognize and be able to help me translate to readable text. e.g. table 1, DefID (int)=8, Description (char(105))=78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000 Does anyone know how to translate/parse this so that it's readable in English?
Thx.
October 5, 2018 at 11:05 am
Janet Barnett - Friday, October 5, 2018 10:23 AMI have a database without any real diagrams/explanations. There is a definition table hold a description field that has numeric stored as fixed char(105) field that I'm hoping someone will recognize and be able to help me translate to readable text. e.g. table 1, DefID (int)=8, Description (char(105))=78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000 Does anyone know how to translate/parse this so that it's readable in English?
Thx.
Try this, maybe it means something to you?
SELECT
CONVERT(
VARCHAR(MAX)
, CONVERT(VARBINARY(MAX), '78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000', 2)
)
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
October 5, 2018 at 11:15 am
That's so awesome! Did the trick. THANK YOU!
October 5, 2018 at 11:20 am
Phil Parkin - Friday, October 5, 2018 11:05 AMJanet Barnett - Friday, October 5, 2018 10:23 AMI have a database without any real diagrams/explanations. There is a definition table hold a description field that has numeric stored as fixed char(105) field that I'm hoping someone will recognize and be able to help me translate to readable text. e.g. table 1, DefID (int)=8, Description (char(105))=78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000 Does anyone know how to translate/parse this so that it's readable in English?
Thx.Try this, maybe it means something to you?
SELECT
CONVERT(
VARCHAR(MAX)
, CONVERT(VARBINARY(MAX), '78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000', 2)
)
Be careful here, there are some 0x00 in there, will be translated as a string terminator, which cause the subsequent data to be ignored!
😎
Here is a workaround SELECT
CONVERT(
VARCHAR(MAX)
, CONVERT(VARBINARY(MAX), REPLACE('78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000','00','32'), 2)
)
October 5, 2018 at 11:29 am
Eirikur Eiriksson - Friday, October 5, 2018 11:20 AMBe careful here, there are some 0x00 in there, will be translated as a string terminator, which cause the subsequent data to be ignored!
😎Here is a workaround
SELECT
CONVERT(
VARCHAR(MAX)
, CONVERT(VARBINARY(MAX), REPLACE('78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000','00','32'), 2)
)
Nice work, well spotted.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
October 6, 2018 at 1:08 am
Phil Parkin - Friday, October 5, 2018 11:29 AMEirikur Eiriksson - Friday, October 5, 2018 11:20 AMBe careful here, there are some 0x00 in there, will be translated as a string terminator, which cause the subsequent data to be ignored!
😎Here is a workaround
SELECT
CONVERT(
VARCHAR(MAX)
, CONVERT(VARBINARY(MAX), REPLACE('78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000','00','32'), 2)
)Nice work, well spotted.
Heh, must have been a bit tired, used decimal (32) instead of the hex(20), here is the correct query
😎
CONVERT(
VARCHAR(MAX)
, CONVERT(VARBINARY(MAX), REPLACE('78424120202020202020204D69737365642041707074730020202020202020202020202020202020313034383537363000202000','00','20'), 2)
)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply