Help w SQL query

Howdy,

can anyone help me with a SQL query to change global customers to local?

I briefly used HQ at a second location, now I am only using SO and am having issues updating customers who were entered while we were using HQ because they are marked as global customers.

I need a sql query/ statement that will change all customers to local custmers thanks

Reply to
confluencekayaks
Loading thread data ...

ALWAYS create a backup of your database before running ANY Insert, Update or Delete statement!

UPDATE Customer SET GlobalCustomer = 0

Reply to
Glenn Adams

I hope somone reads this and can help. I imported my item database, and even though the taxid and vendor are in there (SQL statement), when viewing the part in Manager, it is not updated.

Suggesti> ALWAYS create a backup of your database before running ANY Insert, Update or

Reply to
Bill Fry

Not sure about the TaxID, but you need to insert a record into SupplierList to link an Item to a Supplier. Item.SupplierID only indicates the Default Supplier - it does not create the SupplierList link on it's own.

This is the bare minimum statement to add SupplierList records for the default suppliers listed in your Item Table. This is assuming that your SupplierID field in the Item Table has the correct Supplier IDs, which it may not...

As always, MAKE A BACKUP OF THE DATABASE BEFORE RUNNING THIS STATEMENT!

insert into supplierlist (ItemID, SupplierID, Cost, ReorderNumber, MasterPackQuantity, MinimumOrder, TaxRate) select i.ID, i.SupplierID, 0.00, '',0,0.0,0.0 from Item i left join supplierList sl on i.id = sl.ItemID and i.SupplierID = sl.SupplierID where sl.ID is null

Reply to
Glenn Adams [MVP - Retail Mgmt]

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.