Обсуждение: Cross tables Like%
I have 2 tables, one is products and one is manufactors. The products table has a col. for Product_descriptions and manufactor_id column that is a foriegn key to the manufactors table. The manufactors table has a manfuactor_description column, for each unique Manufactor_id. I want to search (using like) on both tables (columns: Products.Product_description and Manufactors.Manufactor_description). Can anyone suggest a cross-table %Like% Query for it? Thanks!
select products.*, manufactors.* from products, manufactors where products.manufactor_id=manufactors.manufactor_id and ( products.product_description like 'param%' or manufactors.manufactor_description like 'param%'); regards Jason Davis ?????: >I have 2 tables, one is products and one is manufactors. > >The products table has a col. for Product_descriptions and manufactor_id >column that is a foriegn key to the manufactors table. > >The manufactors table has a manfuactor_description column, for each unique >Manufactor_id. > >I want to search (using like) on both tables (columns: >Products.Product_description and Manufactors.Manufactor_description). > >Can anyone suggest a cross-table %Like% Query for it? > >Thanks! > >---------------------------(end of broadcast)--------------------------- >TIP 5: Have you checked our extensive FAQ? > >http://www.postgresql.org/users-lounge/docs/faq.html > > > >