Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please can someone assist in identifying what I am doing wrong. The error message says that it is an invalid expression. It happens when i add the "MAX" command infront of the date. Example of date = 30.05.201615:26:26
Code below :
TASKS:
LOAD PROCTY,
TRART,
PROCS,
TOSTAT,
MAX(timestamp(timestamp#(CONFIRMED_AT,'DD.MM.YYYYhh:mm:ss'),'YYYY/MM/DD hh:mm:ss')),
VLENR,
NLTYP
FROM
[..\..\ORDIM_C.QVD]
(qvd)
WHERE VLENR <> ' '
AND PROCTY = 2015
AND TOSTAT = 'C'
AND NLTYP = 9025;
Hi,
max() is aggreagated function.
You need group by clause
try like
TASKS:
LOAD PROCTY,
TRART,
PROCS,
TOSTAT,
MAX(timestamp(timestamp#(CONFIRMED_AT,'DD.MM.YYYYhh:mm:ss'),'YYYY/MM/DD hh:mm:ss')),
VLENR,
NLTYP
FROM
[..\..\ORDIM_C.QVD]
(qvd)
WHERE VLENR <> ' '
AND PROCTY = 2015
AND TOSTAT = 'C'
AND NLTYP = 9025
group by
PROCTY,
TRART,
PROCS,
TOSTAT,
VLENR,
NLTYP;
Regards
Hi,
MAX() is an aggr function..
try with a "group by" for the fields not used in the Max().