General information
Category:
Coding, syntax & commands
>This is what I have been doing:
>
>SELECT regtemp1.username,regtemp1.companynam, regtemp1.companyid, regtemp1.settdate,;
> regtemp1.effdate, regtemp1.amount, regtemp1.batchnum, regtemp1.originid,;
> regtemp1.trancode, regtemp1.entrydescr,;
> regtemp1.reasoncode, regtemp1.orgtracnum, regtemp1.rettracnum, regtemp1.addeninfo,;
> regtemp1.bankname, regtemp1.portfolio, regtemp1.DESCRIP,;
> regtemp1.dbaname, merchantinfo.dbaname AS newdbaname,;
> regtemp1.mid, merchantinfo.mid AS newmid,;
> regtemp1.acctnumber, merchantinfo.acctnumber AS newacctnum,;
> regtemp1.tranrout, merchantinfo.tranrout AS newtranrt;
> FROM regtemp1 LEFT OUTER JOIN returnitems!merchantinfo ;
> ON ALLTRIM(regtemp1.mid) == ALLTRIM(merchantinfo.mid);
> HAVING LEFT(reasoncode,1)=="R" AND !BETWEEN(amount,nAmount1,nAmount2) AND entrydescr!="PRENOTE";
> ORDER BY regtemp1.reasoncode, regtemp1.settdate, regtemp1.effdate, regtemp1.amount,;
> regtemp1.mid;
> INTO TABLE regtemp2
>
>
>This is great if the MID matches but does me no good if say one digit is missing on the right of the MID string. I thought aout doing a thing where it adds 0-9 on the end of the exisiting MID and checking in between each add. This of course runs into the problem of 1111113 being the correct number and me adding a "2" thinking it's the right number. If I did something like this I would then have to have another way of checking the origianal data with what I find in the data warehouse records.
It would be helpful to see the length of your MID fields and a few examples of MIDs that are not matching but you wish would match.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only