To Verify All Account Code which is Parent Account but still able to select From Transaction

Created by Cheng Kah Poh, Modified on Wed, 23 Aug, 2023 at 10:08 AM by Cheng Kah Poh


Solution:

Run this Script 


select * from glaccounts where id in (select ParentId from glaccounts where SpecialAccountId is null) and IsSubAccount = '0'



All Above Account are parent account, to fix this issue

Please run this script update the IsSubAccount to 1


---temp Table to hold records


declare @Table1 table (id uniqueidentifier, code varchar(100))


-- insert some records into the temp table

insert into @Table1

select Id,GLAccountCode from glaccounts where id in (select ParentId from glaccounts where SpecialAccountId is null) and IsSubAccount = '0'


-- display all 

select * from @Table1


---Display Table Before Update

select * from glaccounts where Id in (Select id from @Table1)


---update isSubAccount

update GLaccounts set issubAccount = '1' where id in(Select id from @Table1)


Thanks!


** Learn more about Azure Cloud

** Learn more about QNE Hybrid Cloud Software

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article