Hi Guys, Can we query SQL, to display the standard...
# suiteanalytics
n
Hi Guys, Can we query SQL, to display the standard list in NetSuite? Like Case Origin field , which is a list field and if i query as "Select * from supportcase" it will give me the internal id of the original field, but i need the Text.
m
You can get the text without a separate join using the
BUILTIN.DF
function in SuiteQL.
Copy code
select BUILTIN.DF(origin), * from supportcase
thankyou 1
n
oh , thats great !!! Thank you so much Mike. You saved my day
is there a way to display all the available tables. ? Like select * from OA_TABLES
m
I don't think so. Tim D wrote a nice article about how he uses the Record Browser API to get information about the tables available.
n
thanks
m
You can also just build your query in the Analytics UI and then export as SQL and that's where I get all the ids from too. Schema browser is good, but I haven't used it in so long since it's easy to get the information I need within Analytics dataset queries.
Another hack that I use to quickly test is to load "N/query" into the browser console and built the query using query.create. Then after I have a working version I will Query.toSuiteQL() to turn it into SQL. This helps me with the syntax for when I want to return not just raw context.