Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What is the qlikview version of this SQL server query ?
CAST(Company.Company_Id AS INT) AS REL_ID
Thanks a lot.
Good to know it is hex...![]()
This should work:
num(num#(right(Company.Company_Id,15),'(HEX)')) as REL_ID
But I had to cut the length a little using right() for the last 15 digits. QlikView can't use numbers longer than 15 digits. Try this, it returns 3906:
=num(num#(right('0000000000000F42',15),'(HEX)'))
num(Company.Company_Id,'#,##0') as REL_ID
This is making my REL_ID to 0.
after num(Compnay.Company_ID,'#,##0') ,0000000000000F42 should become 3906,but it is displaying 0.
Good to know it is hex...![]()
This should work:
num(num#(right(Company.Company_Id,15),'(HEX)')) as REL_ID
But I had to cut the length a little using right() for the last 15 digits. QlikView can't use numbers longer than 15 digits. Try this, it returns 3906:
=num(num#(right('0000000000000F42',15),'(HEX)'))
YES !! It did work Thanks a bumch.
Michael,
I have an account number field with account number 00508166730000000098.
How can I conver this account number into 50681376-42 ?
In Oracle I know I can dod it using ltrim and substring function.
LTRIM(SUBSTR(ACCOUNT_NO,3,8),0) || '-' || LTRIM(SUBSTR(ACCOUNT_NO,11),0).
If you find some time please help me with this.
Thanks a lot for your time.
I guess you want this:
=num(mid(ACCOUNT_NO,3,8)) & '-' & num(mid(ACCOUNT_NO,11))
Although I'm not sure because the result is a little different for your data (00508166730000000098😞
50816673-98
![]()
As Saidby Michael we use
=num(mid(ACCOUNT_NO,3,8)) & '-' & num(mid(ACCOUNT_NO,11))
for ocnversions, but the number it should return is some what different, could you recheck the question?
Thank you Michael.You are absolutely right.It was my bad.I used the wrong output in my question.
Thank you Gayathri for the heads up.It was my bad.