Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i need to fill the rows with null data in Client ID column when Acc.Code=506099111111,
using the Client ID corresponding at the VoucherNo=1 for each Voucher category,
the data are loaded from a Database table ...... please help
Please download the file in attched for the full list , thank you
* Voucher Category Code | * Voucher No. | Voucher Created On | Summary | Acct Code | Client ID |
563827 | 1 | 20170110 | FFA - INVOICE - SUPPLIER | 50601001 | 100130 |
563827 | 5 | 20170110 | FGI - TRANSFER - SUPPLIER, GAIN | 506099111111 | - |
563828 | 1 | 20170110 | FFA - INVOICE - SUPPLIER | 50601001 | 101115 |
563828 | 3 | 20170110 | FGI - TRANSFER - | 506099111111 | - |
Try this:
Directory;
Raw:
LOAD
"* Voucher Category Code",
"* Voucher No.",
"* Voucher Created On",
"* Summary",
"* Acct Code",
"Client ID"
FROM [lib://AttachedFiles/clientonBlankCeils.xls]
(biff, embedded labels, table is Sheet1$);
Table:
load *,RowNo()as TotalRow, if(RowNo()=1,[Client ID],if(len([Client ID])= 1 or isnull([Client ID]),peek([Client ID2]),[Client ID])) as [Client ID2]
resident Raw
order by [* Voucher Category Code],
[* Voucher No.];
drop table Raw;
Did Arthur's post help you get things working? If so, please be sure to return to the thread and use the Accept as Solution on his post to give him credit for the assistance and let the other Community Members know it did solve your problem. If you are still working on things, leave an update on what you need.
Regards,
Brett