Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Table A:
ColumnName1,colmnName2
a 2
b 3
c 4
vVariable1=sum(columnName2) where columnName1=(a and b) i.e. vVariable1=5
i want sum (columnName2) with where condition(columnName2=a and b) and store into an variable vVariable1.
Here is the alternative
Table:
LOAD * INLINE [
ColumnName1, colmnName2
a, 2
b, 3
c, 5
];
TempTable:
LOAD Sum(colmnName2) as SumAB
Resident Table
Where Match(ColumnName1, 'a', 'b');
LET vSumAB = Peek('SumAB');
DROP Table TempTable;
FinalTable:
LOAD *,
colmnName2 - $(vSumAB) as Result
Resident Table;
DROP Table Table;