Jump to content

Copy All Records in One Table to a Dummy Table


This topic is 3123 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi, I'm working on a Database that has a lot of calculation and sub-summary.  Everything works fine when I'm on the LAN, but when I tried to test it remotely, pulling up a summary report is really really slow because of the Calculation Fields, sorting and sub summary.  So, I was thinking and read about creating a Dummy Table to dump all the records from the actual table with the calculation into a Table to store the calculated value as stored text or numbers. However, I'm having difficulty creating a script that will be run every evening.   I've tried using an Export and Import, but the field value does not correspond with the original table fields.

Whats the best of of doing this? 

 

Thanks.

Link to comment
Share on other sites

Export the data from the origin table as .mer

Import the data and choose to let Filemaker make a new table from the import the first time.

This will duplicate the fields in the original table.

the new table with all of its data become the new dummy table.

Next time export as .mer from original.

Import matching records on the primary key of the origin table matching the primary key of the dummy table, create new record if not matched.

Probably choose to not perform auto enter calculations.

 

Link to comment
Share on other sites

Export the data from the origin table as .mer

Import the data and choose to let Filemaker make a new table from the import the first time.

Why would you go that route, instead of simply importing directly from the origin table?

 

P.S. This is not meant to say that copying all records to another table is a good idea. Or isn't. I don't think we have enough information here to express an opinion.

Edited by comment
Link to comment
Share on other sites

Why would you go that route, instead of simply importing directly from the origin table?

 

P.S. This is not meant to say that copying all records to another table is a good idea. Or isn't. I don't think we have enough information here to express an opinion.

Go that route because its the first thing that came to mind at 10PM or so. Import directly from the table is the better choice.

I agree that their is not enough info to make a recommendation.

 

Link to comment
Share on other sites

Why would you go that route, instead of simply importing directly from the origin table?

 

Probably because the OP is saying that this script should run every evening; if that is on a server-side schedule then you can't import directly and have to use the intermediate way.  So might as well set it up like that now and have the option to use PSoS or a server-side schedule without recoding.

Link to comment
Share on other sites

Thanks for the responses.  @ Kris, the data on the Real table will change almost everyday, (records are updated and new ones being created) as a result the Summary report will change as well.  So, my initial thought was to do a Data dump every night to the dummy table.  My Summary Report for remote users will be the data from Dummy table.  At the end of the day, i want to trash all the data in the Dummy Table, and import all the new calculated data from the Real Table to the dummy table again, so the next day remote users will have the new data for their summary report.  So, I don't need this

"Import matching records on the primary key of the origin table matching the primary key of the dummy table, create new record if not matched."

The concern I have, is the the data won't match the field names; I did not see a step script to change the import to Matching Name. Did I over look something?

 

Thanks.

 

Link to comment
Share on other sites

its an option in the import dialog. your first pass will be to import into a new target table. The only option the first time will be add new records and check don't import first record. This will duplicate the schema and data of the source table.

Rename the target table to whatever you want.

The second time through delete the records on the dummy table, import into the right target table, choose add new records, don't import first record and, in the arrange by drop down, choose matching names

Edited by Kris M
Link to comment
Share on other sites

Thanks Kris!... I was just playing with it with your directions and it's working. I was worried that the exported file will not export on the second run due to the duplicate file name, but on the Perform Without Dialog, the file just replaced the first one. It's importing correctly as well. 

 

Thank you for your help!

 

Link to comment
Share on other sites

This topic is 3123 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.