Hello:
I wish to compare two tables' structures. I have a transaction table, and I wish to check that an import table matches up well enough.
Well enough? All columns in the transaction table must be in the import table and of the same type and size. If there are additional column in the import table or if the columns are in a different order, it does not matter.
It would be nice to able to copy each structure into an array and then compare them using scan().
Instead, I think that I have to copy structured extended to a temporary table -- I would prefer a cursor -- and then copy from that to an array for each of the two tables and only then compare. That seems rather Rube-Goldbergian.
I could be missing something. I hope I am.
What is a good way of doing this?
Sincerely,
Gene Wirchenko
Would afields() do what you want?
On 6 April 2018 18:19:47 GMT-04:00, Gene Wirchenko genew@telus.net wrote:
Hello:
I wish to compare two tables' structures. I have a transactiontable, and I wish to check that an import table matches up well enough.
Well enough? All columns in the transaction table must be inthe import table and of the same type and size. If there are additional column in the import table or if the columns are in a different order, it does not matter.
It would be nice to able to copy each structure into an arrayand then compare them using scan().
Instead, I think that I have to copy structured extended to atemporary table -- I would prefer a cursor -- and then copy from that to an array for each of the two tables and only then compare. That seems rather Rube-Goldbergian.
I could be missing something. I hope I am. What is a good way of doing this?Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
You could try the evaluation copy of CMCOMPARE https://www.cmstory.com/
Andrew Stirling
On 06/04/2018 23:19, Gene Wirchenko wrote:
Hello:
I wish to compare two tables' structures. I have a transaction table, and I wish to check that an import table matches up well enough.
Well enough? All columns in the transaction table must be in the import table and of the same type and size. If there are additional column in the import table or if the columns are in a different order, it does not matter.
It would be nice to able to copy each structure into an array and then compare them using scan().
Instead, I think that I have to copy structured extended to a temporary table -- I would prefer a cursor -- and then copy from that to an array for each of the two tables and only then compare. That seems rather Rube-Goldbergian.
I could be missing something. I hope I am.
What is a good way of doing this?
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]