Home » Developer & Programmer » Forms » Querying records from more than data blocks
Querying records from more than data blocks [message #82667] Fri, 20 June 2003 06:07 Go to next message
Amarsey
Messages: 17
Registered: March 2002
Junior Member
Hi,
I used your search to find out a similar to my question and happen to find a related answer here but if you could be more specific to my question, i would be much greatful.
Am using the forms in-built query in the default menu to query records from two tables but am recieving an error saying invalid column name which I understood to mean the column name is not part of the base table name in the form where the query is being performed.
Here is the example:
table1(a number,b varchar2(4)) -- base table in forms
table2(b varchar2(4),c varchar2(2))

Now, my form is based on table1 which has a Tabular layout displaying 6 records on the canvas. When I perform a query on table1 alone i was able to get all records in it.
But now I added a condition to the WHERE cluase in the block property of table1 i.e table1.b=table2.b AND table2.c IN ('12','14'). Before I did this,I added another block in the same form based on table2 and at the WHEN-NEW-BLOCK INSTANCE trigger on table1 block I joined the two blocks with the join condition :table1.b := :table2.b
Now after i have compiled the form and run it I recieved the error 'invalid column name ' complaining of column C which is not part of table1. What is your suggestion that will help me achieve my result?
Thanks.
Re: Querying records from more than data blocks [message #82676 is a reply to message #82667] Sun, 22 June 2003 02:04 Go to previous message
Sun
Messages: 92
Registered: August 2002
Member
Instead create master detail relation ship and in table 2 property where clause give the condition c in ('12','14') .
Previous Topic: Query not returning all records
Next Topic: Ranking report
Goto Forum:
  


Current Time: Wed Apr 24 21:10:29 CDT 2024