Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can anyone please shed any light on why my ORDER BY statement doesn't work after my WHERE selection when loading a table from qvd within the script.
The WHERE statement works fine but throws an error "Garbage after statement" when i add the ORDER BY and try to reload the data.
Any help will be great!
Thanks, Joe
This is the code I am using:
TOPSSALES1:
LOAD
[Invoice Number],
[Order Number]
,
[Kit Indicator],
[Customer Code]
,
[Invoice Date]
,
Date
([Invoice Date]) AS InvoiceDate,
[Financial Week]
FROM
(
qvd) WHERE [Invoice Date] > '2009-01-01' AND [Kit Indicator] <> 'P' AND [Kit Indicator] <> 'C' ORDER BY InvoiceDate ASC;
Hi,
You can't order a qvd file, for doing it, your code must be the following:
TOPSSALES1Temp:
LOAD
[Invoice Number],
[Order Number],
[Kit Indicator],
[Customer Code],
[Invoice Date],
Date ([Invoice Date]) AS InvoiceDate,
[Financial Week]
FROM(qvd)
WHERE [Invoice Date] > '2009-01-01' AND [Kit Indicator] <> 'P' AND [Kit Indicator] <> 'C';
TOPSSALES1:
NOCONCATENATE LOAD *
RESIDENT TOPSSALES1Temp
ORDER BY InvoiceDate ASC;
DROP TABLE TOPSSALES1Temp;
Hi,
You can't order a qvd file, for doing it, your code must be the following:
TOPSSALES1Temp:
LOAD
[Invoice Number],
[Order Number],
[Kit Indicator],
[Customer Code],
[Invoice Date],
Date ([Invoice Date]) AS InvoiceDate,
[Financial Week]
FROM(qvd)
WHERE [Invoice Date] > '2009-01-01' AND [Kit Indicator] <> 'P' AND [Kit Indicator] <> 'C';
TOPSSALES1:
NOCONCATENATE LOAD *
RESIDENT TOPSSALES1Temp
ORDER BY InvoiceDate ASC;
DROP TABLE TOPSSALES1Temp;
Sorted! 🙂 Thank you very much!
Joe
Dear
is there anyother way to Order Field of Qvd ?.
Regards
Sunil