Delete from Product table

Last Post 13 May 2009 04:38 AM by JASBRYDEN. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
JASBRYDEN
New Member
New Member

--
12 May 2009 11:18 AM
Hi

I have two tables one table has all my products and the next table has all of my sales.

I would like to create a script that would delete all the products in my products table that has no sales and has a status code of D (D - Delete)

This is what I have so far, but it is not working.

Select * from products as p, salesasb as s
where s.companyno=p.companyno and s.itemno<>p.sku and
p.companyno='4' and p.statuscode='D'


any help would be great !!
JASBRYDEN
New Member
New Member

--
13 May 2009 04:38 AM
great thanks alot

It works good.


Acceptable Use Policy
---