Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SELECT as TEXT

in one of our applications there is a SELECT from an account number. this is then paserd into level. App workfs fine but now we have a company that has accounts like '000002' and also a '2' consolidation account.

That 000002 consolidates into the '0' accounts.

Problem is that the 000002 is transformed by QV to 2. I've seen techniques that in a second table you can workarround this but ... only in a second derived table.

Is there a way to do this in 1 select, of then do a join of the original table to itself and then transform that field.

But all in the same table, other processed are doing quite some resident work on the original table.

Kind Regards

Labels (1)
3 Replies
Not applicable
Author

All fallen foul of this one!

In the load specify TEXT(ACCOUNTNUMBER) as ACCOUNTNUMBER so that Qlikview leaves it alone. Otherwise Qlikview sees the value of 000002 and identifies that as a number, so treats it the sames as 2.

Regards,

Gordon

Not applicable
Author

In a LOAD ok, but in a SQL SELECT this doesn't work !!

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

use a preceding load before your SQL Statement, it will apply any QlikView functionality on top of SQL Select:

load

...,

text(ACC) as [Account Number],

...

;

SQL SELECT ... , ACC, ... FROM mytable;

Oleg

Ask me about Qlik Sense Expert Class!