home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 25 / nopv25.iso / 040A / SQLEXP.ZIP / README.TXT < prev    next >
Encoding:
Text File  |  1997-01-29  |  11.1 KB  |  326 lines

  1. Welcome to the Beta of SQL Express, the new and faster way to build SQL
  2. statements in Delphi.
  3.  
  4. -----------------
  5. Table of Contents
  6. -----------------
  7.  
  8. 1.  Advantages
  9. 2.  Installation
  10. 3.  Bugs and suggestions
  11. 4.  SQL Express
  12. 5.  Small tutorial
  13. 6.  Not yet supported
  14. 7.  Order and Availability
  15.  
  16.  
  17.  
  18.  
  19. 1.  Advantages
  20.  
  21.     Modeless - SQL Express is modeless.  You can work in SQL Express
  22.                and the rest of Delphi at the same time.
  23.  
  24.     Switch databases - You can easily change databases in SQL Express
  25.                        without having to get out and come back in.
  26.  
  27.     Parameters - Add/Edit your parameters in the same window you
  28.                  design your SQL statements.
  29.  
  30.     DataType - You know longer have to be bothered with setting the
  31.                DataType for the Params property in TQuery.
  32.  
  33.     Typing - The only typing you will have to do is for the values and
  34.              parameter names.  Click, Click, Click and you statement is
  35.              done.
  36.  
  37.  
  38. 2.  Installation
  39.  
  40. Simply place all files in a directory under Delphi and install the
  41. SQLEXPR.PAS file into Delphi 2.0 thru the Component/Install menu item.
  42. Go to the SQL property of TQuery and that is it.
  43.  
  44.  
  45. * * IMPORT NOTE:  This is limited use BETA.  It will expire after 99 times.
  46.                   At that point you will need to uninstall SQLEXPR from
  47.                   Delphi.
  48.  
  49. Start Beta testing.
  50.  
  51.  
  52. 3.  Bugs and Suggestions
  53.  
  54.     Please report any bugs and suggestions to my internet mail address
  55.     lewiskr@airmail.net.
  56.  
  57.  
  58. 4.  SQL Express
  59.  
  60.     SQL Express is divided into 8 tabs and each are described below:
  61.  
  62.     a.  Query:
  63.  
  64.         This tab display 4 panel views to work with.
  65.  
  66.         I.  The top left panel with the drop down is simply for information
  67.         about the database you select in the combo box.  After selecting a
  68.         database a list of tables will appear in the listbox below the combo
  69.         box.
  70.  
  71.         Note:  Double clicking on a table name will build a Quick select all
  72.         statement for that table.
  73.  
  74.           Example:  SELECT * FROM EMPLOYEE (From IBLOCAL)
  75.  
  76.         II.  The top right text window is for entering SQL statement manually.
  77.         Fell free to enter SQL statements in this window and press the
  78.         Execute button (button with a > arrow glyph).
  79.  
  80.         III.  The middle panel holds several buttons to work with and several
  81.         should be very familiar.
  82.  
  83.         Check button - Accept and close the form.
  84.  
  85.         X button - Cancel any changes and close the form.
  86.  
  87.         Apply button - Apply current changes to the TQuery component.
  88.  
  89.         Navigator button - Used for navigating and editing the records
  90.                            retrieved from the SQL statement above.
  91.                            (Note:  If you are working with a SQL database like
  92.                                    IBLOCAL you may need to select Request Live
  93.                                    under the options menu.  Also certain types
  94.                                    of statement will not be editable such as
  95.                                    statements linked and ordered).
  96.  
  97.  
  98.         Execute SQL Statement -  Execute the current SQL statement above.
  99.  
  100.         Get SQL - Build the SQL statement created from the remaining tabs in
  101.                   SQL Express.
  102.  
  103.                   Note:  Also in Options menu you can have a statement Run
  104.                          Automatically as well as replace the SQL statement
  105.                          without confirming.
  106.  
  107.         Restore - Restore will restore SQL Express to the previous
  108.                   applied contents from TQeury.
  109.  
  110.         IV.  The bottom grid is the result set of a SELECT statement.  Click
  111.              Execute SQL Statement to execute the current SQL statement above.
  112.  
  113.              You can edit the contents depending on the query performed and the
  114.              database you are connected to.  The navigator buttons will reflect
  115.              what is possible.
  116.  
  117.     b.  Joins:
  118.  
  119.         The joins tab starts off the SQL statement by selecting one or more table
  120.         to create a valid SQL statement.
  121.  
  122.         Table 1 list box will always be the starting point in building a SQL statement.
  123.  
  124.         To join two tables together simply click on a table in Table1 listbox and a
  125.         table in Table2 listbox and select the two key fields that will be the link
  126.         between the two tables and either double click in either fields list or
  127.         click the Joins >> button create the join.  Joins are created with a type of
  128.         Standard as show in the Join Type listbox.  To change the type simply click on
  129.         the join in the Selected Joins listbox and click on the desired join type in
  130.         the Join Type listbox.
  131.  
  132.         Once you have selected one or more tables you can now continue with the
  133.         rest of the tables to build your statement.
  134.  
  135.         Alias Names:
  136.  
  137.         Simply click on the table name and enter the alias name and press <Enter> to
  138.         accept the name or exit from the text box.
  139.  
  140.     c.  Select:
  141.  
  142.         The select table is where fields will be selected as part of the fields that
  143.         will be part of the result set.
  144.  
  145.         Click on the table name and select fields to be added to the Selected
  146.         Fields list.
  147.  
  148.           Note:  Double click on the table name will add all fields for that table
  149.                  to the list.
  150.  
  151.         Aggregate Fields:
  152.  
  153.         Simply select the fields you wish to be an aggregate and click on any of the
  154.         Aggregate buttons and it will be added to the list.
  155.  
  156.           Note:  Adding an aggregate to the list with fields will automatically turn
  157.                  on Group By in the Group By tab and is mandatory for the statement.
  158.  
  159.  
  160.     d.  Where:
  161.  
  162.         The where tab is exactly what it says.  Here you will select fields and build
  163.         expressions for the WHERE part of the SQL statement.  Click on the table and
  164.         field to place an expression on it.  Once you select both the Expression,
  165.         AND, NOT, OR... and Sort listboxes will be enabled.  The default expression
  166.         will always be = (Equals) and the caret will be sitting in the Value text
  167.         box.  Simply enter the value you wish to be apart of the expression and you
  168.         will see it appear in the Selected Fields listbox.
  169.  
  170.         Example:  (EMPLOYEE.FIRST_NAME='Kenneth')<'Kenneth'>
  171.  
  172.         I.  Expression listbox:
  173.  
  174.           LIKE - The LIKE expression will display the LIKE group box to assign
  175.                  wildcards to the value.
  176.           BETWEEN - The BETWEEN expression will display a BETWEEN group box to
  177.                     edit the between values.
  178.           IN - The IN expression will display the IN Group box for editing the
  179.                IN values.
  180.  
  181.           IS NULL and IS NOT NULL - Are used for checking null values and do not
  182.                                     have editable values.
  183.  
  184.         II.  AND, NOT, OR...:
  185.  
  186.              Select AND, NOT, OR to be apart of the SQL statement.
  187.  
  188.         III.  Sort:
  189.  
  190.               Select fields to be part of the ORDER BY part of the SQL
  191.               statement.  Once you select fields for ascending or
  192.               descending these fields will appear in the Order By Tab.
  193.  
  194.         Parameters:
  195.  
  196.         Parameter are edited in the same manner as regular values except
  197.         you cannot add spaces or invalid characters.  Click on the Edit
  198.         Params check box to edit between Values and Parameters.  That's it
  199.         SQL Express takes care of the rest in TQuery.
  200.  
  201.     e: Aggregate Fields:
  202.  
  203.        Fields that are added in the Select tab as aggregate fields can be
  204.        modified in this tab.  Simply click on the field name and you
  205.        can change the properties of an aggregate field in the other
  206.        list boxes of this tab.
  207.  
  208.        Aggregate:
  209.  
  210.          This listbox allow you to change any aggregate of a field on the
  211.          fly.  Aggregate support for each type of aggregate done through
  212.          the listbox below the Aggregate listbox.
  213.  
  214.          Note: Only one field can be Count(*) aggregate in a SQL statement.
  215.  
  216.     f:  Group By:
  217.  
  218.         Group by is exactly the same as the Where tab except only the fields
  219.         selected in the Select Tab will show up in this list.  Here they
  220.         have the same capabilities of the Where tab but also allows the order
  221.         of presendence to be set for the fields.
  222.  
  223.  
  224.     g:  Order By:
  225.  
  226.         The order by tab allows you to set the order presedence that will
  227.         be used in the ORDER BY part of the SQL statement.
  228.  
  229.  
  230.     h:  SQL Preview:
  231.  
  232.         Click on this tab will preview what the SQL Statement that will be
  233.         built from editing in the Joins to Order By tabs.
  234.  
  235.         Note:  Get SQL in the Query Tab performs the same action and places
  236.         this SQL statement into the memo box in that tab.
  237.  
  238. 5.  Small tutorial.
  239.  
  240.     I will now take you into a short but sweet session of the power of
  241.     SQL Express.
  242.  
  243.     STEP 1:  Select IBLOCAL from the Database Names combo box.
  244.              (Password required 'masterkey')
  245.  
  246.     STEP 2:  Click on Joins tab and select the EMPLOYEE table in the Tables 1
  247.              listbox.  Enter E as the alias name for EMPLOYEE.
  248.  
  249.     STEP 3:  Click on the DEPARTMENT table in Tables 2 listbox.  Enter D
  250.              as the alias name for DEPARTMENT.
  251.  
  252.     STEP 4:  Click on D.DEPT_NO field in both field list boxes and click
  253.              Join >> button.
  254.  
  255.     STEP 5:  Select INNER as the Join Type.
  256.  
  257.     STEP 6:  Click on the Select Tab.  Double click the EMPLOYEE table to
  258.              add all fields from EMPLOYEE table.  Click on E.EMP_NO and click
  259.              on the COUNT aggregate.  Double click on the DEPARTMENT table.
  260.  
  261.     STEP 7:  Click on the Where Tab and select EMPLOYEE and click on the
  262.              E.FIRST_NAME field.  Enter the letter K in the value text box.
  263.  
  264.     STEP 8:  Click on the LIKE expression.  Now click on the Edit Params
  265.              check box and enter the word AFirst and press the Enter Key.
  266.  
  267.     STEP 9:  Click on E.FIRST_NAME and select Ascending in the Sort By
  268.              listbox.  Do the same for E.LAST_NAME field.
  269.  
  270.     STEP 10: Now go to the Aggregate Fields Tab and click on E.EMP_NO and
  271.              enter EmpCount as the AS field name and press the Enter Key.
  272.  
  273.     STEP 11: Now go to the Group By Tab and click on the D.DEPARTMENT field
  274.              and click the LIKE expression and enter Co.  Click on the
  275.              Edit Params checkbox and enter ADept and press the Enter Key.
  276.  
  277.     STEP 12: Click on the Order By Tab and click on E.LAST_NAME and click
  278.              the Move Up button.
  279.  
  280.     STEP 13: Click the SQL Preview Tab to preview the entire SQL Statement.
  281.  
  282.     STEP 14: Click on the Query Tab and click the Get SQL button.
  283.  
  284.     STEP 15: Congratulations on your first SQL Express experience.
  285.  
  286. 6.  Not yet support
  287.  
  288.     Multiple LIKE's, BETWEEN's and computed fields will be supported
  289.     in the final release.
  290.  
  291. 7.  Order and Availability
  292.  
  293.     Check out our web site for order and availability or call
  294.     at 1-888-OOPSOFT.
  295.  
  296.  
  297.  
  298. OOPSoft, Inc.
  299. HTTP://WWW.OOPSOFT.COM
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.              
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.         
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.