[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Searching tables
Quoting Kevin Flynn (kflynn@celticlinks.com):
> I am trying to translate the sql statement below into a search region where
> it pulls from 2 tables.
>
> SELECT * FROM transactions, orderline WHERE description =
> "given_keyword" AND
> transaction.order_number = orderline.order_number;
>
> I want to search through the orders to see who bought a particular product
> (i.e. Hand Planer) and pull back all relevant information for that order
> (i.e. Order number, username, address, etc...). The product Description is
> in the orderline table whereas all customer details are in the transactions
> table.
>
> I'd appreciate some help with this as I have been banging my head against a
> wall for ages trying to figure it out!
>
Can't do it with search-region. But if you have a SQL database
then [query ...] will work. Bear in mind that any columns that are
accessed with [sql-param field], not [sql-param table.field], and
any named the same will not work with [sql-param field] but will with
[sql-pos N].
--
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH 45013
phone +1.513.523.7621 <mheins@redhat.com>
I have a cop friend who thinks he ought be able to give a new ticket;
"too dumb for conditions".