Help with PLSQL code for searching [message #377623] |
Tue, 23 December 2008 23:49 |
nbmunnangi
Messages: 1 Registered: December 2008
|
Junior Member |
|
|
hi all,
in my application there is a requirement for searching through table and return rows...
--there is a product table which has columns productcode, price, quantity, description...
--user should be able to search using productcode or description or price range and return the rows...
please guide me through this...
thanks in advance...
|
|
|
Re: Help with PLSQL code for searching [message #377624 is a reply to message #377623] |
Wed, 24 December 2008 00:03 |
trivendra
Messages: 211 Registered: October 2007 Location: Phoenix
|
Senior Member |
|
|
Hi,
You can user DECODE or CASE statement after where clause.
like
DECODE(productcode,:input_productcode,null,productcode,:input_productcode)
and
DECODE(price,:input_price,null,price,:input_price)
Thanks
Trivendra
[Updated on: Wed, 24 December 2008 00:26] Report message to a moderator
|
|
|
|