Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Communities,
Is there anyway to compare two string fields?
Here is the if statement I have wrote in scripts. I'm going to create a new field which compare two string fields, but the outcome isn't correct. Is there anyone could help it up?
if(Trim([Company Country])=Trim([Deliver-To Party Country]),'TRUE','FALSE') as [Country Check],
Hi,
can you attach some data ?
Try wildmatch
if(Wildmatch(Trim([Company Country]),Trim([Deliver-To Party Country])),'TRUE','FALSE') as [Country Check]
Your syntax is correct, so you will need to be more specific about why this does not work and what you require. Are you looking for a case sensitive, case insensitive or fuzzy comparison?
Syntax is correct, can you share sample data?
Experts,
I found that I might made a logical mistake in the script.
Originally I would like to create a new field which will compare two fields from different two tables.
Therefore, I create a temporary link table for inner joining the two tables.
That would be grateful to receive your suggestions of comparing two fields from two different two tables.
Please close this thread
If you want to create flag field before joining them. or there is no common key between them then try with lookup()
like.
Id:
LOAD * INLINE [
ID1
1
2
3
4
5
];
data:
LOAD ID2,Name,If(Lookup('ID1','ID1',ID2,'Id')>0,'True','False') as flag INLINE [
ID2, Name
1, a
2, b
3, c
4, d
6, e
7, f
];
Regards,