Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

adding prefix 0 while loading from SQL to Qlikview

Hi experts,

I am pulling this data from SQL into Qlikview using basic select * from abc statement. The issue is for CTCRSZ, I m getting '001' in both the rows in qlikview while in SQL one row has CTCRSZ '01' and another '001'.

       

CTACVLCTCREXCTCRSZCTCRTPCTCTDSCTCTVLCTCTWT
3036                                                 001CFPStandard Carton30362
99999DEF001CFPDEFAULT CARTON999990

Could you suggest how to fix the issue. Any help is much appreciated!

1 Solution

Accepted Solutions
sunny_talwar

When you run the SQL query you don't see the same issue? May be bring it explicitly as text -> Text(CTCRSZ)

View solution in original post

11 Replies
sunny_talwar

When you run the SQL query you don't see the same issue? May be bring it explicitly as text -> Text(CTCRSZ)

Anonymous
Not applicable
Author

Everything is pulled in text format.

sunny_talwar

What if you try something like this in the SQL Query (not sure what the SQL syntax is, but try the idea)

LOAD Right(CTCRSZ, Len(CTCRSZ) - 1) as CTCRSZ;

SQL SELECT

     1 & Text(CTCRSZ) as CTCRSZ

FROM SOURCE

trdandamudi
Master II
Master II

It is weird..... Try to bring in a Row Number and see what happens..

Anonymous
Not applicable
Author

Actually when I was experimenting I put Text(CTCRSZ) in sql but that did not work. I try your code again.

Anonymous
Not applicable
Author

nop...doesnt work

sunny_talwar

Doesn't work? Error or the same issue of 001?

trdandamudi
Master II
Master II

Did you run the SQL query by itself and checked the results ?

Anonymous
Not applicable
Author

I was asking one of my friends to do that but I will check by myself