Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have PhoneNoMobile and PhoneNoWork columns in sql table with values 447341891543,447897674285 as combined in PhoneNoMobile and column PhoneNoWork contains some NULL values and values with Data .
I have to split the above value as PhoneNoMobile=7341891543 and PhoneNoWork=447897674285
Is it possible to get this and I have to split this values only when PhoneNoWork contains NULL values i,e if PhoneNoWork=NULL then it should replace with 44789674285. Please help
Thanks.
Try this:
If(isnull(PhoneNoWork),Subfield(PhoneNoMobile,',',2),PhoneNoWork)
- Marcus
You create an expression:
If(IsNull(PhoneNoMobile),If(IsNull(PhoneNoWork),'No phone number',PhoneNoWork),PhoneNoMobile)
Thanks and it's showing same values as PhoneNoMobile in PhoneNoWork but I have to get the second Phone No in PhoneNoWork if PhoneNoWork contains NULL Values only.
Hi,
try this on your load statement
Alt(PhoneNoWork, PhoneNoMobil) as PhoneNoWork
Regards,
Aurélien
For such a splitting you could use subfield like subfield(FIELD, ',', 1) as FIELD1.
- Marcus
Thanks and still it's showing as earlier any help please.
Can you include a value like an example? Function with IsNull or Alt must works...
Thanks and if PhoneNoWork contains NULL values will below expression work?
If(PhoneNoWork='NULL',Subfield(PhoneNoMobile,',',2),PhoneNoWork)
Yes,
but I think
Alt(PhoneNoWork, Subfield(PhoneNoMobile,',',2))
is better
Try this:
If(isnull(PhoneNoWork),Subfield(PhoneNoMobile,',',2),PhoneNoWork)
- Marcus