length of a string

Database
Enthusiast

length of a string

Hi,

I need to select variable1 with only a length of 3 from the data below

variable1

11023a

112

1r345

17f

132

I only need the following records in the output: 

112

17f

132

Thnaks for your help in advance

5 REPLIES
Supporter

Re: length of a string

where characters(variable1) = 3

Enthusiast

Re: length of a string

Thank you for the prompt response. I am currently using sql server and it is not recognizing this function.

Teradata Employee

Re: length of a string

Why did you ask for help with SQL Server in a Teradata forum?

Junior Contributor

Re: length of a string

Btw, in TD14 there's also SQL Server's LENGHT function.

Enthusiast

Re: length of a string

you can use CHARACTER_LENGTH in TD.