Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
unidentified user
kkirby-indmar
Posts: 4
Registered: 11-22-2011
0
Accepted Solution

Data location in SQL database

Evening everyone,

 

I am trying to make a mass update to all or our customers in MAS 500, but cannot find where the data is located for this particular field in SQL. In the Maintain Customers module under the Sales Order tab, the value for "Closest Warehouse", I cannot find where in the SQL database this value is stored.

 

Can anyone point me in the right direction for this?

 

Thank you in advance!!

Sage MAS Partner
LouDavis
Posts: 545
Registered: 10-29-2008
0

Re: Data location in SQL database

Check out your records in tarCustAddr as this is where the warehouse key is stored..

Louis Davis MCSD, MCAD, MCITP
e2b teknologies, inc
www.e2btek.com

unidentified user
kkirby-indmar
Posts: 4
Registered: 11-22-2011
0

Re: Data location in SQL database

Thanks for the reply. That isn't the correct field though. I just verified by updating the "Closest warehouse" field in MAS and it does not match the key that is in that field. I would think that the setting would be somewhere in the salesorder tables, but cannot find it.

Sage MAS Partner
jnoll
Posts: 420
Registered: 11-04-2008
0

Re: Data location in SQL database

I would agree with Lou on this. Don't forget that the Closest Warehouse is on the Sales Order Tab in Customer Maintenance as well as the under the Other Addresses button so you can set this for each Address on the Customer.

 

You can use this code to look at it in SQL.

 

DECLARE @iCompanyID varchar(3);

-- Replace this SOA with your company id
SET @iCompanyID = 'SOA';  

SELECT  tarCustomer.CompanyID, 
		tarCustomer.CustID,
		tarCustAddr.CustAddrID, 
		tarCustomer.CustName, 
		tarCustAddr.WhseKey, 
		timWarehouse.WhseID 
FROM tarCustomer WITH (NOLOCK)
	INNER JOIN
		tarCustAddr WITH (NOLOCK)
			ON tarCustAddr.CustKey = tarCustomer.CustKey
	INNER JOIN
		timWarehouse WITH (NOLOCK)
			ON timWarehouse.WhseKey = tarCustAddr.WhseKey
WHERE tarCustomer.CompanyID = @iCompanyID
ORDER BY tarCustomer.CustID;

 

Joe Noll
RKL eSolutions LLC
http://www.rklesolutions.com
Sage MAS 500 Customer
JohnHanrahan
Posts: 207
Registered: 11-03-2010
0

Re: Data location in SQL database

I'm pretty sure Lou is correct.  Just for grins I ran a trace and it confirmed that tarCustAddr.WhseKey was updated.

 

You might double check what you're looking at.

 

Happy Thanksgiving,

J

unidentified user
kkirby-indmar
Posts: 4
Registered: 11-22-2011
0

Re: Data location in SQL database

Thanks for all the replies.

 

Not sure what I was missing last week, but I just took a second look and that was the correct database field. I ran an update to set them all to the correct warehouse.

 

Thank you for all the help, that saved me hours of manual entry!!