java - Inner join with H2 database and fulltextsearch -
i've table "bankrecording" , contains ids references differents tables.
this table stored in h2 databse , utilize fulltextsearch method.
for illustration i've "bankrecording" :
id | id_libelle | id_payment 1 | 2 | 3 2 | 2 | 10
with simple query inner bring together works. in query don't know how :
select b.* ft_search_data(1, 0, 0) ft, bankrecording b ft.table='bankrecording' , b.id=ft.keys[0]
it returns result ids...
i've tried returns many results... line elements stored in databse.
select b.*, l.*, et.*, p.*, mo.* ft_search_data('car', 0, 0) ft, bankrecording b, libelle l, etat et, payment p, motif mo ft.table='bankrecording' , b.id=ft.keys[0]
someone know how inner bring together in query ?
edit :
desired output :
id | id_libelle | id_payment 1 | auto | bank check 2 | auto | transfer
oh ! andrew i've found how it's works ! in fact, show info must specify each element in our select :
select b.id, l.libelle, p.libelle ft_search_data(1, 0, 0) ft, enregistrement b bring together libelle l on (b.id_libelle = l.id) bring together modereglement p on (b.id_modereglement = p.id) b.id=ft.keys[0] , ft.table='enregistrement' order b.id;
i dont know why can't phone call "b.*" elements...
java sql full-text-search inner-join h2
No comments:
Post a Comment