Skip to content

Create Dataset using Union

What is Union?

  • The Union operator combines the results of two or more queries into a distinct single result set that includes all the rows that belong to all queries in the Union. It allows you to write two separate SELECT statements, and to have the results of one statement display in the same table as the results from the other statement.

  • It removes duplicate rows between the various SELECT statements. Each SELECT statement within the UNION must have the same number of fields in the result sets with similar data types.

  • Each SELECT statement within the UNION must have the same number of fields in the result sets with similar data types.

Objectives

  • Create Dataset using Union.

Prerequisites

  • For this example we are using Sales.ds & Order Details.ds

Download join.jar file from link given join.zip

  • After downloading the jar file, add Sales.ds from zip into the AIV. To add it into AIV follow this Link

Skill Level Required

  • Basic knowledge of Union Operator & SQL.
  1. Log in to AIV using your respective credentials.

  2. Go to Hamburger Menu Image > MasterData > Dataset.

  3. To know more in details about Dataset Section Click here .

  4. User can create dataset using 2 options:-

I. From the footer menu &
II. From the context menu

  1. Click on Create Dataset option & your screen will look as per below image.

    Image

  1. Enter the details in Dataset window as per below:-
  • Name: New Dataset
  • Datasource: Union
  • Datasets: Sales.ds
  • Dataset Columns: Select country, orderDate, productCode, quantityOrdered, productName, extendedPrice..

Image

  • Select another Datset from the Dataset box as given below:
  • Datasets: Order Details.ds
  • Dataset Columns: select ORDERNUMBER, ORDERDATE, SHIPPEDDATE, STATUS & CUSTOMERNUMBER..

Image

  • Click on Preview button to see the Dataset preview.

    Image

  • Scroll the Horizontal & Vertical Scrollbar to see the merged preview data of both dataset that are selected.

    Image

  • It will create a combination of both dataset & create a new dataset.

  • Create on Submit button & dataset will be created.