1.

OBSIDsYOBDatediag1daig2daig3daig4daig511002-Mar-862-Mar-18D4500D45021002-Mar-865-Mar-180D4500D4531002-Mar-868-Mar-180C500C50D4541015-Jan-808-Jan-1800D45D45051015-Jan-802-Feb-18D4500D45061015-Jan-8027-Feb-180D4500D4571015-Jan-8024-Mar-18D450D450081015-Jan-8018-Apr-18D4500D45091024-Jan-8518-Jan-170D4500D45101024-Jan-8525-Jan-18D4500D450111024-Jan-851-Feb-180D4500D45121024-Jan-858-Jan-1800D45D450131024-Jan-8515-Feb-1900D45D4501410316-Jan-9015-Feb-180D4500D451510316-Jan-9025-Feb-18D4500D4501610316-Jan-907-Mar-180D4500D451710316-Jan-9017-Mar-1800D45D4501810425-Jan-9227-Feb-1800D45D4501910425-Jan-9224-Mar-180D4500D452010425-Jan-9218-Apr-18D4500D450

Answer»

Information From Dataset: A

Information From Dataset: B

The output of the UNION Operator

UNION Operator is used to club the specific variable information from both the tables. Apart from updating the information, it also removes the duplicate data and SORTS the combined information.

The output of UNIONALL Operator

UNIONALL Operator works by appending the information from dataset B after the information from dataset A. It doesn’t remove the duplicates or sorts the resultant data.

Note: If the VARIABLES are EXISTING in both the tables, but the order of the same is different. SAS throws the below error –

  • ERROR: Column 1 from the first CONTRIBUTOR of UNION is not the same TYPE as its counterpart from the second.
  • ERROR: Column 2 from the first contributor of UNION is not the same type as its counterpart from the second.


Discussion

No Comment Found