Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am faced with a new challenge.
My leading 0's, example- 005678 is being seen in my output csv file written by sql script as 5678.
Also, if the amount is 0, it does not display the same, the field is empty.
Please assist with an example in sql code to resolve the same.
Thanks in advance. !
What is your data source?
This is probably problem of the database? your are using.
Feeling Qlikngry?
You can use below code to replace zeor's
replace(ltrim(replace(FIELD, '0', ' ')), ' ', 0)
HI,
Try Text(Field)
Hello Sunny,
I tried this. But does not work.
Let me provide some sample data as below:
Code | Name | Brand | P Booking R | PY Px | Pbook | C Booking R | CPx | CBookings | YO Sale% | YO Px% | YOBooKs% |
525281 | BOND | B | 299.9 | 91 | 49 | 905.41 | 52 | 29 | -41.40% | -41.20% | -39.60% |
525281 | BOND | G | 7583.44 | 91 | 6 | ||||||
DIRECT | ABC | B | 2424.27 | 19 | 685 | 20802.52 | 1521 | 534 | -18.90% | -20.90% | -21.70% |
31738036 | AA | B | 2057.28 | 14 | 51 | 647.44 | 94 | 37 | -36.80% | -33.60% | -31.50% |
31738036 | AA | G | 8860 | 64 | 2 | ||||||
37380362 | TOURS | B | 7292.95 | 120 | 41 | 4171.06 | 65 | 27 | -47.70% | -46.70% | -38.60% |
33754036 | POWER | B | 9931.12 | 590 | 23 | 613.6 | 34 | 10 | -58.10% | -49.20% | -50.00% |
I need to display 00525281 and 0 where no value and YO Sale % i need a 100%
Nazira
If your code values are all the same length, you can add leading zeros by RIGHT('00000000' & Code, 8).
Hi,
Try to use Num(Code) or format it with Num#( Code)
My code is the same length, but when I store in qvd/ or open the csv file in notepad, I have the zeros displayed.
Please advise..
thanks.
Can you provide us with the model/script?
Your Load interprets the field as a numeric field, so it removes zero's.