Tuesday, September 23, 2025

How to update column Based on joins in sql

 How to update column Based on joins in sql :-


UPDATE GeneralJournalAccountEntry

SET IS_ConsolidationMainAccount = '',

 IS_ConsolidateAccountName = ''

FROM GeneralJournalAccountEntry AS GJAE

 JOIN GeneralJournalEntry AS GJE

    ON GJE.RecId = GJAE.GeneralJournalEntry

WHERE GJE.SubledgerVoucherDataAreaId = 'VN06'

and GJE.ACCOUNTINGDATE > '2025-01-01'

No comments:

Post a Comment

Update Consolidate MainAccount for old records

  Update existing records to ensure the  Consolidation Account  field is correctly populated based on the  Consolidate MainAccount  setup. 1...