I have two tables in a database. One of them contains the received stock and the other the sold stock. So the current stock is received stock-sold stock. But how do I put this into an SQL statment. What I would like to do basically, is subtract the sold stock table from the received stock table. I tried:
SQLQuery = "select stock.* from stock inner join sold on not stock.serialnr=sold.serialnr"
But it doesnt work. Inner join does the opposite: it adds the databases. I was wondering if there is a way to invert this operation.
Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!
Or try our Ask An Expert service to answer any of your questions!