I need to retrieve the Account balance from an external SQL database.
The SQL database is linked to my FM solution and I can see the data fields etc and I can grab the data from those fields but the account balance is not in a single field. The database has an internal function
I have tried adding a calculation to the linked table with the calculation set as
ExecuteSQL ( "SELECT Turc06.EntCustBalance (2016, 0, 'C00618')"; ",";"," )
but I just get a ? in the result
another example they give is
Example - Customer Balances
The following example lists customers and their current balances.
Customers are held in the CUSTSUPP table.
To access only the customers within this table you will need to ensure you
apply a filter of 'C' on the acCustSupp field. The customer balances are
returned by using the function EntCustBalance.
SELECT acCode AS 'Ac Code', acCompany AS 'Company Name'
ZZZZ01.EntCustBalance(2020, 0, acCode) AS 'Balance'
WHERE acCustSupp = 'C'
ORDER BY acCode
Example Query Results
A B Applications Limited
Ace Electrical Supplies
A F Electrical Limited
Allbright Electrics (Paris)
Any help is gratefully received.