I have a question regarding casting from char to byte using question below.
And now I see that the complete fault string is changed from it´s original. It´s not just the minus (-) sign that is added
You need to add a leading binary zero to GenId:
And to get a fixed size with leading zeroes you better use LPAD:
LPAD(FROM_BYTES('00'xb||GenId, 'BASE16'), 20)
Go to the main page of the forum where you want to post and simply click the "CREATE A NEW FORUM TOPIC" button.
WHERE CAST(logondatetime AS DATE) BETWEEN '2015-04-20 ' AND '2016-04-20'
is the same as
WHERE CAST(logondatetime AS DATE) = DATE '2016-04-20'
-> return the data from this date
WHERE logondatetime > Timestamp '2015-04-20 00:00:00'
Assuming there's no data from tomorrow in DBQL it's the same, too (ok, almost the same, should be
It works fine as long as the conversion is not handling values starting with 'FF-FF-........' in that case it looks like the attached file.
FF is the highest value, is it to be treated in a special way?
I dont get it!
Thanks in advance
SELECT 'FFFF4D7CD5E8A2AA0000'xb AS GenId
,LPAD(FROM_BYTES('00'xb||GenId, 'BASE16'), 20)