Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey folks,
I have a SQL-Table from which I need a field (TBRKEY).
Thus I request the data with:
TBPOSP_mit:
load *; SQL select * from TBPOSP where TBTBGR = 'FRD' and TBSART = '122' and TBSPRA = ' ' and TBFIRM = '010';
I get the following result:
Attention to the format of TBRKEY!!!
But the whole where case is not possible in my specific case.
Thus I request the data with:
TBPOSP:
load *; SQL select * from TBPOSP;
After selecting the correct fields I get the following result:
Attention to the format of TBRKEY!!!
Why are there zeros in front of the numbers?
In my opinion I should get in both cases the same result, but as you can see here it is not.
Any ideas why this behavior is like this and workarounds?
If this may help, the TBRKEY-field is saved in a SQL database with a field length of 10 and the field type is alphanumeric.
Unfortunately not, as you can see in the following screenshot. I removes my characters.
Don't understand why.
I have no idea, I would just use num(TRBKEY) , QlikView does the job for you.
Since the field is called TRBKEY, are there more as 1 table from your DB involved?
Have you checked the format in all tables?
Hi, you can try with.
Alt(TBRKEY, TBRKEY) as TBRKEY_correct,
It's seems a little pretty to me.
or: Alt(num(TBRKEY), TBRKEY) as TBRKEY_correct
You were definite wright!
Qlik loads the first value and used the format on the other tables.
The solution:
Before the SQL load I used the Qlik-Cast.
Result:
load *,text(TBRKEY) as myKey; SQL select * from TBPOSP;
And now I always get the correct solution.
Thanks to your and the answer of the other people!!!