How to query with two tables in LLBLGEN

Posts   
 
    
pate
User
Posts: 5
Joined: 26-Mar-2009
# Posted on: 13-Jul-2009 09:10:34   

hi guys

is it possible to program and query this following query-statement in llblgen: (without inner-join)

select * from table1, table2 where table1.id = table2.tab1_id

thanx for your answer in forward...

thanam

LLBLGEN Vers.: 2.6.0 Final DB: Oracle 11.0.7 Template-Group: Adapter Dev.Env: C# Project/ VS 2008

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 13-Jul-2009 09:16:07   

is it possible to program and query this following query-statement in llblgen: (without inner-join)

select * from table1, table2 where table1.id = table2.tab1_id

What do you mean without inner-join? what difference should it make? It doesn't matter if you don't have the relation defined in the database.

Anyway if you want to fetch fields from more than one table, then you should use a flat structure, like the TypedList(defined in the Designer) or the DynamicList(defined in code).

pate
User
Posts: 5
Joined: 26-Mar-2009
# Posted on: 13-Jul-2009 10:04:06   

Walaa wrote:

is it possible to program and query this following query-statement in llblgen: (without inner-join)

select * from table1, table2 where table1.id = table2.tab1_id

What do you mean without inner-join? what difference should it make? It doesn't matter if you don't have the relation defined in the database.

Anyway if you want to fetch fields from more than one table, then you should use a flat structure, like the TypedList(defined in the Designer) or the DynamicList(defined in code).

sorry, i mean i want to join without a physically relation between tab1 and tab2. physically: select * from table1, table2 where table1.pk = table2.fk

logically: select * from table1, table2 where table1.field2 = table2.fk

field2 is a key from table1. it could be exist more then once in this table...

thanx in forward... pate

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 13-Jul-2009 14:00:08   

No prob. You can define the relation in code, please check my code sample on the following thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=12710

pate
User
Posts: 5
Joined: 26-Mar-2009
# Posted on: 13-Jul-2009 14:45:00   

Walaa wrote:

No prob. You can define the relation in code, please check my code sample on the following thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=12710

Cool, it works!! Thanx Walaa for your quick support!