The SQL Editor

 < Day Day Up > 



When changing SQL statements, you can either enter the SELECT statements in the formula bar (to display, select View | Formula Bar), or you can use the SQL Editor to change either the SELECT statement or the WHERE clause. The SQL Editor also provides some help on BusinessObjects functions and SQL syntax (although I would like to see Business Objects provide more business-oriented examples in the online help).

Figure 10-1 shows the SQL Editor. You launch the SQL Editor by clicking the >> button from the Definition tab of the object properties. As you modify the SQL for an object, you can either point and click your way through it, or you can enter the functions, columns, and operators manually. Regardless of how you build the SQL Statement, be sure to Parse or Validate (formula editor) each object as you go. Parsing validates that your statement is correct and won't produce an error when a user launches a query.   Parsing will not catch all SQL errors and may be slower for objects that use @Select(as multiple SQL statements must be checked), but it will catch the majority.   

click to expand
Figure 10-1: The SQL Editor helps you write SQL statements.

It would be nice if the vendor reordered the selection boxes as, in order to build a statement with point and click, you start with the Function box on the right. For example, to create the measure object from the Island Resorts Marketing universe, as shown in Figure 10-1:

  1. Under Functions, expand the Number functions by clicking the + sign. Scroll to sum() and double-click. Notice that the mouse insertion point is correctly between the parentheses. If you had started with the Tables and Columns on the left, your mouse would be in the wrong place.

  2. Under Tables and Columns, expand the INVOICE_LINE table by clicking the + sign. Double-click DAYS to insert INVOICE_LINE.DAYS into the statement.

  3. Under Operators, double-click the multiplication sign (*). The list of available operators will change depending if you modify a SELECT statement or a WHERE clause.

  4. Under Tables and Columns, double-click NB_GUESTS.

  5. Under Operators, double-click * again.

  6. Under Tables and Columns, scroll to the SERVICE table, click + to expand it, and double-click PRICE. The close parenthesis should still be in the correct place.



 < Day Day Up > 



Business Objects(c) The Complete Reference
Cisco Field Manual: Catalyst Switch Configuration
ISBN: 72262656
EAN: 2147483647
Year: 2005
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net