Good day everyone,
I have a table called customers with a column called AccountNumber and a column called CustomerNumber. I have a list of over 500 AccountNumber / Customer combinations from a different database that I want to look up in this customer table.
Each account number has a corresponding customer number so the first element in account number array corresponds to the first element in the customer number array, etc... I want to load the two arrays with the information given and then use a loop to select the right combination. For this example i only included two records...
Is this even possible in crystal? When i run this code now, it returns every record in the customer table.
whilereadingrecords;
stringvar array AccountNumberArray := ["041209", "041430"];
numbervar array CustomerNumberArray := [7741, 4143005];
numbervar indexValue;
numbervar upperBoundValue := ubound(AccountNumberArray);
for indexvalue := 1 to upperBoundValue do
(
{customers.accountNumber} = AccountNumberArray[indexValue]
and
{customers.customerNumber} = CustomerNumberArray[indexValue];
)
Edited by louvaldez - 19 Feb 2019 at 8:48am