Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
Not applicable

I want tok now if there a way to read a column that has no name on it

Hi,

I want tok now if there a way to read a column that has no name on it

For example

I have the following table:

ServerStarted

 

Type

 

User

 

Message

 

7/18/2011  8:35

 

Selection

 

User1

 

City

 

NY

 

7/18/2011  8:35

 

Selection

 

User1

 

City

 

Clear

 

8/3/2011  18:10

 

Selection

 

User2

 

YEAR

 

2011

 

8/3/2011  18:10

 

Selection

 

User2

 

DOMAIN

 

domain.com

 

8/3/2011  18:10

 

Selection

 

User1

 

DESCRIPTION

 

Clo Libe / Credit Limit

 

8/3/2011  18:10

 

Selection

 

User1

 

DESCRIPTION

 

Clear

 

8/3/2011  18:10

 

Selection

 

User3

 

SHORT_DESC

 

IPTV

 

8/3/2011  18:10

 

Selection

 

User1

 

SHORT_DESC

 

ISP

 

8/3/2011  18:10

 

Selection

 

User1

 

SHORT_DESC

 

Clear

 

8/3/2011  18:10

 

Selection

 

User3

 

SHORT_DESC

 

Wireline

 

8/3/2011  18:10

 

Selection

 

User1

 

Clear All

 

ISP

 

There are 5 columns but only (4) four of them has a name on it.

I want to know if there’s a way to read that column and give it a name.

<Column withOut name> as Column5

LOAD

     ServerStarted as Date,

     Type,

     User,

     Message,

     <Column with Out name> as Column5

FROM C:\UserLogs\Archive_*.LOG (utf8, txt, delimiter is '\t', embedded labels)

Thanks,

Obed

1 Solution

Accepted Solutions
MVP
MVP

I want tok now if there a way to read a column that has no name on it

Try this:

LOAD @1 as Date,

     @2 as Type,

     @3 as User,

     @4 as Message,

     @5 as Column5

FROM C:\UserLogs\Archive_*.LOG (utf8, txt, delimiter is '\t', no lables, header is 1 lines);

View solution in original post

5 Replies
Not applicable

I want tok now if there a way to read a column that has no name on it

Or add the message + Column5

For example:

  • Message = “City NY”
    “City Clear”
    “YEAR 2011”
    ….

I don’t wantto lose that column

Thanks

MVP
MVP

I want tok now if there a way to read a column that has no name on it

Try this:

LOAD @1 as Date,

     @2 as Type,

     @3 as User,

     @4 as Message,

     @5 as Column5

FROM C:\UserLogs\Archive_*.LOG (utf8, txt, delimiter is '\t', no lables, header is 1 lines);

View solution in original post

Not applicable

Re: I want tok now if there a way to read a column that has no name on it

Thanks, but i still get an error

         Field not found - <@1>

I run this code that read from the log files of the Audits of QV11 but it still does not work

  • LET PATHQVLOG = 'C:\ProgramData\QlikTech\QlikViewServer';
    Audits:
    LOAD
        @1 as 'Server Started',
        Date(@2, 'YYYYMMDD') &'_'& Hour(@2) as AuditDate,   
        Lower(Mid(@3,Index(@3,'\',-1)+1)) as AuditDocument,
        @4 as AuditType,
        Lower(Mid(@5,Index(@5,'\',-1)+1)) as AuditUser,
        Year(@2) as Year,
        Month(@2) as Month,
        Day(@2) as Day,
        Hour(@2) as Hour,
        @6 as Message,
        @7 as message2
    FROM $(PATHQVLOG)\Audit_*.LOG (utf8, txt, delimiter is '\t', header is 1 lines)

Thanks,

MVP
MVP

I want tok now if there a way to read a column that has no name on it

Try adding no labels to the format specifier

FROM $(PATHQVLOG)\Audit_*.LOG (utf8, txt, delimiter is '\t', header is 1 lines, no labels)

Not applicable

I want tok now if there a way to read a column that has no name on it

Thanks! It works