7 Replies Latest reply: Oct 18, 2013 1:14 AM by Anju Gopinath

# split and compare fields

Hi,

In a table,I have two fields `A` and `B`. I have to retrieve those rows where `A<>B`. The problem is`A` could be `'12|14|15'` and `B` could be `'12|15|14'`. So, they are actually same , only that the order of numbers is different. How do I retrieve rows where the fields are really not equal ,like`'30|31|14'` and `'31|30|15'`, or `'22|23'` and `'22' ?`

Thanks,

Anju

• ###### Re: split and compare fields

Hi

May be its give solution for you, but not sure..

Split the column by using SubField() function.

Then by use order by concatenate it by using concat() function, after that check it.

• ###### Re: split and compare fields

can you provide some sample scripts please?

• ###### Re: Re: split and compare fields

HI

May be try like this

• ###### Re: split and compare fields

Thank You!

This would solve my problem.

• ###### Re: split and compare fields

Hi Mayil,

After I have been able to find unequal strings.. and I have , say 2 fields A and B,

where A is say '12|13|15' and B is '15|12|14' can I have have 2 more fields like 'In A not in B '='13' and 'In B not in A'='14'.

Thanks,

Anju