Overview
You inquire if there is an “Account ID” field for gas accounts and how to fetch it from the replication database. You found it in the core database and its value is supposed to be the same for all agreements for an account.
Solution
The "Account ID" field is on the account table in the database and is unique for each account.
You can use the sample query below to fetch the Account ID from the replication database. Replace the parameter accountID with a known accountID value (if available) or remove the filter.
select a.accountID,
c.custNo [CIS Account No], a.custID, a.accountNo,
p.premNo [Utility Account]
from account a
join premise p on p.custid=a.custid
join customer c on c.custid = a.custid
where accountID = 12345
<supportagent>
Only clients have access to their replication database (for example, raes_aepenergy).
</supportagent>