Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I am just starting the qlikview connection with a MySql DataBase and I've encountered my first problem which is giving me a hard time.
This is my problem:
I have this sequence of numbers:
123456789
but I just need the first 8 numbers.
As a qlikview script I used the following sentence:
If(Len(number)=9,Left(number,8) as Number
but with the MySql script I can't find a similar function.
Can anybody help me?
It is helpful to use preceding load, so you can use SQL functions in the SQL SELECT part and QV functions in LOAD part:
LOAD
If(Len(number)=9,Left(number,8) as Number
;
SQL SELCT
number
FROM my table;
Looks like it's
LEFT() | Return the leftmost number of characters as specified |
https://dev.mysql.com/doc/refman/5.0/en/string-functions.html
Andy
It is helpful to use preceding load, so you can use SQL functions in the SQL SELECT part and QV functions in LOAD part:
LOAD
If(Len(number)=9,Left(number,8) as Number
;
SQL SELCT
number
FROM my table;
Hi,
Qlikview have Left() but you missed closing bracket
If(Len(number)=9,Left(number,8)) as Number
Regards