Sun Microsystems
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

ProcedureHow to Edit a Simple Query

Steps
  1. Select a query from the list on the Query List screen

  2. Click Edit.

    The selected Simple Query screen displays.

  3. Make changes to the Simple Query screen by navigating through the tabs and entering your changes as you would for creating a simple query .

  4. Save or run your changed query.

Creating and Running Advanced Queries

You must have previous experience writing SQL queries to use this feature of the accounting and reporting console.

ProcedureHow to Create an Advanced Query

Steps
  1. Click New Advanced Query on the Query List screen.

  2. Enter your SQL query in the text box.

    This is the only difference compared to the actions available for the Simple Query.

  3. Save or run your query.

    • To save your query, click Save.

    • To run your query, click Run.

ProcedureHow to Run an Advanced Query

Step
  • You can run an advances query that you just created. You can also run an advanced query that you previously saved.

    Query List screen showing list of queries. Shows the Run, Edit,
and Delete buttons
    • To run a query that you just created, click Run on the Advanced Query screen.

    • To run a query that you previously saved, select the query from the Query List screen, and then click Run.

ProcedureHow to Edit an Advanced Query

Steps
  1. Select a query from the list on the Query List screen

  2. Click Edit.

    A completed version of the Advanced Query screen displays.

  3. Make changes to the SQL query.

  4. Save or run your changed query.

    • To save your changed query, click Save.

    • To run your changed query, click Run.

Latebindings for Advanced Queries

The syntax for the latebindings in advanced queries is:

   LATEBINDING{ <column>;<operator>;<default value> }

   <column>    name if the latebinding
   <operator>  a SQL operator (e.g. = < > in .. )
   <value>     default value (e.g. 'localhost' )

Example 5-7 Latebindings Examples

select hostname from sge_host where LATEBINDING{hostname, like, 'a%'}
select hostname from sge_host where LATEBINDING{hostname, in, ('localhost', 'foo.bar')}

Previous Previous     Contents     Index     Next Next