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: 
bouderbc
Creator
Creator

How To fill all the fields of a column with the same field (another value)?

Hi Experts,

How To fill all the fields of a column with the same field ? without using Load if , cause i have many fields to load

Thanx

Example :

Column: Data

Fields: A B C D E

Replace All the fields with : F

Result: F F F F F

Thanx

Regards

Ali

14 Replies
pradosh_thakur
Master II
Master II

Load DATA, 'G' AS RESULTS

FROM TABLE_NAME;

What do you mean bu column A ? I guess u meant column Data?

Learning never stops.
bouderbc
Creator
Creator
Author

can i rename two times a field: the first to fields the fields with the same value , and the second to rename it

(cause i have tow table concatenated and i must have two columns with the same fields , even if i did transformations in a column)

using your first expression

LOAD 'G' as DATA as Customer

sunny_talwar

I am not sure I follow this

can i rename two times a field: the first to fields the fields with the same value , and the second to rename it

But you should be able to rename a field any number of times

pradosh_thakur
Master II
Master II

Load DATA, 'G' AS RESULTS

FROM TABLE_NAME;

try this ..

Learning never stops.
hari8088
Creator
Creator

Use replace function

Replace(DATA,DATA,'F') as newdata,

OR

see below script.....

Data:

LOAD * Inline [

data

a

b

c

d

e

f

];

Final:

LOAD data,

Replace(data,data,'Z') as newdata

Resident Data;

DROP Table Data;