home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / vxcliser.zip / VRCS.1 / QUERYED.HLP (.txt) < prev    next >
OS/2 Help File  |  1994-12-23  |  41KB  |  1,439 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Aggregate ΓòÉΓòÉΓòÉ
  3.  
  4. Use this page to add aggregate functions to the SQL query. The Selected 
  5. aggregate functions list shows aggregate functions that are currently part of 
  6. the query. Aggregate functions are listed in the SELECT clause of the final SQL 
  7. statement. 
  8.  
  9. Help for tasks: 
  10.  
  11.    Adding an aggregate function to the query 
  12.    Removing an aggregate function from the query 
  13.  
  14. Window objects: 
  15.  
  16.    Selected aggregate functions 
  17.    Remove 
  18.    New aggregate function 
  19.    Edit 
  20.    Add 
  21.    Modify 
  22.  
  23.  
  24. ΓòÉΓòÉΓòÉ 1.1. Adding an aggregate function to the query ΓòÉΓòÉΓòÉ
  25.  
  26. To add a new aggregate function to the query, type a new aggregate function in 
  27. the New aggregate function field, then click the Add button. 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 1.2. Removing an aggregate function from the query ΓòÉΓòÉΓòÉ
  31.  
  32. To remove an aggregate function from the query, click on the function you want 
  33. to remove in the Selected aggregate functions list, then click the Remove 
  34. button. 
  35.  
  36.  
  37. ΓòÉΓòÉΓòÉ 1.3. Selected aggregate functions ΓòÉΓòÉΓòÉ
  38.  
  39. The Selected aggregate function list shows the aggregate functions that are 
  40. currently part of the SQL query. When you click on a function in this list, it 
  41. is copied to the New aggregate function field. 
  42.  
  43.  
  44. ΓòÉΓòÉΓòÉ 1.4. New aggregate function ΓòÉΓòÉΓòÉ
  45.  
  46. Type the new aggregate function into this entry field. When you are finished, 
  47. click the Add button. Enter only one aggregate function at a time. 
  48.  
  49.  
  50. ΓòÉΓòÉΓòÉ 1.5. Add button ΓòÉΓòÉΓòÉ
  51.  
  52. Click the Add button to add the new aggregate function to the Selected 
  53. aggregate functions list. You must explicitly add a new function to the list in 
  54. this way for it to become part of the SQL query. 
  55.  
  56.  
  57. ΓòÉΓòÉΓòÉ 1.6. Modify button ΓòÉΓòÉΓòÉ
  58.  
  59. Click the Modify button to replace the selected aggregate function with the one 
  60. in the New aggregate function field. 
  61.  
  62.  
  63. ΓòÉΓòÉΓòÉ 1.7. Remove button ΓòÉΓòÉΓòÉ
  64.  
  65. Click the Remove button to remove highlighted aggregate functions from the 
  66. Selected aggregate functions list. 
  67.  
  68.  
  69. ΓòÉΓòÉΓòÉ 1.8. Edit button ΓòÉΓòÉΓòÉ
  70.  
  71. Click the Edit button to invoke an editor for the current aggregate function. 
  72. The editor makes it easy for you to build the aggregate function by showing you 
  73. column names and commonly used functions and operators in a calculator format. 
  74.  
  75.  
  76. ΓòÉΓòÉΓòÉ 2. Columns ΓòÉΓòÉΓòÉ
  77.  
  78. Use this page to select the column you want to use in the SQL query. Columns in 
  79. the Selected columns list are included in the SELECT clause of the final SQL 
  80. statement. 
  81.  
  82. Help for tasks: 
  83.  
  84.    Adding a column to the query 
  85.    Removing a column from the query 
  86.  
  87. Window objects: 
  88.  
  89.    Selected columns 
  90.    Remove 
  91.    Distinct 
  92.    Available columns 
  93.    Add 
  94.  
  95.  
  96. ΓòÉΓòÉΓòÉ 2.1. Adding a column to the query ΓòÉΓòÉΓòÉ
  97.  
  98. You can add a column to the Selected columns list by doing any of the 
  99. following: 
  100.  
  101. o Click on a column in the Available columns list, then click the Add button. 
  102.  
  103. o Double click on the column name in the Available columns list that you want 
  104.   to add. 
  105.  
  106. o Drag the column name you want to add from the Available columns list to the 
  107.   Selected columns list. 
  108.  
  109.  
  110. ΓòÉΓòÉΓòÉ 2.2. Removing a column from the query ΓòÉΓòÉΓòÉ
  111.  
  112. You can remove a column from the Selected columns list by doing any of the 
  113. following: 
  114.  
  115. o Click on a column in the Selected columns list, then click the Remove button. 
  116.  
  117. o Drag the column name you want to remove from the Selected columns list to the 
  118.   Available columns list. 
  119.  
  120.  
  121. ΓòÉΓòÉΓòÉ 2.3. Selected columns list ΓòÉΓòÉΓòÉ
  122.  
  123. The Selected columns list shows the currently selected columns. These columns 
  124. will appear after the SELECT keyword in the SQL statement. 
  125.  
  126.  
  127. ΓòÉΓòÉΓòÉ 2.4. Remove button ΓòÉΓòÉΓòÉ
  128.  
  129. Clicking this button removes the highlighted column names from the Selected 
  130. columns list. 
  131.  
  132.  
  133. ΓòÉΓòÉΓòÉ 2.5. Distinct check box ΓòÉΓòÉΓòÉ
  134.  
  135. If checked, duplicate rows are eliminated from the final result table. 
  136.  
  137.  
  138. ΓòÉΓòÉΓòÉ 2.6. Available columns list ΓòÉΓòÉΓòÉ
  139.  
  140. The Available columns list shows the tables and columns from which you can 
  141. choose. To see a table's columns, click on the [+] symbol beside the table 
  142. name. Double click on a column name to add it to the Selected columns list. 
  143. Double click on a table name to add all columns in that table to the Selected 
  144. columns list. You can also drag table and column names to the Selected columns 
  145. list. 
  146.  
  147.  
  148. ΓòÉΓòÉΓòÉ 2.7. Add button ΓòÉΓòÉΓòÉ
  149.  
  150. Clicking the Add button adds the highlighted column or table name from the 
  151. Available columns list to the Selected columns list. 
  152.  
  153.  
  154. ΓòÉΓòÉΓòÉ 3. Connection editor ΓòÉΓòÉΓòÉ
  155.  
  156. Use the connection editor to set commonly used properties of a connection 
  157. object. 
  158.  
  159. Window objects: 
  160.  
  161.    Data source 
  162.    Database 
  163.    Find 
  164.    Userid 
  165.    Password 
  166.    Connection parameters 
  167.    OK 
  168.    Cancel 
  169.  
  170.  
  171. ΓòÉΓòÉΓòÉ 3.1. Data source ΓòÉΓòÉΓòÉ
  172.  
  173. The Data source field shows the type of database that the connection object 
  174. will try to use. The options are: 
  175.  
  176. WATCOM SQL 
  177.           WATCOM SQL for OS/2 
  178.  
  179. IBM DB2/2 
  180.           IBM Database 2/2 
  181.  
  182. ODBC 
  183.           Any database with an Open Database Connectivity (ODBC) interface 
  184.  
  185.  
  186. ΓòÉΓòÉΓòÉ 3.2. Database ΓòÉΓòÉΓòÉ
  187.  
  188. Enter the name of the database file that the connection object should use in 
  189. the Database field. 
  190.  
  191. If you leave this field blank, the connection object will prompt you for the 
  192. database name when its Connect method is invoked. 
  193.  
  194. To search for databases, click the Find button. 
  195.  
  196.  
  197. ΓòÉΓòÉΓòÉ 3.3. Find ΓòÉΓòÉΓòÉ
  198.  
  199. Press the Find button to open a file dialog that will help you select a 
  200. database. If the Data source is WATCOM SQL or ODBC, the button will display a 
  201. file selection dialog, in which you can pick a database file. If Data source is 
  202. IBM DB2/2, a window with a list of databases will be displayed. 
  203.  
  204.  
  205. ΓòÉΓòÉΓòÉ 3.4. Userid ΓòÉΓòÉΓòÉ
  206.  
  207. You must identify yourself to the database before you can access the data it 
  208. contains. The Userid field contains the user identifier the object will use 
  209. when connecting to the database. 
  210.  
  211. If you leave this field blank, the connection object will prompt you for a 
  212. userid when its Connect method is invoked. 
  213.  
  214.  
  215. ΓòÉΓòÉΓòÉ 3.5. Password ΓòÉΓòÉΓòÉ
  216.  
  217. You must identify yourself to the database before you can access the data it 
  218. contains. The Password field contains the password for the user named in the 
  219. Userid field. 
  220.  
  221. If you leave this field blank, the connection object will prompt you for a 
  222. password when its Connect method is invoked. If you type a password in this 
  223. field, it will be displayed as a number of asterisks. 
  224.  
  225.  
  226. ΓòÉΓòÉΓòÉ 3.6. Connection parameters ΓòÉΓòÉΓòÉ
  227.  
  228. The Connection parameters field contains extra connection information. The 
  229. format of this string depends on the database you are using. Consult the 
  230. documentation for your database for more information. 
  231.  
  232.  
  233. ΓòÉΓòÉΓòÉ 3.7. OK ΓòÉΓòÉΓòÉ
  234.  
  235. Click the OK button to close the Connection editor and save the changes you 
  236. have made. 
  237.  
  238.  
  239. ΓòÉΓòÉΓòÉ 3.8. Cancel ΓòÉΓòÉΓòÉ
  240.  
  241. Click the Cancel button to close the Connection editor without saving the 
  242. changes you have made. 
  243.  
  244.  
  245. ΓòÉΓòÉΓòÉ 4. Where ΓòÉΓòÉΓòÉ
  246.  
  247. Use this page to add criteria to the SQL query. Criteria describe restrictions 
  248. on the rows that you want to include in the result table. Criteria are listed 
  249. in the WHERE clause of the final SQL statement. 
  250.  
  251. Help for tasks: 
  252.  
  253.    Adding a new criteria 
  254.    Removing a criteria 
  255.  
  256. Window objects: 
  257.  
  258.    Criteria 
  259.    Remove 
  260.    New criteria 
  261.    AND 
  262.    OR 
  263.    Edit 
  264.    Add 
  265.    Modify 
  266.  
  267.  
  268. ΓòÉΓòÉΓòÉ 4.1. Adding a new criteria ΓòÉΓòÉΓòÉ
  269.  
  270. To add a new criteria to the query, type a new criteria in the New criteria 
  271. field, then click the Add button. 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 4.2. Removing a criteria ΓòÉΓòÉΓòÉ
  275.  
  276. To remove a criteria from the query, click on the expression you want to remove 
  277. in the Criteria list, then click the Remove button. 
  278.  
  279.  
  280. ΓòÉΓòÉΓòÉ 4.3. Criteria ΓòÉΓòÉΓòÉ
  281.  
  282. The Criteria list shows the criteria that are currently part of the SQL query. 
  283. Criteria describe restrictions on the rows that you want to include in the 
  284. result table. 
  285.  
  286.  
  287. ΓòÉΓòÉΓòÉ 4.4. New criteria ΓòÉΓòÉΓòÉ
  288.  
  289. Type the new aggregate function into this entry field. When you are finished, 
  290. click the Add button. Enter only one aggregate function at a time. 
  291.  
  292.  
  293. ΓòÉΓòÉΓòÉ 4.5. Remove ΓòÉΓòÉΓòÉ
  294.  
  295. Click the Remove button to remove highlighted criteria from the Criteria list. 
  296.  
  297.  
  298. ΓòÉΓòÉΓòÉ 4.6. AND ΓòÉΓòÉΓòÉ
  299.  
  300. If the And radio button is set when you click the Add button, the new criteria 
  301. will be connected to the other criteria with an AND conjunction. 
  302.  
  303.  
  304. ΓòÉΓòÉΓòÉ 4.7. OR ΓòÉΓòÉΓòÉ
  305.  
  306. If the Or radio button is set when you click the Add button, the new criteria 
  307. will be connected to the other criteria with an OR conjunction. 
  308.  
  309.  
  310. ΓòÉΓòÉΓòÉ 4.8. Add ΓòÉΓòÉΓòÉ
  311.  
  312. Click the Add button to add the new criteria to the Criteria. You must 
  313. explicitly add a new function to the list in this way for it to become part of 
  314. the SQL query. The new criteria will be linked to the existing criteria with 
  315. either the AND or OR keyword, depending on whether the AND or the OR radio 
  316. button is set. 
  317.  
  318.  
  319. ΓòÉΓòÉΓòÉ 4.9. Edit ΓòÉΓòÉΓòÉ
  320.  
  321. Click the Edit button to invoke an editor for the current criteria. The editor 
  322. makes it easy for you to build the criteria by showing you column names and 
  323. commonly used functions and operators in a calculator format. 
  324.  
  325.  
  326. ΓòÉΓòÉΓòÉ 4.10. Modify ΓòÉΓòÉΓòÉ
  327.  
  328. Click the Modify button to replace the selected criteria with the one in the 
  329. New criteria field. 
  330.  
  331.  
  332. ΓòÉΓòÉΓòÉ 5. Expression editor ΓòÉΓòÉΓòÉ
  333.  
  334. Use this page to build expressions for aggregate functions or column criteria. 
  335. Double click on a column or function name to add it to the expression. Click on 
  336. any of the calculator buttons to add the button's text to the expression. 
  337.  
  338. Help on expressions: 
  339.  
  340.    WATCOM SQL expressions 
  341.    IBM DB2/2 expressions 
  342.  
  343. Help on functions: 
  344.  
  345.    AVG() function 
  346.    COUNT() function 
  347.    MAX() function 
  348.    MIN() function 
  349.    SUM() function 
  350.    WATCOM SQL functions 
  351.    DB2/2 functions 
  352.  
  353. Window objects: 
  354.  
  355.    Expression 
  356.    Columns 
  357.    Functions 
  358.    Calculator buttons 
  359.    OK 
  360.    Clear 
  361.    Cancel 
  362.  
  363.  
  364. ΓòÉΓòÉΓòÉ 5.1. AVG() function ΓòÉΓòÉΓòÉ
  365.  
  366. Syntax: 
  367.  
  368. AVG( numeric_expression )
  369.  
  370. The AVG() function returns the average of numeric_expression for each group of 
  371. rows. If a group contains no rows, the function returns the NULL value. 
  372.  
  373.  
  374. ΓòÉΓòÉΓòÉ 5.2. COUNT() function ΓòÉΓòÉΓòÉ
  375.  
  376. Syntax: 
  377.  
  378. COUNT( * )
  379. COUNT( expression )
  380.  
  381. The first form of this function returns the number of rows in each group. The 
  382. second form returns the number of rows in each group where expression is not 
  383. the NULL value. 
  384.  
  385.  
  386. ΓòÉΓòÉΓòÉ 5.3. MAX() function ΓòÉΓòÉΓòÉ
  387.  
  388. Syntax: 
  389.  
  390. MAX( expression )
  391.  
  392. The MAX() function returns the maximum expression value found in a each group 
  393. of rows. The function returns the NULl value for groups containing no rows. 
  394.  
  395.  
  396. ΓòÉΓòÉΓòÉ 5.4. MIN() function ΓòÉΓòÉΓòÉ
  397.  
  398. Syntax: 
  399.  
  400. MIN( expression )
  401.  
  402. The MIN() function returns the minimum expression value found in a each group 
  403. of rows. The function returns the NULl value for groups containing no rows. 
  404.  
  405.  
  406. ΓòÉΓòÉΓòÉ 5.5. SUM() function ΓòÉΓòÉΓòÉ
  407.  
  408. Syntax: 
  409.  
  410. SUM( expression )
  411.  
  412. The SUM() function returns the total of expression for each group of rows. The 
  413. function returns 0 if a group contains no rows. 
  414.  
  415.  
  416. ΓòÉΓòÉΓòÉ 5.6. WATCOM SQL functions ΓòÉΓòÉΓòÉ
  417.  
  418. Click on the following topics for more information about WATCOM SQL functions: 
  419.  
  420. Expressions 
  421. Functions 
  422.  
  423.  
  424. ΓòÉΓòÉΓòÉ 5.7. IBM DB2/2 functions ΓòÉΓòÉΓòÉ
  425.  
  426. Click on the following topics for more information about IBM DB2/2 functions: 
  427.  
  428. Expressions 
  429. Column functions 
  430. Scalar functions 
  431.  
  432.  
  433. ΓòÉΓòÉΓòÉ 5.8. Expression ΓòÉΓòÉΓòÉ
  434.  
  435. The Expression entry field contains the expression that you are currently 
  436. editing. While you can type in this field directly, you can also click on the 
  437. calculator buttons and the column and function lists to add text to the entry 
  438. field. Text will is always added at the current insertion point. 
  439.  
  440.  
  441. ΓòÉΓòÉΓòÉ 5.9. Columns ΓòÉΓòÉΓòÉ
  442.  
  443. The Columns list displays the names of all columns in all selected tables. 
  444.  
  445. Double clicking on a column name adds it to the expression at the current 
  446. insertion point. If text in the Expression field is selected, double clicking 
  447. on a column name will replace the selected text. 
  448.  
  449.  
  450. ΓòÉΓòÉΓòÉ 5.10. Functions ΓòÉΓòÉΓòÉ
  451.  
  452. The Functions list displays a list of functions that are valid for the database 
  453. you are using. 
  454.  
  455. Double clicking on a function adds it to the expression at the current 
  456. insertion point. If text in the Expression field is selected, double clicking 
  457. on a function name will replace the selected text. 
  458.  
  459. Note:  Your database may support other functions that are not listed here. 
  460. Consult your database documentation for a complete list of functions. 
  461.  
  462.  
  463. ΓòÉΓòÉΓòÉ 5.11. Calculator buttons ΓòÉΓòÉΓòÉ
  464.  
  465. There are a number of calculator buttons on the expression editor window: 
  466. digits, operators, and some keywords. When you press any of these buttons, the 
  467. button text is added to the expression at the current insertion point. If text 
  468. in the Expression field is selected, pressing a calculator button will replace 
  469. the selected text. 
  470.  
  471.  
  472. ΓòÉΓòÉΓòÉ 5.12. OK button ΓòÉΓòÉΓòÉ
  473.  
  474. Pressing the OK button accepts changes made to the expression, and closes the 
  475. expression editor window. 
  476.  
  477.  
  478. ΓòÉΓòÉΓòÉ 5.13. Clear button ΓòÉΓòÉΓòÉ
  479.  
  480. Pressing the Clear button erases the contents of the Expression field. 
  481.  
  482.  
  483. ΓòÉΓòÉΓòÉ 5.14. Cancel button ΓòÉΓòÉΓòÉ
  484.  
  485. Pressing the Cancel button closes the expression editor window, and throws away 
  486. all changes that have been made to the expression. 
  487.  
  488.  
  489. ΓòÉΓòÉΓòÉ 6. Group by ΓòÉΓòÉΓòÉ
  490.  
  491. Use this page to group rows in the result table based on similar column values. 
  492. Once columns are grouped, you can then apply aggregate functions to the groups 
  493. to get meaningful results. Columns in the Grouped columns list are included in 
  494. the GROUP BY clause of the final SQL statement. 
  495.  
  496. Help for tasks: 
  497.  
  498.    Adding a column to the group list 
  499.    Removing a column from the grouped list 
  500.  
  501. Window objects: 
  502.  
  503.    Grouped columns 
  504.    Remove 
  505.    Available columns 
  506.    Add 
  507.  
  508.  
  509. ΓòÉΓòÉΓòÉ 6.1. Adding a column to the group list ΓòÉΓòÉΓòÉ
  510.  
  511. You can add a column to the Grouped columns list by doing any of the following: 
  512.  
  513. o Click on a column in the Available columns list, then click the Add button. 
  514.  
  515. o Double click on the column name in the Available columns list that you want 
  516.   to add. 
  517.  
  518. o Drag the column name you want to add from the Available columns list to the 
  519.   Grouped columns list. 
  520.  
  521.  
  522. ΓòÉΓòÉΓòÉ 6.2. Removing a column from the group list ΓòÉΓòÉΓòÉ
  523.  
  524. You can remove a column from the Grouped columns list by doing any of the 
  525. following: 
  526.  
  527. o Click on a column in the Grouped columns list, then click the Remove button. 
  528.  
  529. o Double click on the column name in the Grouped columns list that you want to 
  530.   remove. 
  531.  
  532. o Drag the column name you want to remove from the Grouped columns list to the 
  533.   Available columns list. 
  534.  
  535.  
  536. ΓòÉΓòÉΓòÉ 6.3. Grouped columns list ΓòÉΓòÉΓòÉ
  537.  
  538. The Grouped columns list contains the columns by which rows will be grouped. To 
  539. remove a column from the list, either double click on an column name, or drag 
  540. it onto the Available columns list. 
  541.  
  542.  
  543. ΓòÉΓòÉΓòÉ 6.4. Remove button ΓòÉΓòÉΓòÉ
  544.  
  545. Clicking this button removes the highlighted column names from the Grouped 
  546. columns list. 
  547.  
  548.  
  549. ΓòÉΓòÉΓòÉ 6.5. Available columns list ΓòÉΓòÉΓòÉ
  550.  
  551. The Available columns list shows the tables and columns from which you can 
  552. choose. To see a table's columns, click on the [+] symbol beside the table 
  553. name. Double click on a column name to add it to the Grouped columns list. 
  554. Double click on a table name to add all columns in that table to the Grouped 
  555. columns list. You can also drag table and column names to the Grouped columns 
  556. list. 
  557.  
  558.  
  559. ΓòÉΓòÉΓòÉ 6.6. Add button ΓòÉΓòÉΓòÉ
  560.  
  561. Clicking the Add button adds the highlighted column or table name from the 
  562. Available columns list to the Grouped columns list. 
  563.  
  564.  
  565. ΓòÉΓòÉΓòÉ 7. Having ΓòÉΓòÉΓòÉ
  566.  
  567. Use this page to assign conditions to the row groupings set up on the Group by 
  568. page. Columns in the Group condition list are included in the HAVING clause of 
  569. the final SQL statement. 
  570.  
  571. Help for tasks: 
  572.  
  573.    Adding a group condition 
  574.    Removing a group condition 
  575.  
  576. Window objects: 
  577.  
  578.    Group condition 
  579.    Remove 
  580.    Condition 
  581.    AND 
  582.    OR 
  583.    Edit 
  584.    Add 
  585.    Modify 
  586.  
  587.  
  588. ΓòÉΓòÉΓòÉ 7.1. Adding a group condition ΓòÉΓòÉΓòÉ
  589.  
  590. To add a new group condition to the query, type a new condition in the 
  591. Condition field, then click the Add button. 
  592.  
  593.  
  594. ΓòÉΓòÉΓòÉ 7.2. Removing a group condition ΓòÉΓòÉΓòÉ
  595.  
  596. To remove a group condition from the query, click on the function you want to 
  597. remove in the Group condition list, then click the Remove button. 
  598.  
  599.  
  600. ΓòÉΓòÉΓòÉ 7.3. Group condition ΓòÉΓòÉΓòÉ
  601.  
  602. The Group conditions list shows the group conditions that are currently part of 
  603. the SQL query. When you click on a condition, it is copied to the Condition 
  604. field. 
  605.  
  606.  
  607. ΓòÉΓòÉΓòÉ 7.4. Remove ΓòÉΓòÉΓòÉ
  608.  
  609. Clicking the Remove button deletes the highlighted group conditions from the 
  610. Group condition list. 
  611.  
  612.  
  613. ΓòÉΓòÉΓòÉ 7.5. Condition ΓòÉΓòÉΓòÉ
  614.  
  615. Type the new group condition into this field. When you are finished, click the 
  616. Add button. Enter only one condition at a time. 
  617.  
  618.  
  619. ΓòÉΓòÉΓòÉ 7.6. AND ΓòÉΓòÉΓòÉ
  620.  
  621. If the And radio button is set when you click the Add button, the new condition 
  622. will be connected to the other conditions with an AND conjunction. 
  623.  
  624.  
  625. ΓòÉΓòÉΓòÉ 7.7. OR ΓòÉΓòÉΓòÉ
  626.  
  627. If the Or radio button is set when you click the Add button, the new condition 
  628. will be connected to the other conditions with an OR conjunction. 
  629.  
  630.  
  631. ΓòÉΓòÉΓòÉ 7.8. Edit ΓòÉΓòÉΓòÉ
  632.  
  633. Click the Edit button to invoke an editor for the new condition. The editor 
  634. makes it easy for you to build the condition by showing you column names and 
  635. commonly used functions and operators in a calculator format. 
  636.  
  637.  
  638. ΓòÉΓòÉΓòÉ 7.9. Add ΓòÉΓòÉΓòÉ
  639.  
  640. Click the Add button to add the new condition to the Group condition list. You 
  641. must explicitly add a new condition to the list in this way for it to become 
  642. part of the SQL query. 
  643.  
  644.  
  645. ΓòÉΓòÉΓòÉ 7.10. Modify ΓòÉΓòÉΓòÉ
  646.  
  647. Click the Modify button to change the selected condition to that contained in 
  648. the Condition field. 
  649.  
  650.  
  651. ΓòÉΓòÉΓòÉ 8. Joins ΓòÉΓòÉΓòÉ
  652.  
  653. Use this page to specify how you want to join together the tables you have 
  654. selected. Information on this page is reflected in the FROM clause of the final 
  655. SQL statement. 
  656.  
  657. Help for tasks: 
  658.  
  659.    Adding a join 
  660.    Removing a join 
  661.  
  662. Window objects: 
  663.  
  664.    Joins 
  665.    Remove 
  666.    Table 1 
  667.    Role 1 
  668.    Table 2 
  669.    Role 2 
  670.    Type 
  671.    Add 
  672.    Modify 
  673.  
  674.  
  675. ΓòÉΓòÉΓòÉ 8.1. Adding a join ΓòÉΓòÉΓòÉ
  676.  
  677. To add a new join follow these steps: 
  678.  
  679.  1. Select the tables you want to join in the Table 1 and Table 2 lists. 
  680.  
  681.  2. Choose the type of join from the Type list. 
  682.  
  683.  3. Click the Add button. 
  684.  
  685. The names of the tables and the join type will be added to the Joins list. 
  686.  
  687.  
  688. ΓòÉΓòÉΓòÉ 8.2. Removing a join ΓòÉΓòÉΓòÉ
  689.  
  690. To remove a join, click on the join in the Joins list, then click the Remove 
  691. button. 
  692.  
  693.  
  694. ΓòÉΓòÉΓòÉ 8.3. Join ΓòÉΓòÉΓòÉ
  695.  
  696. The Join list displays all joins that are part of the SQL query. 
  697.  
  698.  
  699. ΓòÉΓòÉΓòÉ 8.4. Table 1 ΓòÉΓòÉΓòÉ
  700.  
  701. The Table 1 list shows the tables that have been selected for the SQL query. 
  702. Choose a table from this list when you add a new join. 
  703.  
  704.  
  705. ΓòÉΓòÉΓòÉ 8.5. Role 1 ΓòÉΓòÉΓòÉ
  706.  
  707. The Role 1 list shows role names of foreign keys. 
  708.  
  709.  
  710. ΓòÉΓòÉΓòÉ 8.6. Role 2 ΓòÉΓòÉΓòÉ
  711.  
  712. The Role 2 list shows role names of foreign keys. 
  713.  
  714.  
  715. ΓòÉΓòÉΓòÉ 8.7. Table 2 ΓòÉΓòÉΓòÉ
  716.  
  717. The Table 2 list shows the tables that have been selected for the SQL query. 
  718. Choose a table from this list when you add a new join. 
  719.  
  720.  
  721. ΓòÉΓòÉΓòÉ 8.8. Type ΓòÉΓòÉΓòÉ
  722.  
  723. The Type list shows all of the possible join types. When you are adding a new 
  724. join, you must select one of these types. 
  725.  
  726.  
  727. ΓòÉΓòÉΓòÉ 8.9. Remove ΓòÉΓòÉΓòÉ
  728.  
  729. Clicking the Remove button deletes the highlighted join from the Joins list. 
  730.  
  731.  
  732. ΓòÉΓòÉΓòÉ 8.10. Add ΓòÉΓòÉΓòÉ
  733.  
  734. Clicking the Add button adds a new join to the Joins list. In the Joins list, 
  735. you will see a new line of the form: 
  736.  
  737. table1 joinType table2
  738.  
  739. where table1 is the table name from Table 1 list, table2 is the table name from 
  740. Table 2 list, and joinType is the  type of join selected in Type list. 
  741.  
  742.  
  743. ΓòÉΓòÉΓòÉ 8.11. Modify ΓòÉΓòÉΓòÉ
  744.  
  745. Clicking the Modify button replaces the selected join with the one described in 
  746. the Table 1, Role 1, Table 2, Role 2, and Type fields. 
  747.  
  748.  
  749. ΓòÉΓòÉΓòÉ 9. Join conditions ΓòÉΓòÉΓòÉ
  750.  
  751. Use this page to specify the way in which tables should be joined. You do this 
  752. by defining an equality between columns in the two joined tables. Join 
  753. conditions are listed in the WHERE clause of the final SQL statement. 
  754.  
  755. Help for tasks: 
  756.  
  757.    Adding a join condition 
  758.    Removing a join condition 
  759.  
  760. Window objects: 
  761.  
  762.    Join 
  763.    Conditions 
  764.    Remove 
  765.    And 
  766.    Or 
  767.    New condition 
  768.    Edit 
  769.    Add 
  770.    Modify 
  771.  
  772.  
  773. ΓòÉΓòÉΓòÉ 9.1. Adding a join condition ΓòÉΓòÉΓòÉ
  774.  
  775. To add a new join condition for the selected join, enter a condition in the New 
  776. condition field, then press the Add button. 
  777.  
  778.  
  779. ΓòÉΓòÉΓòÉ 9.2. Removing a join condition ΓòÉΓòÉΓòÉ
  780.  
  781. To remove a join condition, click on the condition in the Conditions list, then 
  782. click the Remove button. 
  783.  
  784.  
  785. ΓòÉΓòÉΓòÉ 9.3. Join ΓòÉΓòÉΓòÉ
  786.  
  787. The Join list contains all joins. When you select a join, its join conditions 
  788. are shown in the Conditions list. 
  789.  
  790.  
  791. ΓòÉΓòÉΓòÉ 9.4. Conditions ΓòÉΓòÉΓòÉ
  792.  
  793. The Conditions list shows the current conditions for the selected join. When 
  794. you select a condition it is also copied into the New condition field. 
  795.  
  796.  
  797. ΓòÉΓòÉΓòÉ 9.5. Remove ΓòÉΓòÉΓòÉ
  798.  
  799. Clicking the Remove button deletes the highlighted join conditions from the 
  800. Conditions list. 
  801.  
  802.  
  803. ΓòÉΓòÉΓòÉ 9.6. And ΓòÉΓòÉΓòÉ
  804.  
  805. If the And radio button is set when you click the Add button, the new condition 
  806. will be connected to the other conditions with an AND conjunction. 
  807.  
  808.  
  809. ΓòÉΓòÉΓòÉ 9.7. Or ΓòÉΓòÉΓòÉ
  810.  
  811. If the Or radio button is set when you click the Add button, the new condition 
  812. will be connected to the other conditions with an OR conjunction. 
  813.  
  814.  
  815. ΓòÉΓòÉΓòÉ 9.8. New condition ΓòÉΓòÉΓòÉ
  816.  
  817. Type new conditions in the New condition field. You must press the Add button 
  818. to add the new condition to the query. 
  819.  
  820.  
  821. ΓòÉΓòÉΓòÉ 9.9. Edit ΓòÉΓòÉΓòÉ
  822.  
  823. Click the Edit button to invoke an editor for the new condition. The editor 
  824. makes it easy for you to build the condition by showing you column names and 
  825. commonly used functions and operators in a calculator format. 
  826.  
  827.  
  828. ΓòÉΓòÉΓòÉ 9.10. Add ΓòÉΓòÉΓòÉ
  829.  
  830. Clicking the Add button adds the new join condition to the Conditions list. 
  831.  
  832.  
  833. ΓòÉΓòÉΓòÉ 9.11. Modify ΓòÉΓòÉΓòÉ
  834.  
  835. Clicking the Modify button replaces the selected join condition with the one in 
  836. the New condition field. 
  837.  
  838.  
  839. ΓòÉΓòÉΓòÉ 10. Query editor options ΓòÉΓòÉΓòÉ
  840.  
  841. Use this dialog to configure Query editor options. 
  842.  
  843. List box font 
  844. Change font 
  845. Stay connected 
  846. Fill table list on startup 
  847. Use owner names in generated SQL 
  848. Quote owner, table, and column names 
  849. OK 
  850. Cancel 
  851. Default 
  852.  
  853.  
  854. ΓòÉΓòÉΓòÉ 10.1. List box font ΓòÉΓòÉΓòÉ
  855.  
  856. The List box font holds the name of the font that is used for all list boxes 
  857. and multiline entry fields in the Connection, Query, and SQL editors. The font 
  858. has usual VX-REXX font syntax: pointSize.fontName (eg. "10.Helv") 
  859.  
  860. To choose a new font, type in a new font string, or press the Change font 
  861. button. The default setting is <default>. 
  862.  
  863.  
  864. ΓòÉΓòÉΓòÉ 10.2. Stay connected ΓòÉΓòÉΓòÉ
  865.  
  866. Check this box if you want the Query Editor to leave the connection object 
  867. connected when the Query Editor closes. Setting this option will result in 
  868. better performance if you tend to open and close the Query Editor frequently 
  869. without changing the connection object's parameters. The default for this 
  870. option is off, meaning that the Query Editor will close the connection when the 
  871. editor closes. 
  872.  
  873.  
  874. ΓòÉΓòÉΓòÉ 10.3. Change font ΓòÉΓòÉΓòÉ
  875.  
  876. Press the Change font button to select a new list box font. A font selection 
  877. dialog will be displayed. 
  878.  
  879.  
  880. ΓòÉΓòÉΓòÉ 10.4. Fill table list on startup ΓòÉΓòÉΓòÉ
  881.  
  882. If the Fill table list on startup box is checked, the SQL editor will fill the 
  883. Available tables list with the names of all tables in the database when the SQL 
  884. editor is opened. If the box is not checked, the user must explicitly click the 
  885. Refresh list button or press the Enter key while editing the Table pattern 
  886. field to fill the Available tables list. 
  887.  
  888. If your database contains hundreds of tables, you may want to turn this option 
  889. off to reduce the SQL editor's start up time. 
  890.  
  891. By default, this box is not checked. 
  892.  
  893.  
  894. ΓòÉΓòÉΓòÉ 10.5. Use table owner names in generated SQL ΓòÉΓòÉΓòÉ
  895.  
  896. If the Use table owner names in generated SQL box is set, the SQL editor will 
  897. use fully qualified table names in the SQL SELECT statement that it generates. 
  898. A fully qualified name has the form: 
  899.  
  900. ownerName.tableName
  901.  
  902. If the box is not set, the SQL editor will not include the owner name in the 
  903. generated SQL. 
  904.  
  905. By default, this box is checked. 
  906.  
  907.  
  908. ΓòÉΓòÉΓòÉ 10.6. Quote owner, table and column names ΓòÉΓòÉΓòÉ
  909.  
  910. If the Quote owner, table, and column names box is set, the SQL editor will 
  911. enclose all table owner names, table names, and column names in quotation marks 
  912. in the SQL it generates. 
  913.  
  914. Some databases such as dBase do not accept quoted names. If you are using a 
  915. database that does not take quoted names, uncheck this box. 
  916.  
  917. By default this box is checked. 
  918.  
  919.  
  920. ΓòÉΓòÉΓòÉ 10.7. OK ΓòÉΓòÉΓòÉ
  921.  
  922. Click the OK button to save the new options and close the window. 
  923.  
  924.  
  925. ΓòÉΓòÉΓòÉ 10.8. Cancel ΓòÉΓòÉΓòÉ
  926.  
  927. Click the Cancel button to close the window without saving changes. 
  928.  
  929.  
  930. ΓòÉΓòÉΓòÉ 10.9. Default ΓòÉΓòÉΓòÉ
  931.  
  932. Click the Default button to restore the options to their default settings. 
  933. These settings are: 
  934.  
  935. o Fill the table list on startup 
  936. o Use owner names 
  937.  
  938.  
  939. ΓòÉΓòÉΓòÉ 11. Query editor ΓòÉΓòÉΓòÉ
  940.  
  941. Use the query editor to set properties of a query object. 
  942.  
  943. Window objects: 
  944.  
  945.    Query name 
  946.    Connection object 
  947.    Settings 
  948.    SQL statement 
  949.    Edit 
  950.    Load 
  951.    Save as 
  952.    Test 
  953.    No bound objects 
  954.    Bound container 
  955.    Bound text boxes 
  956.    Movement buttons 
  957.    Update buttons 
  958.    Search buttons 
  959.    OK 
  960.    Cancel 
  961.    Options 
  962.  
  963.  
  964. ΓòÉΓòÉΓòÉ 11.1. Query name ΓòÉΓòÉΓòÉ
  965.  
  966. The name of the query object is displayed in this entry field. You can change 
  967. the name by typing directly in this field. 
  968.  
  969.  
  970. ΓòÉΓòÉΓòÉ 11.2. Connection object ΓòÉΓòÉΓòÉ
  971.  
  972. Each query object must be associated with a connection object. This field shows 
  973. the currently selected connection object. To change the object, type in the 
  974. name of a new connection object or choose an item from the drop down list. 
  975.  
  976.  
  977. ΓòÉΓòÉΓòÉ 11.3. Settings ΓòÉΓòÉΓòÉ
  978.  
  979. Click the Settings button to view and edit the database specific properties of 
  980. the selected connection object. 
  981.  
  982.  
  983. ΓòÉΓòÉΓòÉ 11.4. SQL statement ΓòÉΓòÉΓòÉ
  984.  
  985. The SQL statement field shows the SQL statement that is stored in the query 
  986. object. You can type in this field directly, or can press the Edit button to 
  987. invoke the SQL editor. 
  988.  
  989.  
  990. ΓòÉΓòÉΓòÉ 11.5. Edit ΓòÉΓòÉΓòÉ
  991.  
  992. Pressing the Edit button opens the SQL editor. The SQL editor is a tool that 
  993. lets you compose and test a SQL SELECT statement. 
  994.  
  995.  
  996. ΓòÉΓòÉΓòÉ 11.6. Load ΓòÉΓòÉΓòÉ
  997.  
  998. Click the Load button to replace the current SQL SELECT statement with one 
  999. stored in a disk file. You will be prompted for the name of the file. 
  1000.  
  1001.  
  1002. ΓòÉΓòÉΓòÉ 11.7. Save as ΓòÉΓòÉΓòÉ
  1003.  
  1004. Click the Save as button to write the current SQL statement to a disk file. You 
  1005. will be prompted for the name of the file. 
  1006.  
  1007.  
  1008. ΓòÉΓòÉΓòÉ 11.8. Test ΓòÉΓòÉΓòÉ
  1009.  
  1010. Click the Test button to modify and test your SQL statement. The Query editor 
  1011. will open a resizeable window which contains the query and its results, similar 
  1012. to the Test page page. The Test window is an alternative to using the SQL 
  1013. editor. 
  1014.  
  1015.  
  1016. ΓòÉΓòÉΓòÉ 11.9. No bound objects ΓòÉΓòÉΓòÉ
  1017.  
  1018. Set the No bound objects radio button if you do not want the Query editor to 
  1019. generate any bound objects or push buttons. If this radio button is set, the 
  1020. Movement buttons, Update buttons, and Search buttons check boxes are ignored. 
  1021.  
  1022.  
  1023. ΓòÉΓòÉΓòÉ 11.10. Bound container ΓòÉΓòÉΓòÉ
  1024.  
  1025. If the Bound container button is set, a bound container will be generated on 
  1026. the same window as the query object. The container will be in detail view, and 
  1027. will show a number of rows at once. If the Update buttons box is checked, push 
  1028. buttons will also be generated. 
  1029.  
  1030.  
  1031. ΓòÉΓòÉΓòÉ 11.11. Bound text boxes ΓòÉΓòÉΓòÉ
  1032.  
  1033. If the Bound text boxes button is set, a number of bound entry fields will be 
  1034. generated on the same window as the query object. One entry field will be 
  1035. created for each column in the result table. Each field will be labeled with 
  1036. the name of the column. If the Movement buttons, Update buttons, or Search 
  1037. buttons boxes are checked, push buttons will also be generated. 
  1038.  
  1039.  
  1040. ΓòÉΓòÉΓòÉ 11.12. Movement buttons ΓòÉΓòÉΓòÉ
  1041.  
  1042. When the Movement buttons box is checked, the Query editor will automatically 
  1043. generate push buttons on the query window. The generated buttons let the user 
  1044. do the following: 
  1045.  
  1046. o Move to the first row 
  1047. o Move to the previous row 
  1048. o Move to the next row 
  1049. o Move to the last row 
  1050.  
  1051. The Movement buttons is ignored if either No bound objects or Bound container 
  1052. are set. 
  1053.  
  1054.  
  1055. ΓòÉΓòÉΓòÉ 11.13. Update buttons ΓòÉΓòÉΓòÉ
  1056.  
  1057. When the Update buttons box is checked, the Query editor will automatically 
  1058. generate push buttons on the query window. The generated buttons let the user 
  1059. do the following: 
  1060.  
  1061. o Insert a row 
  1062. o Delete a row 
  1063. o Update row information 
  1064. o Clear row information 
  1065. o Reset row information 
  1066.  
  1067. The Update buttons check box is ignored if No bound objects is set. 
  1068.  
  1069.  
  1070. ΓòÉΓòÉΓòÉ 11.14. Search buttons ΓòÉΓòÉΓòÉ
  1071.  
  1072. When the Search buttons box is checked, the Query editor will automatically 
  1073. generate push buttons on the query window. The generated buttons let the user 
  1074. do the following: 
  1075.  
  1076. o Search the database 
  1077. o Clear row information 
  1078.  
  1079. The Search buttons check box is ignored if No bound objects or Bound container 
  1080. are set. 
  1081.  
  1082.  
  1083. ΓòÉΓòÉΓòÉ 11.15. OK ΓòÉΓòÉΓòÉ
  1084.  
  1085. Click OK when the information shown in the window is complete. If the Movement 
  1086. buttons, Update buttons, or Search buttons boxes are checked, the requested 
  1087. bound objects are created. 
  1088.  
  1089.  
  1090. ΓòÉΓòÉΓòÉ 11.16. Cancel ΓòÉΓòÉΓòÉ
  1091.  
  1092. Click Cancel to throw away all changes made to the query object. 
  1093.  
  1094.  
  1095. ΓòÉΓòÉΓòÉ 11.17. Options ΓòÉΓòÉΓòÉ
  1096.  
  1097. Click the Options button to configure the Query editor. 
  1098.  
  1099.  
  1100. ΓòÉΓòÉΓòÉ 12. Sort ΓòÉΓòÉΓòÉ
  1101.  
  1102. Use this page to specify how the rows in the result table should be ordered. 
  1103. You can sort the table according to a given column (or columns). Columns in the 
  1104. Column sort order list are included in the ORDER BY clause of the SQL SELECT 
  1105. statement. 
  1106.  
  1107. Help for tasks: 
  1108.  
  1109.    Adding a column to the sort order 
  1110.    Removing a column from the sort order 
  1111.  
  1112. Window objects: 
  1113.  
  1114.    Column sort order 
  1115.    Remove 
  1116.    Available columns 
  1117.    Add 
  1118.    Add descending 
  1119.  
  1120.  
  1121. ΓòÉΓòÉΓòÉ 12.1. Adding a column to the sort order ΓòÉΓòÉΓòÉ
  1122.  
  1123. You can add a column to the sort order by doing any of the following: 
  1124.  
  1125. o Click on a column in the Available columns list, then click the Add or Add 
  1126.   descending button. 
  1127.  
  1128. o Double click on the column you want to add. By default, an ascending order is 
  1129.   assumed. 
  1130.  
  1131. o Drag the column you want to add and drop it on the Column sort order list. By 
  1132.   default, an ascending order is assumed. 
  1133.  
  1134.  
  1135. ΓòÉΓòÉΓòÉ 12.2. Removing a column from the sort order ΓòÉΓòÉΓòÉ
  1136.  
  1137. You can remove a table from the Column sort order list by doing any of the 
  1138. following: 
  1139.  
  1140. o Click on a column in the Column sort order list, then click the Remove 
  1141.   button. 
  1142.  
  1143. o Drag the table you want to remove from the Column sort order list, then drop 
  1144.   it on the Available columns list. 
  1145.  
  1146.  
  1147. ΓòÉΓòÉΓòÉ 12.3. Column sort order list ΓòÉΓòÉΓòÉ
  1148.  
  1149. The Column sort order list contains the names of the columns that will be used 
  1150. to sort the final result table. Sorting will be done on the first column in the 
  1151. list, then by the second column in the list, and so on. 
  1152.  
  1153. The arrow to the left of the column name shows the sort direction-- up means 
  1154. ascending, while down means descending. By default, sorting is done to make the 
  1155. result table ascending, but you can change the sort direction to descending by 
  1156. double clicking on a column name. 
  1157.  
  1158. You can reorder columns in the list by dragging and dropping them. 
  1159.  
  1160.  
  1161. ΓòÉΓòÉΓòÉ 12.4. Available columns ΓòÉΓòÉΓòÉ
  1162.  
  1163. The Available columns list shows the tables and columns from which you can 
  1164. choose. To see a table's columns, click on the [+] symbol beside the table 
  1165. name. Double click on a column name to add it to the Column sort order list. 
  1166. Double click on a table name to add all columns in that table to the Column 
  1167. sort order list. You can also drag table and column names to the Column sort 
  1168. order list. 
  1169.  
  1170. Note:  You can sort the result table on columns in any selected table. It is 
  1171. not necessary to select the sort column or columns on the Columns page of the 
  1172. SQL editor. 
  1173.  
  1174.  
  1175. ΓòÉΓòÉΓòÉ 12.5. Add button ΓòÉΓòÉΓòÉ
  1176.  
  1177. Click the Add button to add the highlighted columns in the Available columns 
  1178. list to the Column sort order list. The column name will appear in the Column 
  1179. sort order list with an up arrow beside it, indicating that the column will be 
  1180. sorted ascending. 
  1181.  
  1182.  
  1183. ΓòÉΓòÉΓòÉ 12.6. Add descending button ΓòÉΓòÉΓòÉ
  1184.  
  1185. Click the Add descending button to add the highlighted columns in the Available 
  1186. columns list to the Column sort order list. The column name will appear in the 
  1187. Column sort order list with an down arrow beside it, indicating that the column 
  1188. will be sorted descending. 
  1189.  
  1190.  
  1191. ΓòÉΓòÉΓòÉ 12.7. Remove button ΓòÉΓòÉΓòÉ
  1192.  
  1193. Click the Remove button to remove the highlighted columns in the Column sort 
  1194. order list. 
  1195.  
  1196.  
  1197. ΓòÉΓòÉΓòÉ 13. Test page ΓòÉΓòÉΓòÉ
  1198.  
  1199. Use this page to test out the query you have designed. The SQL corresponding to 
  1200. the selections you have made on the other pages is shown in the SQL statement 
  1201. field. The results of the query are shown in the Result table when you press 
  1202. the Test button. 
  1203.  
  1204. Window objects: 
  1205.  
  1206.    SQL statement 
  1207.    Result table 
  1208.    Test 
  1209.  
  1210.  
  1211. ΓòÉΓòÉΓòÉ 13.1. SQL statement ΓòÉΓòÉΓòÉ
  1212.  
  1213. The SQL statement shows the SQL query based on the selections you have made on 
  1214. the other notebook pages. You can edit this statement by clicking on it then 
  1215. typing. If you do modify the SQL statement in this way, your changes will be 
  1216. reflected on the other notebook pages if you turn back to them. 
  1217.  
  1218. Some parts of the SELECT statement may appear on separate lines. This is only 
  1219. for display purposes; carriage returns are removed from the actual SQL 
  1220. statement that is stored in the query object. 
  1221.  
  1222.  
  1223. ΓòÉΓòÉΓòÉ 13.2. Result table ΓòÉΓòÉΓòÉ
  1224.  
  1225. The final SQL result table is shown here when you press the Test button. While 
  1226. you cannot modify the Result table directly, you can turn back to any of the 
  1227. notebook pages to make refinements, after which you can turn back to the SQL 
  1228. page to test your query again. 
  1229.  
  1230.  
  1231. ΓòÉΓòÉΓòÉ 13.3. Test button ΓòÉΓòÉΓòÉ
  1232.  
  1233. Press the Test button to display the result table based on the query shown in 
  1234. the SQL statement field. 
  1235.  
  1236. If the query references a REXX variable, the SQL editor will prompt you for the 
  1237. variable's value before executing the SQL statement. 
  1238.  
  1239.  
  1240. ΓòÉΓòÉΓòÉ 14. Tables ΓòÉΓòÉΓòÉ
  1241.  
  1242. Use this page to select the tables you want to use in the SQL query. The 
  1243. Available tables list shows all tables in the database. The Selected tables 
  1244. shows the tables that are currently selected. Tables in the Selected tables are 
  1245. listed in the FROM clause of the SQL SELECT statement. 
  1246.  
  1247. Help for tasks: 
  1248.  
  1249.    Adding a table to the query 
  1250.    Removing a table from the query 
  1251.  
  1252. Window objects: 
  1253.  
  1254.    Selected tables 
  1255.    Remove 
  1256.    Table pattern 
  1257.    Table type 
  1258.    Available tables 
  1259.    Add 
  1260.    Refresh list 
  1261.  
  1262.  
  1263. ΓòÉΓòÉΓòÉ 14.1. Adding a table to the query ΓòÉΓòÉΓòÉ
  1264.  
  1265. You can add a table to list of selected tables by doing any of the following: 
  1266.  
  1267. o Click on a table in the Available tables list, then click the Add. 
  1268.  
  1269. o Double click on the table you want to add. 
  1270.  
  1271. o Drag the table you want to add and drop it on the Selected tables. 
  1272.  
  1273. If there are no tables in the Available tables list, you may have the Fill 
  1274. table list on startup option turned off. Try pressing the Refresh list to fill 
  1275. the table list. Note that the table list is restricted by the Table pattern 
  1276. field and the Table type selection. 
  1277.  
  1278.  
  1279. ΓòÉΓòÉΓòÉ 14.2. Removing a table from the query ΓòÉΓòÉΓòÉ
  1280.  
  1281. You can remove a table from the Selected tables list by doing any of the 
  1282. following: 
  1283.  
  1284. o Click on a table in the Selected tables list, then click the Remove button. 
  1285.  
  1286. o Drag the table you want to remove from the Selected tables list, and drop it 
  1287.   on the Available tables list. 
  1288.  
  1289.  
  1290. ΓòÉΓòÉΓòÉ 14.3. Selected tables ΓòÉΓòÉΓòÉ
  1291.  
  1292. The Selected tables list shows the tables that will be part of the SQL query. 
  1293.  
  1294.  
  1295. ΓòÉΓòÉΓòÉ 14.4. Available tables ΓòÉΓòÉΓòÉ
  1296.  
  1297. The Available tables list shows all tables in the database. You must add a 
  1298. table to the Selected tables to use it in the SQL query. 
  1299.  
  1300. Only those tables that match the pattern in the  Table pattern field are 
  1301. listed. 
  1302.  
  1303. The Available tables list is initially filled only if the Fill table list on 
  1304. startup box is set in the Query editor's Query editor options dialog. If the 
  1305. Fill table list on startup box is not set, either click the Refresh list 
  1306. button, or press Enter while editing the Table pattern field to refresh the 
  1307. list. 
  1308.  
  1309.  
  1310. ΓòÉΓòÉΓòÉ 14.5. Table pattern ΓòÉΓòÉΓòÉ
  1311.  
  1312. The Table pattern field describes the types of tables that are listed in the 
  1313. Available tables list. The form of the pattern is: 
  1314.  
  1315. tableOwner[.tableName]
  1316.  
  1317. where tableOwner is the owner name, and tableName is the name of the table. 
  1318. Both tableOwner and tableName may contain the SQL wildcard character "%". An 
  1319. owner or table name ending with a % will match any name starting with the given 
  1320. prefix. If no tableName is given, all tables for the given owner are listed. If 
  1321. neither owner nor table name are given, all tables are listed. 
  1322.  
  1323. Pressing the Enter key while in Table pattern field refills the Available 
  1324. tables list. Clicking the Refresh list also refills the list. 
  1325.  
  1326. Some examples of patterns and the tables they match: 
  1327.  
  1328. %.% 
  1329.           matches all tables 
  1330.  
  1331. admin.% 
  1332.           matches all tables owned by admin. 
  1333.  
  1334. sw% 
  1335.           matches all tables whose owners start with sw. 
  1336.  
  1337. userid.s% 
  1338.           matches tables owned by userid that also start with s. 
  1339.  
  1340. %.%ntp% 
  1341.           matches tables that contain the sequence ntp that are owned by 
  1342.           anyone. 
  1343.  
  1344.  
  1345. ΓòÉΓòÉΓòÉ 14.6. Table type ΓòÉΓòÉΓòÉ
  1346.  
  1347. The Table type field shows the types of fields that are listed in the Available 
  1348. tables list. Tables are shown by default, although you can change this setting 
  1349. to show system tables, views, or system views. 
  1350.  
  1351. Changing this field automatically refreshes the Available tables list. 
  1352.  
  1353.  
  1354. ΓòÉΓòÉΓòÉ 14.7. Add button ΓòÉΓòÉΓòÉ
  1355.  
  1356. Click the Add button to add the highlighted tables in the Available tables list 
  1357. to the Selected tables. 
  1358.  
  1359.  
  1360. ΓòÉΓòÉΓòÉ 14.8. Remove button ΓòÉΓòÉΓòÉ
  1361.  
  1362. Click the Remove button to remove the highlighted tables in the Selected 
  1363. tables. 
  1364.  
  1365.  
  1366. ΓòÉΓòÉΓòÉ 14.9. Refresh list ΓòÉΓòÉΓòÉ
  1367.  
  1368. Click the Refresh list button to refill the Available tables list with tables 
  1369. that match the pattern in the Table pattern field. Pressing the Enter key while 
  1370. editing the Table pattern field or changing the Table type setting also 
  1371. refreshes the list. 
  1372.  
  1373. If you want the list to be filled automatically when you start the SQL editor, 
  1374. check the Fill table list on startup box on the Query editor options dialog. 
  1375.  
  1376.  
  1377. ΓòÉΓòÉΓòÉ 15. Test SQL ΓòÉΓòÉΓòÉ
  1378.  
  1379. Use the Test SQL window to test and modify your SQL query. 
  1380.  
  1381. Window objects: 
  1382.  
  1383.    SQL statement 
  1384.    Test 
  1385.    Results 
  1386.    OK 
  1387.    Cancel 
  1388.  
  1389. Menu items: 
  1390.  
  1391.    Load 
  1392.    Save as 
  1393.  
  1394.  
  1395. ΓòÉΓòÉΓòÉ 15.1. SQL statement ΓòÉΓòÉΓòÉ
  1396.  
  1397. The SQL statement field shows the SQL SELECT statement that is stored in the 
  1398. query object. You can change the statement by typing in this field. You are 
  1399. free to split the statement over a number of lines; the Query editor will 
  1400. remove any embedded carriage return and line feed characters before trying to 
  1401. execute the statement. 
  1402.  
  1403.  
  1404. ΓòÉΓòÉΓòÉ 15.2. Test ΓòÉΓòÉΓòÉ
  1405.  
  1406. Click the Test button to execute the SQL statement. The results will be 
  1407. displayed in the Results table. If the SQL statement refers to any REXX 
  1408. variables, you will be prompted to give values for them. 
  1409.  
  1410.  
  1411. ΓòÉΓòÉΓòÉ 15.3. Results ΓòÉΓòÉΓòÉ
  1412.  
  1413. The Results table displays the results of executing the SQL statement. The 
  1414. table is updated only when you click the Test button. 
  1415.  
  1416. The Results table is read only. 
  1417.  
  1418.  
  1419. ΓòÉΓòÉΓòÉ 15.4. OK ΓòÉΓòÉΓòÉ
  1420.  
  1421. Click the OK button to close the window and keep the SQL statement. 
  1422.  
  1423.  
  1424. ΓòÉΓòÉΓòÉ 15.5. Cancel ΓòÉΓòÉΓòÉ
  1425.  
  1426. Click the Cancel button to close the window and throw away any changes you have 
  1427. made to the SQL statement in this window. 
  1428.  
  1429.  
  1430. ΓòÉΓòÉΓòÉ 15.6. Load ΓòÉΓòÉΓòÉ
  1431.  
  1432. Choose the Load menu item to replace the contents of the SQL statement field 
  1433. with the contents of a file. 
  1434.  
  1435.  
  1436. ΓòÉΓòÉΓòÉ 15.7. Save as ΓòÉΓòÉΓòÉ
  1437.  
  1438. Choose the Save as menu item to copy the contents of the SQL statement field to 
  1439. a file.