Aaron Lozier
03/29/2021, 8:26 PMSELECT * FROM transaction WHERE (entity = xxxxx) AND (type = 'SalesOrd')
But adding the ORDER BY
clause:
SELECT * FROM transaction WHERE (entity = xxxxx) AND (type = 'SalesOrd') ORDER BY trandate
Causes the REST API to return an empty result set.
It seems counter-intuitive that simply adding an ORDER
clause would change the number of records that get returned.
In other cases, attempting to sort by date fields results in a 500 - Internal Server Error
- perhaps related to the issue @Peter Church reported above?Marc Reicher
03/29/2021, 8:56 PMtrandate
is corrupted or something. I would be curious if the following queries work:
SELECT trandate FROM transaction WHERE (entity = xxxxx) AND (type = 'SalesOrd')
SELECT trandate FROM transaction WHERE (entity = xxxxx) AND (type = 'SalesOrd') ORDER BY trandate
Aaron Lozier
03/29/2021, 9:00 PM{
"links": [
{
"rel": "self",
"href": "<https://xxxxxxx-sb3.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=50>"
}
],
"count": 0,
"hasMore": false,
"items": [],
"offset": 0,
"totalResults": 6
}
Aaron Lozier
03/29/2021, 9:01 PMMarc Reicher
03/29/2021, 9:42 PMasc
or desc
(ascending or descending) at the endMarc Reicher
03/29/2021, 9:42 PMSELECT * FROM transaction WHERE (entity = xxxxx) AND (type = 'SalesOrd') ORDER BY trandate DESC
or
``SELECT * FROM transaction WHERE (entity = xxxxx) AND (type = 'SalesOrd') ORDER BY trandate ASC`Marc Reicher
03/29/2021, 9:43 PMPeter Church
03/29/2021, 10:11 PMAaron Lozier
03/29/2021, 10:59 PMAaron Lozier
03/29/2021, 11:00 PMMarc Reicher
03/29/2021, 11:08 PMMarc Reicher
03/29/2021, 11:09 PM