Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlikview QVD File

Guys,

When I store '1' value in QVD format from the data source, it is stored as '-1' instead of '1'.Please anyone help why it is?

4 Replies
Anil_Babu_Samineni

Please provide more information with sample data and store command

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

what is the data source. Make sure you use the correct version of the connectors.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Peter_Cammaert
Partner - Champion III
Partner - Champion III

That may be due to the fact that systems sometimes treat 1-bit values as signed (meaning that if the bit is set, it actually corresponds to a negative value).

Are you able to find out whether the negative value is already present in your QlikView field? If that's the case, force a conversion to 0 or 1 on loading from your data source, and your export to QVD will be ok.

stigchel
Partner - Master
Partner - Master

You are probably loading from a sql table where a field is defined as bit and is returned as true/false. QlikView stores true() as -1. You can converse this like below (2 ways)

SQL SELECT [ID],

case

        when BitField= 1 then 1

        when BitField= 0 then 0

    end AS SomeColumn

    ,Cast(BitField as Int) as SomeColumn2

     

  FROM ....