Extracting values - teradata function

Database

Extracting values - teradata function

There is a column containing the values 1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.1,2.2,2.3,2.4,2.5,2.6....
    Now we want to have 1 for values 1.1-1.4, 2 for values 1.5-1.9....likewise....how this can be done?
2 REPLIES
Junior Contributor

Re: Extracting values - teradata function

Rounding?

CAST(col AS DEC(10,0))

If 2.5 will be 2 or 3 depends on the RoundHalfwayMagUp setting in dbscontrol.

Dieter

Re: Extracting values - teradata function

Thanks Dnoeth
I will try this......