Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ssriramin19
Contributor III
Contributor III

restricting the values

Hello,

   My question is that I have a field called corp_grp_code which has the values as 0000000002  and 0000000001.But my requirement is that instead of full digists only single digit 1 and 2 should need to be displayed.

Can anyone help me on this .

Thanks

Sriram


1 Solution

Accepted Solutions
Not applicable

Which range of values would have that field? Based on your informations I sugest you two solutions:

LOAD NUM(corp_grp_code) AS corp_grp_code_new

RESIDENT Table;

This one is for 1 digit value range field:

LOAD right(corp_grp_code,1) as corp_grp_code_new

RESIDENT Table;



Could you be more specific on the exact problem?



View solution in original post

6 Replies
tresesco
MVP
MVP

Use Num() function

vivek_niti
Partner - Creator
Partner - Creator

Hi,

Use the Num() function on corp_grp_code. That will remove the leading zeros.

Thanxs,

Vivek

Not applicable

Which range of values would have that field? Based on your informations I sugest you two solutions:

LOAD NUM(corp_grp_code) AS corp_grp_code_new

RESIDENT Table;

This one is for 1 digit value range field:

LOAD right(corp_grp_code,1) as corp_grp_code_new

RESIDENT Table;



Could you be more specific on the exact problem?



CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

If the value is in text format then u could use below

=Num(Num#(FieldName, '#'))

if not simply use Num()

Not applicable

Use the Num() Function. It will help you achieve your target.

Not applicable

Hi,

Num() is just a format function.

If you want to store your data without zeros, use LTrim(corp_grp_code)*1 in your load script.