Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all i have below data,
I have ID and I want concatinate one fixed number with that ID and have some further caluculation.
My issue is after concatenation my new ID is still in string format and I want in Number format.
Sample:
LOAD ID,
Num#(ID&56431256) as NewID
FROM
(ooxml, embedded labels, table is Sheet1);
Please share script as well , once it done
May be this?
Num#(ID) & '56431256' as NewID
try like
Num#(Num(ID, '0000000') & Num(56431256, '0000000'), '000000000000000')
it could be a problem if you have 14 or more digits
see here
https://gist.github.com/ralfbecher/6550467
Num#(ID)*100000000 + 56431256 as NewID
Hi,
May be try like this :
Sample:
Load *,
Num(NewID) as NewID_Num;
LOAD ID,
ID&'56431256' as NewID
FROM
(ooxml, embedded labels, table is Sheet1);
Hi,
You can't because max nr of digits in QV is 14.
However
LOAD Num(ID&'1234') as NewID
FROM File;
So NewID is Numeric
Regards,
Antonio
QlikView works on AutoCasting. But Your assigning value is getting bigger. So, it is getting convert to text.
Hi Subbareddy,
Here is the script for this query
Common Id : 1234
Sample:
LOAD ID
FROM
[..\..\Downloads\Sample.xlsx]
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
Sample1:
LOAD num(num(ID & 1234,'00000000000'),'00000000000')as NewId
Resident Sample;
DROP TABLE Sample
LOAD
ID,Num(Num(ID,'0000000')&Num(564312,'000000'),'000000000000')
FROM
It is working if the total digits are less than 14.