Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
kvijay173
Creator
Creator

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
rnt
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

kvijay173
Creator
Creator
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;

rnt
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;

kvijay173
Creator
Creator
Author

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