# Customizing the SQL of a View Link

While creating a view link in the View Link Wizard or editing a view link in the View Link Editor, use the Association SQL page to view and edit (if necessary) the SQL code that defines the view link between the source and destination view objects.

The Association SQL panel displays the default SQL expression that will be used to filter the records in the destination side of a view link. The SQL query can be modified here to perform any additional valid SQL restrictions.

Query Clauses

> Source Attributes

> > The Source Attributes list contains the attributes you chose in the source side of the view link (from the Source Attributes panel). These will be passed as parameters to the detail view.

> Where

> > The Where field is the SQL query snippet that can be modified to perform additional restrictions. Use the Where field to modify, if necessary, to the SQL query. Any changes you make will be reflected in the Query Statement text field below.

> > Note: The number of parameters, represented by question marks (?), must match the number of source attributes. These parameters are position sensitive; changing the order of them can change the result of your query.

Query Statement

> This is a display area that shows the query statement with the parameters logically substituted. This is the code that JDeveloper will use to make the association. You can edit this query in the Where field above.

Test

> Click Test to see if the query statement is valid.