
64
Serena® Collage® 5.1.3
Chapter 3 Design-Time Component Reference
How to Create and Store Structured Queries in
Collage
You can create new, blank SQL (
.sql
) files in Collage, which you can then edit in an
external editing tool to define your database queries. If you already have SQL query files
that you want to use to retrieve data for the Database Component, you can also upload
them to Collage. Collage lists all SQL files in the Project | Data Sources view, under
Queries
. This provides a short-cut to all of the queries that are currently stored in
Collage.
To create and store a structured query in Collage:
1
Do one of the following:
2
To see a list of all SQL queries stored in Collage, go to the Project | Data Sources
view, then select the
Queries
sub-view. From here, you can select and edit the SQL
files just as you would any other asset.
NOTE
If you will use the Database Query component to process a very simple query statement,
you can simply add the statement to the component itself, later on. You do not need to
store simple queries as .sql files in Collage.
If you want to... Then...
Create a new, blank
.sql file
a Go to the Project | Data Sources view.
b Select the
Queries
sub-view.
c Click the
New
button . The New structured query
dialog box appears.
d Enter a query name and description, then click
OK
.
Upload an existing
.sql query file to
Collage
a Go to the Content | Deploy Folders view.
b Select the folder to which you want to upload the query.
By default, all structured queries are stored in the
System \ Data Sources view. To keep all query files
together, select this folder.
c Click the
Upload
button .
d In the Upload dialog box, click the
Upload File
button
to browse to select the file to upload, then click
OK
.
NOTE
To check out and automatically open a .sql file in the appropriate editing tool, you must
set the
Content Editors
preference for the Structured Queries asset type.
Kommentare zu diesen Handbüchern