Why am i getting this error? Search error occurred...
# ask-stanley-ai
e
Why am i getting this error? Search error occurred: Failed to parse SQL [SELECT sn.id, sn.record, sn.date, sn.type FROM SystemNote AS sn LIMIT 10 ]: syntax error, state:961(10102) near: AS(7,16, token code:0)
c
AI generated answer (using internal Slack threads):
The error you're encountering is due to incorrect SQL syntax. In NetSuite's SuiteQL, the
AS
keyword is not used for aliasing. Instead, you should directly use the alias name. Your query should look like this:
Copy code
sql
SELECT sn.id, sn.record, sn.date, sn.type 
FROM SystemNote sn 
LIMIT 10
In this corrected query,
sn
is used as an alias for
SystemNote
. Please note that NetSuite's SuiteQL has its own syntax and does not fully adhere to standard SQL syntax. Always refer to the NetSuite documentation or the SuiteQL help in NetSuite for the correct syntax and usage. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.822631896
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821899414
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811706543
Please provide your feedback on this answer.