TD_RowNormalizeFit Example | RowNormalizeFit - Example: How to Use TD_RowNormalizeFit - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢

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.

InputTable: rowNormalizeFit_input

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

TD_RowNormalizeFit SQL Call

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

TD_RowNormalizeFit Output

TD_KEY_ROWFIT TD_VALUE_ROWFIT x    y    
 ------------- --------------- ---- ---- 
 Approach      INDEX           null null
 BaseColumn     y              null null
 BaseValue      100            null null