i have two tables:
stocklocations:(StockID, Quantity, SLNID)
StockDetail:(StockID, Quantity, SLNID, Type)
i want to insert a query to db to update all Quantity of stocklocations when Type ='B' and StockID are equal with SLNID equal and if SLNID not equal then insert StockID, Quantity, SLNID into stocklocation from stockdetail is this possible?