7 Replies Latest reply: Sep 13, 2017 1:32 PM by Anand Chouhan

# Set limit for mobile number

Hi,

I have mobile number field in my table from which I want to store only valid mobile number in. Csv file. Mobile number should be 10 number only. If greater or less than 10 then it will not store in.  Csv

What logic should I apply???

• ###### Re: Set limit for mobile number

What are the values that comes in your mobilenumber field. May be try like:

IF(Len(Trim(MobileNumber)) = 10, MobileNumber, 0) AS ValidMobileNum

• ###### Re: Set limit for mobile number

May be this?

Fact:

Load * From Table;

If Len(Mnum) = 10 THEN

STORE Fact into ....;

EndIf

MsgBox ("Not storing");

Next;

• ###### Re: Set limit for mobile number

IF(LEN(TRIM(MyMobile)) = 10 AND ISNUM(LEN(TRIM(MyMobile)), LEN(TRIM(MyMobile))) AS ValidMobile

• ###### Re: Set limit for mobile number

My application also contain policy no. field.users requirement is that on daily refreshing data same policy no. and mobile no. does not repeat or exist  for next seven(7) days.

so what should logic I apply for this scenario ???

• ###### Re: Set limit for mobile number

Can you explain a little more with an example data and you expected value should be?

• ###### Re: Set limit for mobile number

In my application there is many fields out of which i wnat only two fields i.e. policy no. and mobile no.,want to store only these two fields into csv.

1> In which mobile no should be only 10 digit if more or less than 10 then it should not store into csv

2> Also same policy no. and Mobile no. should not repeat for next seven(7) days.

after doing these two conditions it should be daily refreshed and get  store into sql.

can you tell me step by step process for it ???

• ###### Re: Set limit for mobile number

Try some this and let me know if there is any date field also also can you share some data to have a look i have some idea then share with you. Then let me know if it is worked for you.

I am taking resident load of your main table and extract only policy no, mobile no but it is not for seven days. Initially it is full loading and after that you have to check it by incremental load.

FirstTab:

Policy_No&'-'&MobileNO as Key

Policy_No,

MobileNO

From FactTable

Where Len(MobileNO) = Right(MobileNO,10);

Store FirstTab into FirstTab.qvd(qvd);

Final: