I have a text item on a form that I would like to place a calculated value into when I navigate to the item. The basic idea is
Attorney Table = Has the billing rate
UBS Table = Contains details row with the hours
Billing Form = The form I want the value placed into
So, I have attempted to create a pre-text-item trigger as follows
SELECT SUM(UBS.HRS * ATTORNEY.BILLING_RATE) INTO :BILLING.AMOUNT_BILLED
FROM UBS, ATTORNEY
WHERE UBS.CASE_ID = :BILLING.CASE_ID AND
UBS.ATTRN_ID = :BILLING.ATTRN_ID AND
ATTORNEY.SSN = UBS.ATTRN_ID AND
UBS.WORK_DATE BETWEEN :BILLING.BEG_DATE AND
It's throwing a fit about the FROM UBS, ATTORNEY portion of the statement. I'm not even sure if I am going about this right way or not.
Is there anyway to inlcude tables that are not associated with the datablock for the form I am working on, in this select statement?
Maybe some type of pre-fix? I have been searching all over the place and haven't had any luck.
You need to be logged in to the database as either the table owner, or as a user who can see those tables and can refer to them without the owner prefix (i.e. for whom "SELECT * FROM ubs" works in SQL Plus", etc.)