Hi, hope someone can assist please!
I am struggling to do a Desc sort this query on the first field, Sec
SELECT TOP 30 Mid([DocNumber],InStrRev([DocNumber],Chr(47))+1) AS Sec, Left([DocNumber],4) AS Try, QB_Invoice.DocNumber, (Right([DocNumber],5)) AS TheDocNumber, QB_Invoice.TimeModified
FROM QB_Invoice
WHERE (((Left([DocNumber],4))>2023) AND ((QB_Invoice.DocNumber) Is Not Null));
I have tried
ORDER BY Mid([DocNumber],InStrRev([DocNumber],Chr(47))+1) DESC;
and
ORDER BY Sec DESC;
But cannot get this to work.
Any ideas please?
I am struggling to do a Desc sort this query on the first field, Sec
SELECT TOP 30 Mid([DocNumber],InStrRev([DocNumber],Chr(47))+1) AS Sec, Left([DocNumber],4) AS Try, QB_Invoice.DocNumber, (Right([DocNumber],5)) AS TheDocNumber, QB_Invoice.TimeModified
FROM QB_Invoice
WHERE (((Left([DocNumber],4))>2023) AND ((QB_Invoice.DocNumber) Is Not Null));
I have tried
ORDER BY Mid([DocNumber],InStrRev([DocNumber],Chr(47))+1) DESC;
and
ORDER BY Sec DESC;
But cannot get this to work.
Any ideas please?