473,508 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mismatched data

Hi Folks,

I am trying to make a database for the classic scenario of customers,
products, orders. Its been a wile since i played around with
databases.

I have four tables:

Customers(customer_id, address,first_name......
Products(product_id,distributor_code,manufacturer_ code......
Orders(order_id,date_customer_id)
Orders_Product(order_id, product_id,qty.....

I have two problems though, I get my list of products from about 6
distributors in csv/excel files. Each of these excel files are
slightly different, some have short_desc, long_desc, some just have
long_desc.

Whats the best way to go about importing this data? I tried with the
wizard, but it doesnt let you specify which column should map to which
field in the table.

The other problem, is when you go to update the prices, next week say,
how do you then import the file, and update the right items, adding
new ones where required etc, rather than just creating a set of
duplicates?

Finally would a invoice(report) for a given order just be the
foramtted result of a query?

Thanks,

-Al

May 1 '07 #1
1 1694
ARC
I have the same setup. I used an excel spreadsheet file as an importing
template, then also had the column headings in the spreadsheet correspond to
fields in a temporary importing table. I then do the docmd.transfer
spreadsheet command, and reference the spreadsheet to import, and the
teporary holding table to store the values in. This works quite well. Then
you need some vba code that will cycle through all records in the temporary
import table. Search your permanent products table in this code, and if the
product number is found (or other unique field to the orders table), then
you update the price and description only. Otherwise, if the unique
identifier is not found in your orders table, you do an add.

If you don't want to reinvent the wheel, I have just such an application
that I sell on my website, that is for quote/invoices/products. If
interested, let me know and I'll leave a link so you can see screenshots,
etc.

Good luck!

Andy
<Bi******@gmail.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.com...
Hi Folks,

I am trying to make a database for the classic scenario of customers,
products, orders. Its been a wile since i played around with
databases.

I have four tables:

Customers(customer_id, address,first_name......
Products(product_id,distributor_code,manufacturer_ code......
Orders(order_id,date_customer_id)
Orders_Product(order_id, product_id,qty.....

I have two problems though, I get my list of products from about 6
distributors in csv/excel files. Each of these excel files are
slightly different, some have short_desc, long_desc, some just have
long_desc.

Whats the best way to go about importing this data? I tried with the
wizard, but it doesnt let you specify which column should map to which
field in the table.

The other problem, is when you go to update the prices, next week say,
how do you then import the file, and update the right items, adding
new ones where required etc, rather than just creating a set of
duplicates?

Finally would a invoice(report) for a given order just be the
foramtted result of a query?

Thanks,

-Al

May 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2403
by: Brett E. | last post by:
I am attempting to link a stand alone server C++. We recently moved to the 64 bit HP OS environment. Our other C++ Tuxedo services have effectively linked and successfully tested out fine under...
0
5619
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
3
2043
by: bbernieb | last post by:
Hi, All, Is it possible to access a variable inside of a data binding, without the variable being out of scope? (Note: On the DataBinder line, I get an error message that says "Name 'i' is...
5
2213
by: Gene | last post by:
What can I do if I want to get the result using the sql command? for example, the select command is "select Name from Employee where StaffID=10" How to get the "Name"??? dim Name as string and...
5
1782
by: DC Gringo | last post by:
I am having a problem reading a simple update to the database. Basically I'm testing a small change to the pubs database -- changing the price of the Busy Executive's Database Guide from 19.99 to...
1
3047
by: virag | last post by:
Hi all, I am getting a Mismatched ABI error while trying to build my C++ application on "hp-11.11" OS. Any idea, what could be possibly causing it.
3
5677
by: brevello | last post by:
Hi, I'm trying to parse an XML file with Python SAX: xml.sax If i parse the file with an empty Handler it works perfectly, no error of mismathed tag. But if i try to print the characters of the...
3
1985
by: Martin Kulov [MVP] | last post by:
Hi, I am wondering if this problem is still valid for ASP.NET 2.0. "To maintain session state across different Web servers in the Web farm, the application path of the Web site (for example,...
7
1501
by: DanCole42 | last post by:
I've figured out a convoluted solution to this problem, but I'm hoping for something a bit more elegant. I have a table of orders as they're received from customers (the BillCust and Orders...
0
7118
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.