Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a table as follow
ID Value
1 100
2 -
3 -
How can i create a new field to have the same value(100) for all IDs and my table will look like
ID Value New value
1 100 100
2 - 100
3 - 100
Thxs,
Alec
Hi
Its working for me.. Check file
Hi
try like this
Load ID, Value, If(Isnull(Value),Peek('NewValue'), Value) AS NewValue From tablename;
Edit:
or
Load ID, Value, If(Len(Trim(Value))=0,Peek('NewValue'), Value) AS NewValue;
Load * Inline
[
ID , Value
1, 100
2,
3
];
hi,
It is not working.. I am getting an error..
Syntax error, missing/misplaced ..
Hi
Its working for me.. Check file
Hello, For this specific case try:
DataTemp:
LOAD * INLINE [
ID, Value
1, 100
2, -
3, -
];
Data:
LOAD
ID
,Value
,if(RowNo()=1 ,Value,peek(Value,0)) as NewValue
Resident DataTemp
;
Drop Table DataTemp
;