mehtat_90
mehtat_90

Reputation: 628

How to pad integers with leading zeroes in Netezza SQL

Is it possible for me to change the data input format in Netezza. For example, whenever I import the numbers like 007 or 041 or 063 the output is given as 7 ,41,63 respectively which screws up the business requirement.

Sorry for asking such a silly question as I am new in Netezza.

Upvotes: 3

Views: 5825

Answers (1)

mehtat_90
mehtat_90

Reputation: 628

I found the answer:

select lpad(s.Col_name,3,0) as result from table name

Upvotes: 6

Related Questions