mysql databases, purge and importing a csv via cron

September 23, 2016 at 06:03:41
Specs: Windows 7
hi,

i am a complete noob when it comes to mysql databases.

what i want to achieve - is this - i have a sap b1 database and i am going to be exporting data from the sql server out to a csv - from there i will send this csv through to my web server.

now what i want to do is to load up the csv into a mysql database on a scheduled basis.

here is the data that i will likely have in multiple csvs:

orders
invoices
credits
payments

would i create a database for each within phpmyadmin?

also - let's take orders for example - would i create two tables - one for the order header information and another for order lines?

an example of the invoices csv would be the following format:
customernumber,
customername,
invoicenumber,
purchaseordernumber,
documentdate,
freightamount,
productcode,
productname,
barcode,
quantity,
price ex tax,
price inc tax,
RRP price,
tax amount,
doc total inc tax

Any advice would be appreciated.

Regards
Rick


See More: mysql databases, purge and importing a csv via cron

Reply ↓  Report •


#1
September 23, 2016 at 06:08:41
Further to the above - when the orders CSV imports, I need to be able to run a separate script to identify all open order lines (then will be indicated by a column with LineStatus = O).

The order number, product code, product name, open qty based on the line status being =O, will dictate that these will be copied through to a different database or table.

This database/table will need to be purged every time before re-import of product.

Regards
Rick


Reply ↓  Report •
Related Solutions


Ask Question