Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seeing same company manytimes in Company Log in 1

Status
Not open for further replies.
Mar 12, 2003
678
US
When I log into Great Plains and select my company I am seeing it many times. I am on Version 9 SP2. Any ideas why? This is a restore from a backup.
 
You have entries in the User Company Access table that refer to Company IDs that are no longer present in the Company table.

Here is a script to remove the orphan records from the table so you do not get the repeating entries in the company selection window.


Code:
/* -------- start t-sql -------- */

use DYNAMICS

/* show the records to be deleted */

select CMPANYID, USERID
from SY60100 UA left join SY01500 C on UA.CMPANYID = C.CMPANYID
where C.CMPANYID is null


/* remove them!! */

delete 
from SY60100 UA left join SY01500 C on UA.CMPANYID = C.CMPANYID
where C.CMPANYID is null


/* -------- end t-sql -------- */

------
Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top