Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need to insert column with my value to existing table

Hi Friends,

Need a small help.

I have a table. I would to insert a column and the value of this column has to be NA

May I know if this is possible.

Example:

Original Table:

Column 1    Column 2          Need Column 3

A               1                         NA

B               2                         NA

C               3                         NA

D               4                         NA

1 Solution

Accepted Solutions
Ralf-Narfeldt
Employee
Employee

If it's just as simple as showing it in a table, without having any logic attached, create a Straight table with Column1 and Column2, then add an Expression 'NA' with Column3 as label.

No loading or scripting required.

View solution in original post

8 Replies
sunny_talwar

Are you trying to do this in the script??? If yes then you can do like this:

Table:

LOAD [Column 1]

          [Column 2]

          'NA' as NeedColumn3

FROM yourSource;

ashfaq_haseeb
Champion III
Champion III

Hi,

Try like this

Load *,'N/A' as Col3;

load * Inline

[

Col1,Col2

A,1      

B,2      

C,3      

D,4 

];

Regards

ASHFAQ

Anonymous
Not applicable
Author

No. I have data with Column 1 and Column 2.

I have imported this data inside QlikView. But I want a to have a Column 3 and it should say NA (NA is not the heading) the data for Column 3.

sunny_talwar

NA isn't a heading it will be data within your third column.

Best,

Sunny

vikramv
Creator III
Creator III

TempTabA:

LOAD * INLINE [

    ID, Country,

    1, Ind

    2, Sri

    3, Ban, c

];

TabA:

Load *,'NA' as Col3 Resident TempTabA;

Drop Table TempTabA;

Ralf-Narfeldt
Employee
Employee

If it's just as simple as showing it in a table, without having any logic attached, create a Straight table with Column1 and Column2, then add an Expression 'NA' with Column3 as label.

No loading or scripting required.

sunny_talwar

You mean Resident TempTabA:

TempTabA:

LOAD * INLINE [

    ID, Country,

    1, Ind

    2, Sri

    3, Ban, c

];

TabA:

Load *,'NA' as Col3 Resident TempTabA;

Drop Table TempTabA;

Anonymous
Not applicable
Author

Thanks guys.. I used an expression as NA for Column 3