How to use single data block to query multiple tables 

Showing Answers 1 - 16 of 16 Answers

Naidu. Kondisetty

  • Aug 22nd, 2005
 

You can do using CLUSTER CONCEPT.

  Was this answer useful?  Yes

Subhash

  • Sep 1st, 2005
 

By creating a View based on the tables and create the Block based on that view.

  Was this answer useful?  Yes

Rubai

  • Oct 10th, 2005
 

FROM Clause query

  Was this answer useful?  Yes

dhiraj

  • Apr 8th, 2006
 

dear friend

I am try.But so success .so please help me.

run form .window title display but no  date display.

thanks

by dhiraj.

  Was this answer useful?  Yes

Manoj Warrier

  • Jun 29th, 2007
 

Use the from clause query in the property palette of the block and write the sql statement using joins and fetch the data from multiple tables
try it guys its pretty fast and effective as well

  Was this answer useful?  Yes

abhishek agarwal

  • Jul 12th, 2007
 

By using Post Query trigger.

Mathialagan

  • Aug 8th, 2007
 

By using query_data_source_name property we can view multiple table records

  Was this answer useful?  Yes

devenar

  • Nov 17th, 2007
 

Using SET_BLOCK_PROPERTY and property DML_DATA_TARGET_NAME. We can change the query source as well as change the DML source of the block at runtime.

  Was this answer useful?  Yes

devenar

  • Nov 17th, 2007
 

QUERY_DATA_SOURCE_NAME   Specifies the name of the block's query data source.  Note: You cannot set a blocks’ QUERY_DATA_SOURCE_NAME when the block’s datasource is a procedure. - Use the SET_BLOCK_PROPERTY for this.
And DML Data target name is for changing the DML target. Cna ignore my last ans.

  Was this answer useful?  Yes

1) first  create  a  block using  the  table  A (say). then  in the  Query Data Source  name  write  the  name  of  the  other tables  say  B.
2)In the  Where  clause  of the  block  write  the  join like
a.colname=b.colnname.I the  connecting  coloumn between two  tables)
3) set the  query allowed  property  to  YES
4)set  key mode non updateable.

  Was this answer useful?  Yes

I dont't think a single block can be associated with more than one table.So to query multiple table you have to associate the table name through set_block_property(block_name,DML_TARGET_NAME,table name).Otherwise make a view of multiple table then associate wuth the block

  Was this answer useful?  Yes

imnrj23

  • Nov 18th, 2010
 

Use Post_Query Trigger on the Block Level.

Remember in this Trigger if you are getting the data from the base table (your Data Block Source), then you dont need any coding.

If you want to query another table than use the Sql Query with the required table in the From Clause and the conditions as per requirement.

Now this trigger works from every single record. So, In every record the base table data will come automatically and the Other table data will come on the basis of your query.

Regards,
Neeraj

  Was this answer useful?  Yes

anji

  • Jan 2nd, 2012
 

Create a view on multiple tables and after then
Create a data block on that view

  Was this answer useful?  Yes

Sandeep

  • Aug 23rd, 2016
 

Database Block can be based on more than one table. Query data source name: table names. Where clause: join query. The advantage of joining tables in your block is that the result set is faster than the traditional block based on the primary table and using a Post-Query trigger to display the relevant data from the joined tables.

  Was this answer useful?  Yes

kamaraj

  • Dec 16th, 2018
 

datablock -->property set query data source multiple table like(emp,dept) & where clause property join 2 tables like(emp.deptid=dept.id)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions