Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Load DATA, 'G' AS RESULTS
FROM TABLE_NAME;
What do you mean bu column A ? I guess u meant column Data?
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
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
Load DATA, 'G' AS RESULTS
FROM TABLE_NAME;
try this ..
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;