All Forums Database
Alex181 11 posts Joined 08/14
30 Oct 2014
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

ulrich 816 posts Joined 09/09
30 Oct 2014

where characters(variable1) = 3

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

Alex181 11 posts Joined 08/14
30 Oct 2014

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

tomnolan 594 posts Joined 01/08
30 Oct 2014

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

dnoeth 4628 posts Joined 11/04
30 Oct 2014

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

Dieter

vikas_yadav 19 posts Joined 09/12
31 Oct 2014

you can use CHARACTER_LENGTH in TD.

You must sign in to leave a comment.