rsh.Table.PadColumn ColumnName, PadList [, TableName]


PadColumn will add records to the table if a record does not contain the value for the padded column.

Padding a table can be very useful if the output of a query produces missing data because the joins do not match..


ColumnName  (string)

Must match one of the column names in the table.

PadList  (String)

The PadList can be of two formats:

  • If the PadList contains a "SELECT" statement then the function will create a recordset from it.  That recordset must contain a column that matches the provided ColumnName.
  • The PadList can also contain a comma delimited list of values that will pad the provided ColumnName column.

TableName  (Optional String)

To specify a table other than the default configured one



Example:

Say you have a recordset (rs1) that created the following data set:

       

rs1 = "SELECT Month, Value FROM SomeDataSet"

         rsh.Create rs1

         


If you create another recordset (rs2) that contains the names of all the months you can then pad it to the first recordset.

rs2 = "SELECT Month FROM ListOfMonths"

         rsh.PadColumn "Month", rs2