Jeff Greene
05/07/2025, 7:40 AMsyntax error, state:1225(10102) near: LIMIT(4,40, token code:0)
Celigo AI
05/07/2025, 7:40 AMAI generated answer (using internal Slack threads):Based on the conversations, it appears that SuiteQL does not directly support the
LIMIT
clause. Instead, you can use SELECT TOP 5
or WHERE ROWNUM <= 5
to limit the number of results returned by your query.
However, please note that you cannot combine ORDER
and TOP
unless you do a nested query. The TOP
should be in the outer query and the ORDER
in the nested query.
Also, it's important to note that SuiteQL has a limit of 100,000 records per query. If you need to retrieve more than 100,000 records, you'll need to segment your query. For example, you can index through the dates in your WHERE
clause to ensure you always have less than 100,000 results.
As for the string length of a query result, it seems that there might be a limit of 249 or 250 characters. However, this limit can be bypassed by using SuiteQL and creating the column as a formula with to_char({longtextfield})
.
Here is an example of how to do this:
javascript
newQuery.createColumn({
formula: 'to_char({longtextfield})',
type: query.ReturnType.STRING,
alias: 'datafield'
})
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
05/07/2025, 7:40 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831091881
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815036535
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808249414
Celigo AI
05/07/2025, 7:40 AM