How do I access netsuite data using SQL language - sql

A company uses netsuites to make purchase orders and store sales information. The only way this company is able to access this information at the moment is through building netsuites reports
Is there a way SQL language could be written to access the netsuites data as some of the questions asked by the business need something a bit more complex than what netsuites reporting provides - and sound very easy using SQL language
I have experience in Oracle, mysql, and many other SQL languages so I would like to know how to set up a connection to the companies netsuites data so I can help write custom queries

Netsuite has SuiteAnalytics Connect, which is ODBC. It can be downloaded from a link at the very bottom the home screen of your Netsuite account.
After installation of the application bundle and connecting it to your Netsuite, you can write ORACLE SQL queries via Excel, Access, etc. My experience is that Netsuite uses Oracle SQL in ODBC queries and in Saved Search custom queries.

The way I understand it, the ODBC driver is a separately priced item from NetSuite. Once you have that, you could use Excel, Access, Crystal Reports or anything else that can use the ODBC driver to read the data and write queries against it.
The normal way to access NetSuite data is with SuiteScript -- javascript code that uses the nlapi* calls to get to the data.

You can access Netsuite backend using a number of different tools and it allows running Oracle SQL directly.
Netsuite provides JDBC, ADO.NET and ODBC if it was included in your licensing purchase. You can find the downloads from the main menu - lower left hand of the screen in Settings - Set Up SuiteAnalytics Connect.
ADO.net however is pretty worthless in SSIS as it doesn't allow parameter mapping or SQL from a variable value. I have yet to get the ODBC driver to work correctly - it can connect and show columns of a table but it won't validate saying "The ODBC Source.Outputs[ODBC Source Error Output].Columns[...] on the error output has properties that do not match the properties of its corresponding data source column."
The other options I'm looking into are Cozyroc and Kinsgwaysoft adapters for Netsuite. You could also do SOAP or REST connections if desired.

I've not used this, but there should as of 2014.2 there is an ODBC driver available for read access.
http://www.netsuite.com/portal/landing/2014-2/suiteanalytics.shtml

As previously mentioned, if you have it licensed you can download the ODBC driver from the Netsuite application. I tested some other adapters but found Netsuite's at least as good as the competitors and they provide timely security updates to the drivers as well as both 64 and 32 bit versions.
There are also metadata browsers that are on the net (example is URL below), the type of browser being based on which kind of access you are looking at (web services, verses ODBC, etc).
https://system.sandbox.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_2/odbc/record/account.html
Within the application GUI there is information you need to connect using their ODBC connection (you need the account id and the role id). The URL is just odbcserver.xxxx.netsuite.com where xxx is specific to your environment you are accessing. Note that other adapters such as Cozyroc, etc. require the admin to setup connections in Netsuite for those.
Here is a list of the main metadata tables:
OA_FKEYS
OA_TABLES
OA_COLUMNS
In addition, note that the URL above does NOT include customization. Plus its not easily consumed by automation tools. But Netsuite provides a set of metadata views within the repository which you can use ODBC to pull from which includes all keys - foreign and primary. AND it does include customizations! I built simple set of ETL jobs that use standard ADO.NET driver within SSIS and the ODBC DSN to pull all the metadata and then use BIML to automatically generate all the extract ETL and related staging tables. You can also easily then use the metadata to detect changes in the underlying database.
Let me know if I can be any help with doing any of this.

There are 3rd party tools, like CData ODBC Adapter for NetSuite: http://www.cdata.com/drivers/netsuite/odbc/ . This tool allows you to run standard SQL against the NetSuite API. Note that the NetSuite API presents a very different data model from that of the native NetSuite ODBC.
With this tool, you install in onto your machine (Win in my case) and then after you configure the driver, you can run SQL against it (the driver config is where you specify your NS credentials, etc.).
It revolutionizes access to NetSuite data IMHO.

Download the Netsuite ODBC drivers, set up your DSN locally with server/credentials, Use SSIS pkgs to automate data extract and load onto you local DB. Use ADO.NET drivers if preferred. Then utilize those tables to create/deliver your complex reports using SQL (stored procedures) and Reporting Services. This will require SQL Standard license at minimum though.

Only API call can access the NetSuite data

You can't access to Netsuite data using sql language.
The only way to gain access to Netsuite from third party systems is to use SOAP request or PHP toolkit.

Related

Accessing BigQuery via SQL Developer

I am new to Google's BigQuery (BQ). I am looking for a way to use SQL Developer (SD) as my primary GUI.
I have tried setting up a third party JDBC, but it does not seem to work. I downloaded Google's JDBC drivers for BQ and tried setting it up as a third party connection in SD. It registers, but does not show on the create new connection.
It is supposed to show up as a new Connection Type tab, but nothing is shown.
Is it possible to access BigQuery with SQL Developer? If so, can anyone provide me with the correct steps to duplicate?
Have you tried the Simba Driver? It provides not only JDBC, but ODBC (3.8 is supported) as well.
Alternatively you can check this documentation on how to Access BigQuery Data as a Remote Oracle Database.

What SQL type is used in Excel

This is my first post in here,
I am new to SQL and I started learning it, I use it mainly in excel to get data from an outer Database
I first go to data then Refresh all then from the menu I choose connection properties
Then a dialogue appears and I input my code in the window called Command text from the Tab Definition
I added images to show where I input my SQL code
My question is what type of SQL do I input there ?
is it mySQL or SQLServer or what ??, so I can learn it, because some commands just don't work with me the way they are supposed to do
You can connect to any database type as long as you have the appropriate ODBC drivers. For example, here is documentation for MySQL for Excel. Quote from article "Use Microsoft Query to retrieve external data":
If the external database that you want to access is not supported by the
ODBC drivers that are installed with Microsoft Query, then you
need to obtain and install a Microsoft Office-compatible ODBC driver
from a third-party vendor, such as the manufacturer of the database.
Contact the database vendor for installation instructions.
OLAP databases do not require ODBC drivers. When you install Microsoft Query, drivers are installed for databases that were created
by using Microsoft SQL Server Analysis Services. To connect to other
OLAP databases, you need to install a data source driver and client
software.
Whichever database type you connect to, you will still be using Microsoft's SQL variant (as developed for SQL Server). As a beginner you're not going to notice too many differences right off the top. Most of the differences are related to data types, such as DATE vs DATETIME. Here is a wiki on SQL Compliance and this article on MS Access SQL will also apply to Excel Query.
You can connect to many data source including: SQL Server database, Access database, MySQL database, PostgreSQL database etc..
You can find the full list here: Link

Search and extract data from AS400 using IBM Domino Lotus Notes workflow

I was doing a lotus notes workflow which needs to connect to my ERP system, AS400 to search and extract data into the workflow.
Any idea I can possibly do that?
Thanks!!
You can use DECS on the domino to connect to your AS400 using a scripted activity (or configure a sync). Therefor you need a DB2- driver installed on your Domino server. The other possibility would be to use LEI (that costs a bunch of money, but can do a lot more). The third possibility would be to use lsxcon- classes and write an Agent to get data.
A JAVA- Agent with JDBC might be possible as well (if AS400 supports access using JDBC and you have the appropriate driver).
All solutions will either need someone to code it or money to buy the licences...
If it is a "one time" or "manual" task then the DB2 driver can be installed on a Client where the agent is run manually or in a local schedule (only working if client is running).

Lotus Notes ODBC Connection

I need to connect and send/receive information from an MS SQL server in my Lotus Notes app using #formula in realtime (I can connect using an agent, but I need to use inline code for this).
The commands themselves seem pretty straight forward, but setting up the configurations seems to be a topic with scarce documentation. Apparently I need to install an ODBC driver. Where would I find that, and do I install that onto the server or onto the workstations that will run this app?
If any Lotus gurus could step me through setting this up, it would be greatly appreciated.
Thanks
You'll need to install the ODBC driver on the workstations that run this app, if the users will be triggering the ODBC connections. If at all possible, I highly suggest setting this up on the server side, and having it run via an agent. That'll save you from a few headaches, including having to maintain the ODBC connections on each workstation and worrying if each workstation has access to the data and server.
You first just want to make sure your ODBC setup is correct. You'll need the appropriate driver, of course, and the connection information. This site has a walkthrough to give you an idea of how to setup an ODBC database connection
If you have MS Access you can use it to test querying from the ODBC data source. Once you've tested the connection works, you'll just refer to the data source name (DSN) in your #DbColumn, #DbLookup, or #DbCommand formulas.
Back to my suggestion on setting this up on the server side, that would mean you'd keep a copy of the data you're querying within the Notes database itself, and then users would be interacting with read-only data in Notes. You could schedule updates regularly on the server side of that read-only data and effectively create a cache of the data in your Notes environment. Then that data would replicate around to other replicas of the database, but remove the trouble of the ODBC connection being needed everywhere.
If you need realtime data, though, that solution is out the window and you'll have to go with a local solution. In that case, you might want to look at the LCConnection class or using an ADODB.Connection from script, as both will allow you to create DSN-less connections to data sources. You'd then save the trouble of requiring ODBC data sources on each workstation, and only have to worry about whether they can access the server from their workstation.
I would add another option to Ken's list. It involves having the server do the queries of the external database (therefore you are only setting up ODBC in on the server - you don't have to deal with it on the workstations). You create an agent that is launched on the server using the 'run on server' technique. When the workstation needs to query the external data, the code creates a throw-away document in the database, puts the query criteria into the temporary document, saves the document, then calls the 'run on server' agent passing a reference to the temporary document. The server launches the agent, reads the criteria from the temporary document, does the query, and writes the results back to the temporary document. Then the workstation can access the query results from the temporary document. A scheduled agent can delete the temp docs on a regular basis.
It sounds complicated, and it all has to be done in script, but I've done this in many applications and it is fast, flexible, easy to administer, and gives your applications a lot of power. Note that end users must have the ACL rights to create a document in the db (the temp doc) in order for this to work.
Good luck!

Approaches to building reports with Quickbooks 2008+ Data

I am looking to build some reports for Quickbooks data, without using Quickbooks built-in reporting, or through a third party library (like QODBC).
Quickbooks 2008 and newer are built on a SQL backend.. In looking around there seems to be several products and angles to do this from.
Ideally I would like to be able to do direct SQL hits on the database myself, or use something like Crystal Reports.
I wanted to ask here to gather any things to look at closer, and what to potentially avoid to save myself grief.
Thanks in Advance!
Update: It seems Quickbooks encrypts it's sql database so you can't read it directly with a reporting tool.. There are a few products on the market that can help.. more to come.
Your best bet is the QuickBooks SDK, it provides facilities to fetch data and also fetch reporting data directly from QuickBooks, formatted as XML for easy parsing and display however you want to display it.
You can see the data that's available using the qbXML/QBFC QuickBooks On-Screen reference (the requests you can send to QuickBooks are found in the 'Select Message' drop-down box at the top of the screen).
The QuickBooks SDK is a free download (registration required) from the Intuit Developer Network
If you're writing a desktop application, you can look into using QBFC, which is an API that talks to QuickBooks using COM/DCOM.
If you're using PHP, there's a popular QuickBooks PHP framework on the IDN forums.
If you're using ASP.NET, here's a QuickBooks ASP .NET framework too.
If you want direct SQL access, you should look at QODBC (which is an SQL wrapper which translates SQL queries to qbXML SDK requests) or AccessBooks (which uses the SDK to mirror QuickBooks data to an SQL database).
If its hosted on SQL 2005 or 2008 you can make use of Reporting Services (free) and the Report Builder that is bundled with it. If you use 2008 then I recommend downloading Report Builder 2.0
http://www.microsoft.com/downloads/details.aspx?familyid=9f783224-9871-4eea-b1d5-f3140a253db6
Here's some links to learn RS:
http://www.google.com/search?q=reporting+services+tutorial+video&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
So are you on the 2008 edition (SQL Server)?
If so, you can use SSRS as SQLChicken posted, or you can use just about any other reporting tool, and connect via SQL Native Client (shipped with SQL Server):
- Crystal Reports
- Excel
- insert your favorite reporting tool here