You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Modifies the table structure by adding a new column. Syntax:ALTER TABLE table_name ADD COLUMN new_column_name = { sql_expression} Example:
ALTER TABLE customer ADD COLUMN customerType = {CASE WHEN "Source Type"=1 THEN 'Retail' ELSE 'Wholesale' END}
ALTER TABLE tStageCustLedgerEntry ADD COLUMN wAgingBucket = {IIF([Open]=0 AND [wRemainingAmountLCY]<>0, CASE WHEN [wAgingDaysOverdue] <= 0  THEN 0 WHEN [wAgingDaysOverdue] > 0  AND [wAgingDaysOverdue] <= 30 THEN 30 WHEN [wAgingDaysOverdue] > 30 AND [wAgingDaysOverdue] <= 60 THEN 60 WHEN [wAgingDaysOverdue] > 61 AND [wAgingDaysOverdue] <= 90 THEN 90 WHEN [wAgingDaysOverdue] > 90 THEN 120 ELSE 0 END, 0)}

  • No labels