We have some registered customers but now we uploaded a list of additional customers via xml and now we need to set all customers as registered, no matter their current registration value. What would be the sql query to run?
We have some registered customers but now we uploaded a list of additional customers via xml and now we need to set all customers as registered, no matter their current registration value. What would be the sql query to run?
Even the anonymous customers? Are you sure?
If so then I would try the following but I'd really look at the SQL table first.
UPDATE Customer
SET IsRegistered = 1
WHERE IsRegistered= 0;
But you need to think about these things
1.Some orders that come from PayPal allow duplicate email addresses so doing the above may cause their accounts to be locked.
2.None of the above will have passwords assigned so these will need to be manually entered via admin.
Can you know just set the new customers you are importing to registered?
To avoid the anonymous customers I would qualify the update with a check on the email address, ie:
I would urge you to do this in a test environment first to make sure you get the expected outcome.Code:UPDATE Customer SET IsRegistered = 1 WHERE IsRegistered= 0 AND Email <> ''
http://www.esedirect.co.uk
--------------------------------------------------------------------------
Using MS 9.2.0.0 with the following customisations:
Lightbox/Fancybox enlarged images;
Auto-suggest searchbox;
Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
Failed transactions emailed via trigger;
Custom app to show basket contents when customer online;
Orders pushed through to accounting systems.
All the above without source!
Or you can run the monthly maintenence but not sure if that would purge your new customers as they are not registered.
The SQL in the post above is what I would go with and agree do it on a test db first!
I purged all anons with the monthly maintenance and then ran the sql. All went as desired. I really appreciate your help! Thanks a lot!