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-Cart StoreFront Customer Forum

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

 All Forums
 VPCart Forum
 Advanced SQL Execution
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

37 Posts

Posted - March 12 2007 :  00:32:28  Show Profile  Visit Season's Homepage  Reply with Quote
Hi , I am not familiar enough with Advanced SQL Execution , but I have loaded the FREE BYZ Code to do this. I need the code to do the following.

Advanced SQL Execution

select * from products where ccode like '%NA%' then I want to change the Hide field from FALSE to TRUE in all those that have NA in the CCODE.

Thanks for any assistance.

Cliff @ Seasonspool.com

Senior Member

United Kingdom
1898 Posts

Posted - March 12 2007 :  03:37:23  Show Profile  Visit devshb's Homepage  Reply with Quote
if you're on sqlserver or mysql, then first run this in the normal vpasp "Advanced Query" screen to check how many records there are and to see if it's what you're expecting:

select catalogid,ccode,cname,hide from products where upper(ccode) like '%NA%'

and if that's what you're expecting to update, then run this in the byz advanced sql execution:

update products set hide=1 where upper(ccode) like '%NA%'

or if you're on access it would be:

select catalogid,ccode,cname,hide from products where ucase(ccode) like '%NA%'

update products set hide=yes where ucase(ccode) like '%NA%'

if anyone's browsing this and wonders what we're talking about, have a look at:
Advanced SQL Execution:
(it's free!)

And if you like that, have a look at the Bulk Product Update Tool:
(not free, but very nice anway; lets you see your results before performing the actual update as a test run and lets you do updates using category criteria etc)

Simon Barnaby
Web Design, Online Marketing and VPASP addons

Edited by - devshb on March 12 2007 04:20:07
Go to Top of Page

Starting Member

37 Posts

Posted - March 12 2007 :  15:03:04  Show Profile  Visit Season's Homepage  Reply with Quote
Thanks Simon, thats what I needed. I will consider your Bulk Update Tool.

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