The SuiteQL Union operator stands out as a powerful tool for combining data from multiple sources. In this article, we delve into the intricacies of SuiteQL Union and explore its applications
select * from (select id,email from contact union select id,email from customer);
In this example, we're selecting the "id" and "email" columns from both the "contact" and "customer" tables and merging the results using the Union operator. The resulting dataset will contain unique combinations of IDs and emails from both tables.
To easily execute a SuiteQL query, see NetSuite Admin Tip | Running SUITEQL Using a Suitelet
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
Oracle + NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
Oracle + NetSuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
Do you have any other way on how to use UNION in SuiteQL? Feel free to share them here!
If you find this information useful, let us know by reacting or commenting on this post! Thank you!