Compare Columns

Logic compare over two columns (=,>,<,...)

Function:

Compare_Columns(table = string, first_col = string, second_col = string, comparison_type = string, new_col = string)

 

Parameters:

Table: Table name on which to perform function

First Column: 1st in the compare operation

Second Column: 2nd in the compare operation

Comparison Type: What to compare by (=,<,>,<>,!=,<=,>=)

New Column Name: Name of new column created

 

Examples:

Compare_Columns(table = Budget, first_col = "Jan", second_col = "Feb", comparison_type = "<", new_col = "Q1Compare")