I’m half expecting you to tell me I’m trying to use the join statement for something it can’t do, but just in case that’s not the case, I’ll pose the question:
I’m using the join statement to transfer information between databases. I am wanting to transfer a subset based on 2 criteria, but the programme seems to ignore the second criteria. This is my formula:
join
"DATABASE","Cattle Database",
"APPEND","YES",
"NOMATCH","",
"«Unique»","Unique",
"REPLACEEXISTING","YES",
"MATCHINGFIELDS","NO",
"KEY","Unique",
"«PregEmpty»","TempText3",
"«PregTestDate»",date(dDate),
"source subset",{Check="Y" and "TempText3"<>""}
zlog "preg"
join
"DATABASE","Cattle Database",
"APPEND","YES",
"NOMATCH","",
"«Unique»","Unique",
"REPLACEEXISTING","YES",
"MATCHINGFIELDS","NO",
"KEY","Unique",
"«Mouth»","TempText4",
"«DateMouthed»",date(dDate),
"source subset",{Check="Y" and "TempText4"<>""}
zlog "mouth"
join
"DATABASE","Cattle Database",
"APPEND","YES",
"NOMATCH","",
"«Unique»","Unique",
"REPLACEEXISTING","YES",
"MATCHINGFIELDS","NO",
"KEY","Unique",
"«Sell»","TempText5",
"source subset",{Check="Y" and "TempText5"="TRUE"}
zlog "sell"
I have tried listing each criteria as its own “source subset”, but then it selects ‘either/or’ rather than ‘both’.
The reason I am trying to do it this way, is that if I simply join all the data I am importing, I overwrite previously populated fields with empty fields… eg if an animal was pregnancy tested 3 months ago, but not this time, that information will be overwritten