8 Replies Latest reply: Aug 19, 2015 5:06 AM by Amir Kachlon RSS

    right truncation over odbc connection

    Amir Kachlon

      Hi all,

       

      While im reading from sql server I get this Error:

       

      QVX_UNEXPECTED_END_OF_DATA: SQL##f - SqlState: 01004, ErrorCode: 0, ErrorMsg: [Microsoft][ODBC SQL Server Driver]String data, right truncation

       

      It's tricky because on the second attempt it wont show up and it will run successfully.

       

      I suspect it's something related to the meta data of the fields, so I monitored the meta data and found out that when some field length changed this query failed and it's

       

      the first scenario I need to resolve - how i can promise success reading this query on meta data change?

       

      the second scenario and more complicated is when there is no change in the metadata of fields and still I get this error with no visible reason.

       

      the query I'm running in my qvd is a simple preceding load , notice I use TEXT() function on a field type

      EntityIdvarcharno5

      because qlikview engine converts it to numeric and some data losts in the process.

       

      the query:

       

      Customers:

      LOAD TEXT(EntityId) as TextEntityId,

        EntityId as NumEntityId, // old version

      // NumEntityId, // new Version

        EntityId,

          EntityName,

          EntityHebrewName,

          Corporate,

          MasterAccount,

          PayorId,

          CompanyId,

          VatId,

          Remarks,

          InternetAddress,

          StockSymbol,

          FoundationDate,

          Owners,

          CreateDate,

          CreatedBy,

          LastUpdateDate,

          LastUpdateUser,

          SalesRepId,

          CollectorId,

          Logo,

          SecurityCode,

          IsForImpMatch,

          SumTipul,

          SumComm,

          SumComm1000,

          "broker_id",

          updated,

          "segment_code",

          "fix_segment_code",

          "cust_type",

          "sector_sub_code",

          "service_level",

          groupID,

          "cust_sub_type",

          "broker_limit_cd",

          "Adjusted_Name",

          "Customer: blocked cust",

          "Customer: zip code",

          "Customer: statement",

          "Customer: representative : intl sales man: code",

          "Customer: representative: domestic sales man: code",

          "Customer: representative: intl rep",

          "Customer: representative: intl RepId",

          "Customer: representative: domestic rep",

          "Customer: representative: import rep",

          "Customer: representative: collector",

          "Customer: representative: implant",

          "Customer: team: export",

          "Customer: team: is TOP Executive",

          "Customer: team: domestic",

          "Customer: team: import",

          "Customer: team: import: main complex id",

          "Customer: team: import: main complex",

          "Customer: team: import: sub complex id",

          "Customer: team: import: sub complex",

          "Customer: team: import: classifier full name",

          "Customer: team: import: inspector full name",

          "Customer: team: header: export",

          "Customer: team: header: export_id",

          "Customer: team: header: export id",

          "Customer: team: header: import",

          "Customer: team: header: domestic",

          "Customer: terms: usd rate",

          "Customer: city code",

          "is_fedex_dim_import_special",

          "is_fedex_dim_export_special",

          "is_fedex_dim_drop_special",

          "is_dim_import_special",

          "is_dim_export_special",

          "is_dim_drop_special",

          "is_export_SpecialEconomy",

          "is_import_SpecialEconomy",

          "collect_no",

          "cosmos_account",

          "Drop_ICPC";

      SQL SELECT *

      FROM FedexDWH.dbo."Customers_BI_qlikview";

       

      store Customers into [.\1_Raw\Customers.qvd];

      drop table Customers;

       

      thanks for your help

       

      Amir