kalayama i understand his question in diff way.

In a search page, user can search the book by different options..
(title, author, year, publisher,..) and all of them are optional. User might enter them or leave them unentered.

so your query get either search string or null for each parameters...in such a case your where clause has to get generated dynamically based on the inputs given by the user. For instance user enter search string only for title and author. So ur query's where clause should have two conditions one for title and other for author.

This case the where clause would be like this

title like nvl(input_title, title)
and
author like nvl(input_author, author)
and
year like nvl(input_year,year)
and
publisher like nvl(input_publisher,publisher)

variables start with 'input_' inputs entered by the user in the search screen. And others are column names in the table.
The above query fetches all the records satisfying ur selection criterion irrespective of number of search options the used entered.

let me explain with an examle,
user entered Vinci in title and Dan in author screen and did not fill other text boxes.
Now,
title like nvl(input_title, title)
becomes title like input_title as input_title is not null

author like nvl(input_author, author)
becomes author like input_author

and

year like nvl(input_year,year)
becomes year like year as input_year is null and this returns 'True' to all the records

publisher like nvl(input_publisher,publisher)
becomes publisher like publisher and this condition is true to all the records.

so this query equivalent to

title like nvl(input_title, title) and
author like nvl(input_author, author)

Hence you achieve what you required in a Static query.

At first I though he has to match the exact term entered in the search screen so i said like is not required.

I will be very happy if this post helps Suresh.