473,396 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Updating Tables in Stock Database

Hi everyone

I have a database which I use to keep track of stock for the company that I
work for. We are a retail chain with 8 locations at present and a head
office. I need to keep track of quantities of each product for each
location. All locations have the same products. The tables are set up as
follows:

Products(StockCode*,Description,MajDeptID,CostPric e,SellingPrice)

Departments(MajDeptID*,MajDept)

Suppliers(SupplierID*,SupplierName)

ProductsBySupplier(ProductsBySupplierID*,StockCode ,SupplierID,SuppStCode)

Locations(LocationID*,LocationName)

StockOnHand(StockOnHandID*,StockCode,LocationID,Qu antity)
*Note: ProductBySupplierID and StockOnHandID and AutoNumber fields.
ProductsBySupplier lists the StockCode, the supplier's ID and the stock
code used by the supplier (SuppStCode) which differs from StockCode.

StockCode is the barcode of the product, Departments refer to groups in
which items are categorised (for example Department 87 would be the group of
all items which are consumable)

The StockOnHand table is the table that I want to use to keep track of
quantities. Because we're a retail chain, products are being sold,
transferred between locations, received from suppliers etc. We also get new
products in on a regular basis and discontinue items from time to time. We
have a backoffice application which deals with all of the above and
downloads new quantities for the store everyday. I'm able to export to CSV
files and update my Access 2002 database from the CSV files but the problem
I have is in the StockOnHand table.

I'd like to list each product for each location and have a quantity for each
product at each location which will change everyday. The Products table
currently has in excess of 3000 items. How would I go about doing this? If
I take the items as they are now, I can use something like

INSERT INTO StockOnHand ( LocationID, StockCode )
SELECT LocationID, Products.StockCode
FROM Products;

and I'd be prompted for LocationID each time I run it.

What happens if I add a new product though? Would I have to manually go into
the StockOnHand table and type out the product 8 times? Also what if I
wanted to add all the items to all the locations in one go? (for example if
I had ten items in my product list and ten location, I'd want to add 100
records to the StockOnHand table).

Please help, I'm very frustrated, and will be extremely grateful :(

Thank you,
Michael

Nov 13 '05 #1
1 2030
before you go nuts, make sure you database is designed correctly,
otherwise none of this will work right. You can download Allen's
example...
http://members.iinet.net.au/~allenbr...Inventory.html
Nov 13 '05 #2

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

Similar topics

9
by: simon.harris | last post by:
I have a 'master' stock list with current stock levels (integer) and another table that contains transactions (i.e. item#, #items added/ removed, date, user etc). What I need is an update query...
3
by: Grant | last post by:
I need some sample code showing how to manipulate data in my access database using C#. This is what Im trying to do: Dropdownlist with datagrid both bound to datasource. When the drop down list...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
3
by: ollyno1uk | last post by:
Hi there I have a table in MySQL database on my web server that contains stock levels amongst other things. twice a day I get emailed an updated stock list in CSV format. What I need is to...
5
by: aaron.m.johnson | last post by:
I have an application which contains an Access database with linked tables that point to another database within the application. The problem I have is that when the user installs the application,...
7
by: Emin | last post by:
Dear experts, If I have a number of related groups of data (e.g., stock prices for different stocks) is it better to put them into many tables (e.g., one table per stock) or into one big table...
1
by: pashi | last post by:
Hi, I am having two tables Stock and OrderIssue as follow Stock ItemID, ItemName , Qty , ...
0
by: mpande | last post by:
Hello Everyone I'm searching a database to find a value in the database and once the value is found, it should update the row corresponding with the productid, which is the PK in which I'm using...
3
rizwan6feb
by: rizwan6feb | last post by:
I am developing a database application in Visual Studion 2008 (VB.Net) . I want to create a stock report which receives data from 2 different tables i.e Products and Stock. I have designed the report...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.