21. marts 2005 - 16:42Der er
13 kommentarer og 1 løsning
forespørgsel
Håber nogen kan hjælpe med nedenstående...
Jeg har en database som skal bruges til at lokalisere reservedele på et lager. Jeg har lavet 2 tabeller til den del jeg har problemer med... én hvor alle produkter med navn og varenr som skal kunne lagerføres er indtastet....den har følgende kolonner: vareNr ProduktNavn AntalColli i produkt
Den anden tabel indeholder så det aktuelle lager af disse varer og har følgende kolonner: Id VareNr Colli# Lagerplads
hver vare kan bestå af F.eks 3 colli og vil så have et 3tal i antalColli kolonne i tabel 1 Hvordan laver man en forespørgsel/rapport som fortæller hvilke colli der mangler af hvert produkt.... kan få den til at vise dem der er på lager men dem der er 0 af viser den ikke.
I lang tid har samarbejdsbranchen fokuseret på at forbedre enhedsfunktioner – bedre kameraer, klarere lyd og smartere software. Men den virkelige forvandling handler ikke om funktioner.
I did it with 2 tables because one table is the actual "lager" and the other one is a list of the product availible for Lager also has the name This way i can add items to table 2 without putting in the name everytime...right The same product can be in table 2 more than once and because i need to be able to add notes to each entry in this table i need seperate entries for each product So if i need to put 2 of the vareNr in table 2 the it will look up the name in table 1 and i will be able to add different notes to each item even though they are the same product.....confused I can send you and example if you want.... tommorow dont have access to it today. This is working fine... Can this be done with one table?
yes but the problem comes when a product has say 3 colli and there is only one of #1 and 2 in stock.... vareNr=00019924 ProduktNavn= pc10354 AntalColli=3
there would be 2 entries in table 2 Id=1 VareNr=00019924 Colli#=1 Lagerplads=p1
Id=2 VareNr=00019924 Colli#=2 Lagerplads=p1
It says in table 1 that the product consists of 3 colli so there is none of colli#3 but since it is not in the other table it is not "unmatched"...right.
I want it to tell me that im missing the third colli....is this possible? How can i get it to tell me that in a query
And when i add a new item to table 2 how du i get the colli column to show a list of colli based on the number in AntalColli in table 1 say its 3 then the list should be 1,2 and 3
Lets say that you drop the AntalColli field. When you add the records to table2 you can always find out how many colli you have by counting the records in table 2 which have the same vareNr.
I'm off for the evening, I will look again tomorrow, if you can send me you dB I will make an SQL which can show you those where count (table 2) <> AntalColli
I think you may misunderstand me..... the products consists of say 3 colli and these are 3 different boxes... some products consist of 2.... so somewhere i have to tell the database how many colli this product consists of... the example above the product consists of 3 colli then that means that this product is in 3 different boxes ...each box is not the same.....2 boxes of the same product(vareNr) and the same colli are the same....
nej jeg er på arbejde men jeg kigger på den i aften når jeg kommer hjem....og vil vende tilbage her iaften eller imorgen men indtil videre kanon....tak for hjælpen
no from home...because my mail server doesnt allow databases. Anyway i send you a mail with some feedback on the stuff you came up with...put in an answer to this question and i will give you the points...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.