Why does this not work ?
Roelof Wobben <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I have this problem.
Write a query against the item and inventory records that returns the inventory level for an item when you only know the item name.
I have this facts:
customer(wobben, musselkanaal, aaa).
customer(ankone, hengelo, bbb).
customer("de jong", haaksbergen, ccc).
item(1, pan, 0).
item(2, beker, 1).
inventaris( 1, 12).
inventaris( 2, 10).
So I tried this:
inventaris(X,Y),item(X,pan,0).
But it gives me a no where I expected it to be 12.
Roelof