7 Replies Latest reply: Dec 12, 2009 2:37 AM by desorama RSS

    Alfanumerical field

    desorama

      On loading from SQL db an alfanumerical filed with an structure like:

      ArticleCode Revenue

      35 10

      035 12

      0035 56

      Is taking all as 0035

      0035 78

      There are three diferent articles,

      What am I doing wrong?.

      Thanks

        • Alfanumerical field
          Peter Rieper

          Load it with the funtion

           

          TEXT(ArticleCode) AS ArticleCode


          Peter

            • Alfanumerical field

              To complete the above answer:

              TEXT is a QV function, it will not work in your SQL statement.

              So your script should be adapted to something like this:

               

              Articles:

              Load
              text(ArticleCode) as ArticleCode_temp
              ;
              SQL SELECT
              ArticleCode,
              FROM <ODBC_NAME>;

               

              I've experienced that when using the TEXT function, the resulting field name cannot be the same as the fieldname you are converting to text, therefore the "_temp" I added. I've had the exact same problem (also with article codes), and this solved the problem. (With a resident load, or when working with QVD files, you can rename the field again in a second load.)

              Succes,

              Yves

               

                • Alfanumerical field
                  desorama

                  SQL SELECT Abreviatura as Descripcion,

                  Activo,

                  Articulo,

                  Subfamilia,

                  Familia

                  FROM "mpFCE001_QlikView".dbo.MpArt;

                   

                  Lost in your indications

                  After including your

                   

                  Load

                  text(Articulo) as Article;

                  SQL SELECT Articulo

                  FROM "mpFCE001_QlikView".dbo.MpArt;

                   

                  I got the Articulo and Article (alfanunerical as I was aiming)

                  But in diferent tables

                   

                  I was aiming for:

                   

                  SQL SELECT Abreviatura as Descripcion,

                  Activo,

                  text(Articulo) as Article Subfamilia,

                  Familia

                  FROM "mpFCE001_QlikView".dbo.MpArt;

                   

                  But this would not work, how can I get arround

              • Alfanumerical field
                Peter Rieper

                Should work with

                 


                New_QV_table_Name:
                LOAD
                Abreviatura as Descripcion,
                Activo,
                text(Articulo) as Article Subfamilia,
                Familia;
                SQL SELECT
                Abreviatura,
                Activo,
                Articulo,
                Familia
                FROM "mpFCE001_QlikView".dbo.MpArt;


                Peter