TD_RowNormalizeFit Example | Teradata Vantage - TD_RowNormalizeFit Example - Teradata® Database

Database Analytic Functions

Product
Teradata® Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/wnd1589838592459.ditamap
dita:ditavalPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/ayr1485454803741.ditaval
dita:id
B035-1206
lifecycle
previous
Product Category
Teradata Vantage™

InputTable: input_table

Every complete example in this document is available in a zip file that you can download. The zip file includes a SQL script file that creates the input tables for the examples. If you are reading this document on https://docs.teradata.com/, you can download the zip file from the attachment in the left sidebar.

 id x y  
 -- - -- 
  1 0  1
  2 3  4
  3 5 12
  4 7 24

SQL Call

CREATE TABLE fit_output AS (
  SELECT * FROM TD_RowNormalizeFit (
    ON input_table AS InputTable
    USING
    TargetColumns ('[1:2]')
    Approach ('INDEX')
    BaseColumn ('y')
    BaseValue (100)
  ) AS dt
) WITH DATA;

Output

SELECT * FROM fit_output;
TD_KEY_ROWFIT TD_VALUE_ROWFIT x    y    
 ------------- --------------- ---- ---- 
 Approach      INDEX           null null
 BaseColumn     y              null null
 BaseValue      100            null null