https://netsuiteprofessionals.com logo
#suiteanalytics
Title
# suiteanalytics
k

KnotKnick

03/23/2022, 2:52 PM
Hey everyone, I am using suiteconnect to pull data from netsuite via a rest webservice connection. I am trying to pull data from the Subscription Line Revision table, and getting some error on it. When I run the following query:
Copy code
SELECT * from COUNT(id) AS i FROM SubscriptionLineRevision WHERE ROWNUM <= 50;
I get the following error:
Copy code
{
  "type": "<https://www.w3.org/Protocols/rfc2616/rfc2616sec10.html#sec10.4.1>",
  "title": "Bad Request",
  "status": 400,
  "o:errorDetails": [
    {
      "detail": "Invalid search query. Detailed unprocessed description follows. Search error occurred: Invalid or unsupported search.",
      "o:errorQueryParam": "q",
      "o:errorCode": "INVALID_PARAMETER"
    }
  ]
}
But when I change
ROWNUM
to
ROWNUM <= 40
, the query seems to work fine. What is the cause of this issue when I try to get more than 40 rows?
j

jen

03/23/2022, 3:09 PM
SEELCT
?
k

KnotKnick

03/23/2022, 3:22 PM
Sorry that was a typo 😅 I did have SELECT
g

George McMullen

03/23/2022, 10:44 PM
Seems there might be another typo?
SELECT * from COUNT(id) AS i FROM
? Perhaps you just want
SELECT *
and don’t want
COUNT(id) AS i
?
My guess is that there is a limit to the kilobyte size of the result set in a
SELECT *
. I think I had found something similar with result column that was too long. Perhaps there is a row that is returning a column that is too long.
k

KnotKnick

03/24/2022, 2:01 PM
Thank you so much! When I did ROWNUM between a certain range it worked.
👍 1