Skip to main content
OCLC Support

Additional filter SQL

Learn about adding snippets of SQL to searches in OLIB.

Menu: Admin Client Configuration> Additional Filter SQL

The System Administrator can add snippets of SQL to searches in OLIB. In this way you can use some additional SQL in an OLIB Web domain to carry out a more customised search than the default searches and filters allow. For example a SQL query can be created to search for 'orphan' journal articles - articles that were once linked to serial issues that have since been deleted.

To do this you create a record containing the snippet of SQL. This record also contains the list of domains in OLIB where it can be used. The Additional SQL is then visible in that domain after you have selected a refinement option. It appears above the Sorting Options and Refine Search links.

Create the snippet

  1. Go to Admin Client Configuration> Additional Filter SQL.
  2. Click New Record.
  3. Enter a Name for the SQL record. This will appear in the relevant domain in the Additional SQL drop down, e.g. Orphan Articles.
  4. In the SQL field enter string of SQL e.g.

and titles.articleno is null

  1. When the record is ready set Enabled to Yes.
  2. In Domains click Search to find and select the relevant domain, e.g. Titles (TITLES).
  3. Save and Close the record.

The snippet will then be available to add to a search in the domains that you entered in the Additional Filter SQL record.

Use the snippet

In the example above -

  1. Set up a search in Titles using a refinement - such as to search for titles with a Media Type = Journal Article.
  2. After you have selected a refinement OLIB displays any Additional SQL available. To add the SQL snippet set up above, simply select the snippet from the Additional SQL drop down - in this case Orphan Articles.

The search is run automatically including the SQL in the snippet. Your results will display a list of orphan journal articles that are no longer linked to a serial issue.