Is there a query to get a list of all tables?
# suiteql
c
Is there a query to get a list of all tables?
n
Theres the records catalog that shows all the tables. Customization > Records Catalog Theres also this really cool tool that Tim Dietrich developed for searching tables and running sample queries https://timdietrich.me/netsuite-suitescripts/suiteql-query-tool/
I also found this, which actually answers your question. http://www.netsuiterp.com/2018/10/sample-sql-query-to-list-all-table.html
SELECT * from OA_TABLES
c
Got this when running that query
Invalid search type: OA_TABLES
There has to be a way to run this query. Getting info about the db is so basic!
n
ah looks like it may only work with ODBC Youre right. It seems like such a simple thing
c
Doesn't look like it's exposed to regular SuiteAnalytics. 😞
😩 1
j
Note that the Records Catalog is NOT complete.
a glaring example,
transactionline
is not listed
message has been deleted
n
oof
j
even though it does exist (you can modify the URL to get to it)
e.g.
<https://xxxxx.app.netsuite.com/app/recordscatalog/rcbrowser.nl?whence=#/record_ss/transactionline>
n
Thats why i really like that SuiteQL tool by Tim. It has a comprehensive list with links to all the joins on the record
j
Yeah it’s cool. I haven’t used it yet as I wrote my own Query runner, and I already know pretty much all the tables I need.
Mine is not as fancy 😉
but does the trick
n
Oh wow. That looks impressive
j
it’s just a suitelet
I do like that I log all the queries that I run though…has saved me before cuz I can go back and find something I wrote before
a
Big problem with SuiteQL that greatly limits the tools you are able to create. I've created a SuiteQL vscode extension but without a way to access the schema I found myself reaching for @tdietrich's tool often enough to drop development.
c
There are tables you can query that aren't in the records browser, that's the problem I'm running into. Try finding a reference to the
ItemImage
table anywhere. You can query it, but it's not listed anywhere.
s
You can find most of the tables in analytics browser documentation. https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_1/analytics/record/itemImage.html But that is also missing some tables, e.g. the
transactionstatus
table
I've put it together into an Excel spreadsheet which you can filter/search
👀 1
c
@Shai Coleman This is a gold mine of good info.