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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SQL server stored procedure column value is changing from 401 to 401.0 when loaded on to QLIKVIEW

hello ,

Sql server stored procedure is called from qlikview report and specifically one value of a column is getting converted from 401 to 401.0 during load execution ..

tried to CAST all the values to a string of that column  in stored procedure , but still it is coming as 401.0 , wanted to come as 401

confused , why such thing is happening.

can somebody throw light on this , please

Many Thanks

Donesh


1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

Cool, please close this thread by marking the correct answer

View solution in original post

13 Replies
Kushal_Chawda

Try load num(YourFueld) as YourField in qlikview script

Colin-Albert
Partner - Champion
Partner - Champion

The QlikView floor() command will round the number down to an integer.

Not applicable
Author

hi again ,

all the value that is coming from that column invoked by stored procedure is not number only , it has alphanumeric value as well like V57.87, 401, 556.899, V34.5 etc

Cheers

Donesh


Kushal_Chawda

So what do you want to do? want to remove alphanumerical values?

Not applicable
Author

No , absorb the same ditto value as it is in the database.

in database value is coming as 401 , why it is converting to 401.0 in qlikview when called from a stored procedure.


Not applicable
Author

Hi All,

Please correct my statement .

there was 401.0 in earlier database rows which got stored in Qlikview memory , and when 401 came , do Qlikview checked that 401.0 is already existing  and discarded 401 .  is  Qlikview able to create  a separate memory for 401.0 and 401 separately for each ?

Please explain.

Cheers

Donesh

jonathandienst
Partner - Champion III
Partner - Champion III

Qlikview (like Excel) tries to determine the data type from the first value loaded. If it looks like a number, it will be loaded as a number and for one reason or another QV selected a format of 0.0. Numerically 401 and 401.0 are the same value.

If this is a key or an ID, you prefer it to be text, in which case load it with a text() statement like this:

     LOAD text(ID) as ID,

     ....

This will treat 401 and 401.0 as two distinct entries.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan

am loading the value from SQL Server stored procedure , Load statement will not come .

rather am using in load

SQL  EXECUTE  <stored procedure>

tried converting inside the stored procedure to string , but alas, no fruitful result.

is there any work around  ?

thanks

Donesh


jonathandienst
Partner - Champion III
Partner - Champion III

Use a preceding load:

     LOAD text(ID) As IDVal, *;

     SQL Exec <stored proc>;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein