Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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???
What are the values that comes in your mobilenumber field. May be try like:
IF(Len(Trim(MobileNumber)) = 10, MobileNumber, 0) AS ValidMobileNum
May be this?
Fact:
Load * From Table;
If Len(Mnum) = 10 THEN
STORE Fact into ....;
EndIf
MsgBox ("Not storing");
Next;
IF(LEN(TRIM(MyMobile)) = 10 AND ISNUM(LEN(TRIM(MyMobile)), LEN(TRIM(MyMobile))) AS ValidMobile
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 ???
Can you explain a little more with an example data and you expected value should be?
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 ???
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:
Load
Policy_No&'-'&MobileNO as Key
Policy_No,
MobileNO
From FactTable
Where Len(MobileNO) = Right(MobileNO,10);
Store FirstTab into FirstTab.qvd(qvd);
Final:
Load
Policy_No&'-'&MobileNO,
Policy_No,
MobileNO
From FirstTab.qvd Where Not Exists(Key,Policy_No&'-'&MobileNO);
Store Final into Final.qvd;