Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to fill out the numbers in the load script to 4 positions. In my datasource the numbers are shown as 3 and 4 digits (e.g. 310 and 1340). I want to add an extra 0 for the 3-digit numbers: 0310 at the dataload, so all numbers will be shown as 4-digit numbers in my QV-app.
What is the correct syntax to do this?
Hi Patrik,
This is my solution:
Load Date,
if(Len(Number) = 3, '0'&Number, Number) as Number;
LOAD * INLINE [
Date, Number
2/1/2009, 352
1/1/2009, 4562
1/3/2009, 698
];
I hope it helps you.
Best regards.
Hi Patrik,
This is my solution:
Load Date,
if(Len(Number) = 3, '0'&Number, Number) as Number;
LOAD * INLINE [
Date, Number
2/1/2009, 352
1/1/2009, 4562
1/3/2009, 698
];
I hope it helps you.
Best regards.
Hi Patrick,
try the below:
temp1:
LOAD * INLINE [
F1
310
1420
];
NOCONCATENATE
temp2:
LOAD
num(F1,'0000') as F2
RESIDENT temp1;
DROP TABLE temp1;
Cheers, Lukas
Thanks. This works perfect!