Table of Contents

Search

  1. Preface
  2. Introduction to Data Validation Option
  3. Repositories
  4. XML Data Source
  5. Tests for XML Data Sources
  6. Connections
  7. Expressions
  8. Table Pairs
  9. Tests for Table Pairs
  10. Single-Table Constraints
  11. Tests for Single-Table Constraints
  12. Examples of Tests from Spreadsheets
  13. SQL Views
  14. Lookup Views
  15. Join Views
  16. Aggregate Views
  17. Business Intelligence and Reporting Tools Reports
  18. Dashboards
  19. DVOCmd Command Line Program
  20. Troubleshooting
  21. Datatype Reference
  22. Reporting Views
  23. Metadata Import Syntax
  24. Jasper Reports
  25. Glossary

Data Validation Option User Guide

Data Validation Option User Guide

Column Comparison by Position

Column Comparison by Position

You can generate table-pair tests that compare columns by position. Compare columns by position when the order of the columns in the two tables are the same.
If one table contains extra columns, you can skip the first columns of one table when you compare columns by position. For example, the first column in Table A matches the second column in Table B, and the second column in Table A matches the third column in Table B. To match the columns by position, you can skip the first column in Table B.
The following examples describe scenarios when you compare columns by position:
Table pair with tables that have the same number of columns and different names
For example, you have SampleA as Table A and SampleB as Table B in a table pair.
The following table lists the columns in SampleA and SampleB:
SampleA
SampleB
column1
col1
column2
col2
column3
col3
To compare column1, column2, and column3 in SampleA with col1, col2, and col3 in SampleB, respectively, compare the columns by position. Do not skip any columns in Table A or Table B.
Table pair with tables that have a different number of columns
For example, you have SampleA as Table A and SampleB as Table B in a table pair.
The following table lists the columns in SampleA and SampleB:
SampleA
SampleB
column1
col1
column2
col2
column3
col3
-
column1
-
column2
-
column3
To compare column1, column2, and column3 in SampleA with column1, column2, and column3 in SampleB, respectively, compare the columns by position. Skip three columns in Table B.
Table Pair with an SQL View and a Table
For example, you have an SQL view named sample_view that is based on Table1 and Table2. You also have a table named Table3. In the table pair, you define sample_view as Table A and Table3 as Table B.
The following table lists the columns in sample_view and Table3:
sample_view Columns
Table3 Columns
Table1.columnA
column1
Table1.columnB
column2
Table2.columnC
-
Table2.columnD
-
To compare Table2.columnC and Table2.columnD with column1 and column2 of Table3, respectively, compare the columns by position. Skip the first two columns in sample_view.

0 COMMENTS

We’d like to hear from you!