Jump to content
Sign in to follow this  
rudym88

Import best practice

Recommended Posts

Good day gurus,

As usual seeking some valuable advice. I am currently importing a price list, the source is a tab delimited files, I am doing a one-to-one import and all works perfected.

Now the boss is requesting to be able to compare the last imported price with the previous import.

What I was thinking was to create an additional table (e.g. import one, import two,) and adding a import date field in order to identify when the import was done. Then create a script to empty the second table, move the records from table one to table two and then importing the new data in table one.

Can someone give me some ideas as I feel i am trying to reinvent the wheel 

Thanks

Rudy

Share this post


Link to post
Share on other sites

If they for sure want only the previous import, you could just get by with a single additional field for that, and do a Replace with the current price before you import.

Otherwise, I'd consider just importing the price into its own related table as new records each time. That way each item could keep a complete price history, and you could make a chart of it and your boss would be so impressed.

Share this post


Link to post
Share on other sites

Make sure as you import each record gets a time stamp, or at least a date stamp.  You could easily search/report price history broken down by date in a sub-summary report.

Share this post


Link to post
Share on other sites
7 hours ago, Fitch said:

If they for sure want only the previous import, you could just get by with a single additional field for that, and do a Replace with the current price before you import.

Otherwise, I'd consider just importing the price into its own related table as new records each time. That way each item could keep a complete price history, and you could make a chart of it and your boss would be so impressed.

The second idea let you keep many imports because after get the 2 last imports, your boss will ask you for the 3 last ;)

you set and id import unique for each import then a link between the same table with sort by date desc and id ≠ id second table (don't know if it's clear)

For example, first import 20 records with id = 1, second import 20 records with id = 2 etc

Tom

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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