This comes from the RES_REQ field in the raw table. If this is null, then we will filter out this record.
Once we get the resource name, we then look it up in the wi_resourcecode table to see if we have already has a record of it in there. If we do, then we'll get the code back, otherwise, we will insert it into the wi_usercode table and generate the code. The code itself is a positive integer and each new code is equal to the maximum of the sequence number +1.