Knowledgebase: Knowledgebase

This will occur when customers report that they cannot drill into an open document because Salespad indicates it is historical.

 

First run this script and verify the document number is returned in this query.

select bachnumb, docdate, (select count(*) from sop10200 as d where d.soptype=oh.soptype and d.sopnumbe=oh.sopnumbe),
(select count(*) from sop30300 as d where d.soptype=oh.soptype and d.sopnumbe=oh.sopnumbe),
* from sop10100 as oh where exists (select 1 from sop30200 as hh where hh.soptype=oh.soptype and hh.sopnumbe=oh.sopnumbe)

select * from sop10100 as oh where exists (select 1 from sop30200 as hh where hh.soptype=oh.soptype and hh.sopnumbe=oh.sopnumbe)
select * from sop10200 as oh where exists (select 1 from sop30200 as hh where hh.soptype=oh.soptype and hh.sopnumbe=oh.sopnumbe)

 

Once you verify it is in the above query, run the following query to delete it temporarily. Ensure that this returns the same number of records as the above query.

begin tran

delete oh from sop10200 as oh where exists (select 1 from sop30200 as hh where hh.soptype=oh.soptype and hh.sopnumbe=oh.sopnumbe)
delete oh from sop10100 as oh where exists (select 1 from sop30200 as hh where hh.soptype=oh.soptype and hh.sopnumbe=oh.sopnumbe)

rollback tran

 

Once the number of results of the queries match, run the following query. This will delete the records from the open tables permanently.

begin tran 

delete oh from sop10200 as oh where exists (select 1 from sop30200 as hh where hh.soptype=oh.soptype and hh.sopnumbe=oh.sopnumbe) 
delete oh from sop10100 as oh where exists (select 1 from sop30200 as hh where hh.soptype=oh.soptype and hh.sopnumbe=oh.sopnumbe) 

commit tran

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: