Advanced SELECT Prototyping panel

The advanced select prototyping function is an aid to learning the syntax of the SQL SELECT statement, and a tool for prototyping complex SQL statements. Fragments of the statement syntax are displayed on the screen in a form based on the "railroad tracks" used to describe the syntax in the Db2® manuals. By positioning the cursor on the parts of the syntax you wish to explore or use, you can build up a statement that conforms to the syntax requirements. The statement you create is displayed at the bottom of the screen, and can be executed when you have completed it.

Panel and field definitions

  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFG2)            Advanced SELECT Prototyping

 Prototyping: select statement                     Status: statement incomplete
 View syntax notes
                                                    ◄─────────────────────┐
 ─┬────────────────────┬─ fullselect ─┬───────────┬───┬─────────────────┬─┴─
  └─ WITH ─ comtabexp ─┘              └─ orderby ─┘   ├─ fetchfirst ────┤
                                                      ├─ update ────────┤
                                                      ├─ FOR READ ONLY ─┤
                                                      ├─ optimize ──────┤
                                                      ├─ isolation ─────┤
                                                      └─ queryno ───────┘








 Command ===>                                                       Scroll PAGE
  F1=Help      F2=Split     F3=Exit      F4=Deselect  F5=InsRpt    F6=Executed
  F7=Backward  F8=Forward   F9=Swap     F10=PrvRpt   F11=NxtRpt   F12=Cancel
Prototyping
Shows the name of the syntax fragment currently displayed.
Status
The current status of the SQL statement you are building. The status indicator, in the form of a text string, applies either to the whole SQL statement (in which case, it uses the word statement), or to the clause within the SQL statement that you are currently prototyping (in which case, it uses the word clause):
statement incomplete
Only is displayed on the first Advanced SELECT Prototyping panel, and indicates that the statement generated so far is not ready for execution.
clause incomplete
Can be displayed on any panel except the first, and indicates that the clause currently being prototyped is not ready for execution (and by implication, the statement as a whole is not yet ready for execution).
clause complete
Can be displayed on any panel except the first, and indicates that the clause currently being prototyped is now complete. This indirectly implies (because otherwise the status would appear as statement complete) that the statement as a whole is not yet ready for execution.
statement complete
Can be displayed on any panel, and indicates that the statement as a whole is now complete and ready for execution (and implies that the current clause is also complete).
Note: Advanced SELECT prototyping is designed to help you build a SELECT statement until it is displayed to be complete. However, the completed status of a SELECT clause or statement does not necessarily mean that it is syntactically correct or references valid Db2® data. Only the successful execution of the SELECT statement confirms that its syntax is correct.
View syntax notes
Explanatory notes relating to the current syntax fragment, available on some of the advanced SELECT prototyping panels. Such panels show the text View syntax notes immediately below the Prototyping: field heading.

To view the notes, move the cursor to the View syntax notes text and press Enter. FM/Db2 displays a panel containing notes relevant to the current syntax fragment.

Parent panels

Child panels

To display this panel… Use/do this
Select Statement Browse panel Press Enter

Related tasks

Related references