To import SQL data, start with the Data: Connect to Database menu command:

Connection Strings are a useful method for quickly establishing a new connection from an existing connection.
To establish a new connection to an ODBC data source, choose this option:

Select this if you have an ODBC driver and want to create a data source applicable to this data connector instance.


Once you have established a connection to your data source, you will see a list of objects on the left panel (Table List) of the SQL Editor dialog.
Double-clicking on a table node will add the table node to the SQL statement edit box on right panel. Or you can directly paste the SQL query into the SQL statement edit box.

For a working example of building a query, see this OriginLab blog post on Connecting to a Database and Importing Data.
You can save a query to a workbook or an ODQ file by going to the SQL Editor menu and selecting either File: Save to Active Worksheet or File : Save Connection and Query as.... In addition, clicking the Import button in the SQL Editor dialog box will automatically save the query in the target worksheet.
Saving a query to workbook (File: Save Window As) allows you to preview the data on the workbook and import the data at any time you want. The workbook can be saved as a template (File: Save Template As), which can also store information on the formatting of the workbook. Next time you open the template, you will have a formatted workbook with a customized query saved in it. By clicking the Database Connector icon
in the upper left corner of the template, you can Import and fill the formatted workbook with data acquired from the data source. To view or modify a query saved in active worksheet, click the Database Connector icon and choose SQL Editor.
Saved query (ODQ) files can be loaded by clicking Data: Connect to Database: Open and browsing for the file or by clicking one of the saved files in the recently-used list. After an *.ODQ file is loaded, you can preview or import it to the active workbook. This is useful when you want to apply the query to multiple workbooks.
By clicking the Database Connector icon
in the upper left corner of the worksheet and select Auto Refresh..., you can refresh the database by a specified time interval and temporarily stop refreshing.
Refer to this page for details.