customer_number is Numeric, 5 digits, no decimals
the current value may be about 16000
when i try to increment the number with the below script i get the error message
"tbl.customer_number=tbl.customer_number + 16000 is different subelement"
to produce a file with about 60,000 customers to demo/test for a customer i was using the following script to double the files - IT WAS WORKING UNTIL THE FIELD VALUE GOT UP TO ABOUT 16000!!!
anyway - following is the script
tbl=table.open("bell customers")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.first_name=rtrim(tbl.first_name) + "-5"
tbl.last_name=rtrim(tbl.last_name) + "-5"
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
tbl=table.open("hearing aids")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.serial_number=rtrim(tbl.serial_number) + "-5"
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
tbl=table.open("phone numbers")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
tbl=table.open("alternate addresses")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
tbl=table.open("payment history")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
end
the current value may be about 16000
when i try to increment the number with the below script i get the error message
"tbl.customer_number=tbl.customer_number + 16000 is different subelement"
to produce a file with about 60,000 customers to demo/test for a customer i was using the following script to double the files - IT WAS WORKING UNTIL THE FIELD VALUE GOT UP TO ABOUT 16000!!!
anyway - following is the script
tbl=table.open("bell customers")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.first_name=rtrim(tbl.first_name) + "-5"
tbl.last_name=rtrim(tbl.last_name) + "-5"
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
tbl=table.open("hearing aids")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.serial_number=rtrim(tbl.serial_number) + "-5"
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
tbl=table.open("phone numbers")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
tbl=table.open("alternate addresses")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
tbl=table.open("payment history")
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
tbl.customer_number=tbl.customer_number + 16293
tbl.change_end()
tbl.fetch_next()
end while
tbl.close()
end
Comment