6 Replies Latest reply: Sep 11, 2012 1:03 AM by abdulazim49 RSS

    Beginner

      Hi,

       

      Actually i was starting to know about data loading in qlik view where i got this statement.

       

      Load @1:2 as ID, @3:25 as Name, @57:80 as City from data4.fix (ansi, fix, no labels, header is 0, record is 80);

       

       

      Now i am not able to understand,what does @ signifies here and how the load statement will work.

      Pls explain.

       

      Thanks,

      Azim

        • Re: Beginner
          Sree Nivas

          @1:2 is the actual fieldname in the data4.fix and that field name is given with aliasname as and the newfieldname

          • Re: Beginner

            So in data4.fix we need to check with the names of actual field .In case if there are lot of columns we cant go and create aliases for every column ,Is there any way so that we can generate dynamic names for columns like this in Qlikview?

              • Re: Beginner
                Srikar Chaduvu

                Hi Abdul,

                 

                Please go through the QlikView Reference manual for help on LOAD statement.

                 

                Below is the text from the same for the above load statement

                 

                1) @fieldnumber represents the field number in a delimited table file. It must be a positive integer preceded by

                "@". The numbering is always made from 1 and up to the number of fields.

                2) @startpos:endpos represents the start and end positions of a field in a file with fixed length records. The

                positions must both be positive integers. The two numbers must be preceded by "@" and separated by a

                colon. The numbering is always made from 1 and up to the number of positions. If @startpos:endpos is

                immediately followed by the characters I or U, the bytes read will be interpreted as a binary signed (I) or

                unsigned (U) integer (Intel byte order). The number of positions read must be 1, 2 or 4. If @startpos:endpos

                is immediately followed by the character R, the bytes read will be interpreted as a binary real number (IEEE

                32-bit or 64 bit floating point). The number of positions read must be 4 or 8. If @startpos:endpos is immediately

                followed by the character B, the bytes read will be interpreted as a BCD (Binary Coded Decimal)

                numbers according to the COMP-3 standard. Any number of bytes may be specified.

                 

                1) Load @1as A, @2 as B from data3.txt' (ansi, txt, delimiter is '\t', no

                labels);

                 

                2) Load @1:2 as ID, @3:25 as Name, @57:80 as City from data4.fix (ansi,

                fix, no labels, header is 0, record is 80);

                 

                Above examples 1 and 2 corresponds to statements 1 and 2.

                 

                Regards,

                Sri

                • Re: Beginner

                  You could use the Qualify statement which appends the table name to all of your column names;

                  • Re: Beginner

                    You could use the Qualify statement which appends the table name to all of your column names;