dre-logics -1 Junior Poster

I use Visual Basic 8.0 and MySQL 5.0
Articles are listed in table rental places in table stock if articles not exists in table stock
first check with article are not in listed stock table and wel in listed stock table rental
select * from rental,stock where rental.Article<>stock.Article ;

This gives the following result:

rental.article rental.rent stock.article stock.stock
5000 15 ...... ......
6000 25 ........ ......

No insert ,I want to use , insert into not exists:

insert into stock set stock.article=stock.stock-rental.rent stock.stock=stock.stock-rental.rent where not exist (select select * from rental,stock where rental.Article=stock.Article );

But the result is zerro I expected that two items (records) were added to table stock

What am I doing wrong or I forget.

Can someone help me please

Thanks in advance

Andre

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.