VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Showing products that have never been ordered?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pmarsh
Starting Member

United Kingdom
8 Posts

Posted - January 09 2006 :  08:58:02  Show Profile  Reply with Quote
Hi

I was wondering if there was a way of displaying products that had never been ordered?

I can't see any thing in the shop admin, and I'm not sure how to write a sql query to look up the products records and display only those which don't have a record in the oitems table.

Any help would be much appreciated!
Peter

devshb
Senior Member

United Kingdom
1898 Posts

Posted - January 09 2006 :  10:32:35  Show Profile  Visit devshb's Homepage  Reply with Quote
it depends on what kind of database you're using, but try this.....


select * from products as prd where not exists (select 1 from oitems as oit where prd.catalogid=oit.catalogid)

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

pmarsh
Starting Member

United Kingdom
8 Posts

Posted - January 09 2006 :  17:55:31  Show Profile  Reply with Quote
I'm using SQL Server 2000.

Thanks for your reply, that query was just what I was looking for!

Peter
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000