Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm looking to perform the following task in QV:
Value | New Column |
A | A |
B | A,B |
C | A,B,C |
D | A,B,C,D |
E | A,B,C,D,E |
How can i achieve this ? I imagine there is a previous command involved. Just unsure as to how to frame the logic.
All suggestions are welcome. Thanks
V
or maybe:
LOAD *,
if(Peek('New Column')<>Null(),Peek('New Column'),Null())& Value as [New Column];
LOAD * INLINE [
Value
A
B
C
D
E
];
May be like this
LOAD Value,
Alt(Peek('New Column'), '') & ',' & Value as [New Column]
FROM ...
or maybe:
LOAD *,
if(Peek('New Column')<>Null(),Peek('New Column'),Null())& Value as [New Column];
LOAD * INLINE [
Value
A
B
C
D
E
];
My intentions were right, but I should have thought through or tested my code .
Slight improvement
Table:
LOAD *,
Peek('New Column') & Value & ',' as [New Column];
LOAD * INLINE [
Value
A
B
C
D
E
];
FinalTable:
NoConcatenate
LOAD Value,
Left([New Column], Len([New Column]) - 1) as [New Column]
Resident Table;
DROP Table Table;
Thanks all.