Tuesday, April 23, 2019

UNION Clause in ODBC

UNION clause works in NetSuite ODBC as specified by SQL-92 standard. There are only two requirements regarding UNION clause:

1. Number of columns in all select statements must be equal
2. Columns which are to be combined need to be the same data type (e.g. customer_id and employee_id in following example) and order

Example:

select customer_id, full_name, email from CustomersUNIONselect employee_id, full_name, email from Employeesorder by 1,2,3;

No comments:

Post a Comment