View Single Post
  #1   Spotlight this post!  
Unread 07-06-2007, 03:18
i2ppl i2ppl is offline
Registered User
no team
 
Join Date: Jun 2007
Location: Uzbekistan
Posts: 1
i2ppl is an unknown quantity at this point
Can i output combined query to DBGrid or DBEhlibGrid

Hello friends!
I need your help in this case.

I've 2 tables: table1(id, id_bookname) and table2(id, id_bookname, bookname).

table1's `id_bookname` consists table2's integer `id_bookname`'s values.

Can i output combined query to DBGrid or DBEhlibGrid which contains table1's `id` and table2's `bookname`.

For instanse,

table1
id id_bookname
------------------------------
1 134
2 532
3 134
4 134
5 532

table2
id id_bookname bookname
-----------------------------------------------------
1 134 book1
2 532 book2

Results in DBGrid must be:
id bookname
---------------------------
1 book1
2 book2
3 book1
4 book1
5 book2