Hi All,
Here's the situation.
There is an SQL table of lookup codes. The columns in the table are "FIELD", "VALUE", and "DESCR".
The data looks like
CRA_TYPE RV Receiving
CRA_TYPE AJ Adjustment
CUST_TYPE MD Medical
CUST_TYPE RT Retail
The main datatables contain a "VALUE" in a particluar "FIELD" and I need to be able to retrieve the appropriate "DESCR" to output on the report.
There is a stored procedure that takes 'FIELD" and "VALUE" and selects "DESCR" but I can't figure out how to set it up as a formula field and pass parameters to it for each line.
It is basically
SELECT DESCR FROM tbLookUp WERE [
FIELD]=@FIELD AND [VALUE]=@VALUE
The "FIELD" parameter would be static (in this case "CRA_TYPE") and the "VALUE" parameter would be the value of the CRA_TYPE field in each datarow.
I can't just use the "VALUE" since more than one field might have the same "VALUE" but a different "DESC". Only the combination of "FIELD" and "VALUE" is unique.
Any help would be greatly appreciated.
Thanks in advance.
Larry