- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"0" before a number field
Hi everybody i have a big issue,
when i load a table from and sql server by qlikview, there is a 0 or two zero sometimes and sometimes not before the field.
For exemple
Test:
load Client, Purchase
from X$table;
The initial values when i extract the field Client on sql server are:
520
1450
1557
15447
15446
But when i do a load from qlikview the values are:
520 ==> ok
01420 ==> Why?
001557 ==> why ?
15447 ==> ok
00015446 => why?
i try the text(Client) as Client function when i load data but not work.
Thanks a lot all !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sab,
To remove leading zero's Try like this......
replace(ltrim(replace(MyField,'0',' ')),' ','0') AS MyField
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try num(Client)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you need these zeros or not in qlikview ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you need those zeros then use num#() other wise use Num()
Thanks
BKC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use text(Client) in preload
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You can check in sort tab in properties.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for all your anwers but there is something i forgot to say to you..
The field Client is alphanumeric that is to say it can have values like :
520
1450
1557
15447
15446
but
454K564A
26565AG4
GESG44
520
4545
too..
Num is just for numerical field, have you got a solution?
Text not work for several values...
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot but i want to store theses values so i want a function or other in the script...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
replace(ltrim(replace(Client,'0',' ')),' ','0') should work even if your field is alphanumeric. See attached screenshot