home *** CD-ROM | disk | FTP | other *** search
/ PC Treasures, Inc. / pctreasures.mdf / WINDOWS / adabas / f_0001 / env / query.enh < prev    next >
Text File  |  1999-11-01  |  28KB  |  378 lines

  1. ENG|07          |     0     QUERY.enh   10.05.01   1998-04-24
  2. ENG|07          |     1|  |
  3. ENG|07          |     3|  |       O V E R V I E W   O N   A V A I L A B L E   I N F O R M A T I O N
  4. ENG|07          |     6| I|            ##0702  QUERY   - functions
  5. ENG|07          |     7| I|            ##08  REPORT  - functions
  6. ENG|07          |     8| I|            ##09  SQL     - statements
  7. ENG|07          |     9|RI|            ##04  EDIT    - functions
  8. ENG|0702        |     1|  |
  9. ENG|0702        |     3|  |       Q U E R Y   F U N C T I O N S :
  10. ENG|0702        |     6| M|            #01  command^history
  11. ENG|0702        |     7| M|            #02  stored^commands
  12. ENG|0702        |     8| M|            #03  preparing^reports
  13. ENG|0702        |     9| M|            #06  CROSSTAB^function
  14. ENG|0702        |    10|RM|            #05  other^statements
  15. ENG|070201      |     1|  |
  16. ENG|070201      |     3|  |       C O M M A N D   H I S T O R Y :
  17. ENG|070201      |     6| M|            #01 NEXT
  18. ENG|070201      |     7| M|            #02 PREV
  19. ENG|070201      |     8|RM|            #03 SAVE
  20. ENG|07020101    |     1|  |
  21. ENG|07020101    |     3|  |       N E X T   command :
  22. ENG|07020101    |     5|  |            Fetches the next command from the history.
  23. ENG|07020101    |     7|  |            SYNTAX :   NEXT
  24. ENG|07020101    |     9|  |            NEXT  and  PREV  allow  scrolling  in the temporary command
  25. ENG|07020101    |    10|R |            history.
  26. ENG|07020102    |     1|  |
  27. ENG|07020102    |     3|  |       P R E V   command :
  28. ENG|07020102    |     5|  |            Fetches the previous command from the history.
  29. ENG|07020102    |     7|  |            SYNTAX :  PREV
  30. ENG|07020102    |     9|  |            NEXT and PREV allow  scrolling  in  the  temporary  command
  31. ENG|07020102    |    10|R |            history.
  32. ENG|07020103    |     1|  |
  33. ENG|07020103    |     3|  |       S A V E   command :
  34. ENG|07020103    |     5|  |            Stores the command currently displayed in the input area in
  35. ENG|07020103    |     6|  |            the command history.
  36. ENG|07020103    |     8|  |            SYNTAX :  SAVE
  37. ENG|07020103    |    10|RI|            The current command is not executed in contrast to ##07020505RUN.
  38. ENG|070202      |     1|  |
  39. ENG|070202      |     3|  |       S T O R E D   C O M M A N D S :
  40. ENG|070202      |     6| M|            #01 STORE
  41. ENG|070202      |     7| M|            #02 DELETE
  42. ENG|070202      |     8| M|            #03 COPY
  43. ENG|070202      |     9| M|            #04 GRANT
  44. ENG|070202      |    10| M|            #05 REVOKE
  45. ENG|070202      |    11| M|            #06 EXPORT
  46. ENG|070202      |    12| M|            #07 IMPORT
  47. ENG|070202      |    13| M|            #08 LIST
  48. ENG|070202      |    14|RM|            #09 EDIT
  49. ENG|07020201    |     1|  |
  50. ENG|07020201    |     3|  |       S T O R E   command :
  51. ENG|07020201    |     5|  |            Permanently  stores  the  contents of the input area with a
  52. ENG|07020201    |     6|  |            command name.
  53. ENG|07020201    |     8|  |            SYNTAX :  STORE  <command_name>  [REPLACE]
  54. ENG|07020201    |    10|  |            If  the  REPLACE  option  is  specified,  the  new  command
  55. ENG|07020201    |    11|  |            replaces  any  command  which  may  already exist with this
  56. ENG|07020201    |    12|  |            name.
  57. ENG|07020201    |    14|  |            If the command name is to contain lower  case  letters,  it
  58. ENG|07020201    |    15|  |            must be enclosed in double quotes.
  59. ENG|07020201    |    17|SI|            An  existing command which was selected from the ##07020208LIST^menu,
  60. ENG|07020201    |    19|  |            then displayed and modified in the input form by  means  of
  61. ENG|07020201    |    20| I|            ##07020209EDIT, can be stored by means of the command
  62. ENG|07020201    |    21|  |               STORE = [REPLACE]
  63. ENG|07020201    |    22|  |            For  =  the  current  command  name is inserted. REPLACE is
  64. ENG|07020201    |    23|  |            obvious; therefore it need not be specified.
  65. ENG|07020201    |    25|  |            &n or %n in the  input  area  are  interpreted  as  command
  66. ENG|07020201    |    26|  |            parameters  and  are  replaced  by  current parameters when
  67. ENG|07020201    |    27|  |            calling (RUN).
  68. ENG|07020201    |    29|  |            example of a stored command :
  69. ENG|07020201    |    31|  |            /* comment : customer list ordered according to names
  70. ENG|07020201    |    32|  |            SELECT cno, name, city, account
  71. ENG|07020201    |    33|  |                   FROM customer
  72. ENG|07020201    |    34|  |                   WHERE city = '&1'
  73. ENG|07020201    |    35|S |                   ORDER BY name
  74. ENG|07020201    |    37|  |            REPORT
  75. ENG|07020201    |    38| I|                   ##0829TTITLE ' customer in &1 '
  76. ENG|07020201    |    39| I|                   ##0817SEP ' '
  77. ENG|07020201    |    40| I|                   ##0831PRINT   &2
  78. ENG|07020201    |    42|  |            store with :    STORE customer_report
  79. ENG|07020201    |    44|R |            call e.g. with :  RUN   customer_report 'Berlin' 3
  80. ENG|07020202    |     1|  |
  81. ENG|07020202    |     3|  |       D E L E T E   command :
  82. ENG|07020202    |     5|  |            Permanently deletes stored commands.
  83. ENG|07020202    |     7|  |            SYNTAX :  DELETE <command_name>
  84. ENG|07020202    |     9|  |            Only the owner of a stored command may delete it.
  85. ENG|07020202    |    11|  |            Call privileges for this command are deleted as well.
  86. ENG|07020202    |    13|R |            DELETE * deletes all stored commands of your own.
  87. ENG|07020203    |     1|  |
  88. ENG|07020203    |     3|  |       C O P Y   command :
  89. ENG|07020203    |     5|  |            Copies a stored command.
  90. ENG|07020203    |     7|  |            SYNTAX :  COPY [<owner>.]<command_name> <new_name>
  91. ENG|07020203    |     9| I|            A command acquired via ##07020204GRANT can be made a command of  your
  92. ENG|07020203    |    10|  |            own  by  copying  it  by  means  of COPY, providing you are
  93. ENG|07020203    |    11|  |            RESOURCE or DBA user. COPY safeguards the  command  against
  94. ENG|07020203    |    12| I|            being  withdrawn by the owner via ##07020205REVOKE. Also own commands
  95. ENG|07020203    |    13|R |            may be copied.
  96. ENG|07020204    |     1|  |
  97. ENG|07020204    |     3|  |       G R A N T   command :
  98. ENG|07020204    |     5|  |            Assigns the call privilege for a stored command to  another
  99. ENG|07020204    |     6|  |            user.
  100. ENG|07020204    |     8|  |            SYNTAX :  GRANT <command_name> [TO] <user_name>
  101. ENG|07020204    |    10|  |            The  privilege  can  only  be  granted (and revoked) by the
  102. ENG|07020204    |    11|  |            owner of the command.
  103. ENG|07020204    |    13|  |            If a user name is specified, the user  concerned  gets  the
  104. ENG|07020204    |    14|R |            explicit call privilege.
  105. ENG|07020205    |     1|  |
  106. ENG|07020205    |     3|  |       R E V O K E   command :
  107. ENG|07020205    |     5|  |            Revokes  the  call  privilege  for  a  stored  command from
  108. ENG|07020205    |     6|  |            another user.
  109. ENG|07020205    |     8|  |            SYNTAX :  REVOKE <command_name> [FROM] <user_name> | PUBLIC
  110. ENG|07020205    |    10|  |            Only the owner of the command may  grant  and  revoke  this
  111. ENG|07020205    |    11|  |            privilege.
  112. ENG|07020205    |    13|  |            If  a  user  is specified, this one loses the explicit call
  113. ENG|07020205    |    14|R |            privilege.
  114. ENG|07020206    |     1|  |
  115. ENG|07020206    |     3|  |       E X P O R T   command :
  116. ENG|07020206    |     5|  |            Extracts stored commands into a file.
  117. ENG|07020206    |     7|  |            SYNTAX :  EXPORT [<command_name>] <file_identifier>
  118. ENG|07020206    |     9|  |            If no command name is specified,  all  stored  commands  of
  119. ENG|07020206    |    10|  |            your  own  are  written into the specified file under their
  120. ENG|07020206    |    11|  |            names.
  121. ENG|07020206    |    13|  |            If command names  are  specified  which  may  also  contain
  122. ENG|07020206    |    14|  |            wildcard  arguments  (*,  ?),  all commands which match the
  123. ENG|07020206    |    15|  |            pattern are exported to the file.
  124. ENG|07020206    |    17|S |            examples:
  125. ENG|07020206    |    19|  |            EXPORT  command.fil
  126. ENG|07020206    |    20|  |            EXPORT  t* command.fil
  127. ENG|07020206    |    21|R |            EXPORT  rep??? command.fil
  128. ENG|07020207    |     1|  |
  129. ENG|07020207    |     3|  |       I M P O R T   command :
  130. ENG|07020207    |     5|  |            Loads named commands from a file into the database.
  131. ENG|07020207    |     7|  |            SYNTAX :  IMPORT  <file identifier>
  132. ENG|07020207    |     9|  |            The  file  to  be  loaded  contains  a  sequence  of  named
  133. ENG|07020207    |    10|  |            commands.
  134. ENG|07020207    |    12|  |            The  first  line  of  each  command consists of the keyword
  135. ENG|07020207    |    13|  |            'COMMAND' followed by the command name which  may  be  used
  136. ENG|07020207    |    14|  |            for calling it.
  137. ENG|07020207    |    16| I|            ##07020204GRANT  commands  giving  other users call privileges can be
  138. ENG|07020207    |    17|S |            specified at the end of the file, separated by the  keyword
  139. ENG|07020207    |    19|  |            'USERPRIV'.
  140. ENG|07020207    |    21|  |            example:
  141. ENG|07020207    |    23|  |                    COMMAND  customerreport
  142. ENG|07020207    |    24|  |                             select * from customer
  143. ENG|07020207    |    25| I|                             ##07020301REPORT
  144. ENG|07020207    |    26| I|                             ##0819TOTAL AVG account
  145. ENG|07020207    |    27| I|                             ##0814WIDTH   1 10
  146. ENG|07020207    |    28| I|                             ##0815EXCLUDE 2
  147. ENG|07020207    |    29|  |                    COMMAND  hotellist
  148. ENG|07020207    |    30|  |                             select * from hotel
  149. ENG|07020207    |    31| I|                             ##07020301REPORT
  150. ENG|07020207    |    32| I|                             ##0831PRINT ONLY
  151. ENG|07020207    |    33|  |                    USERPRIV
  152. ENG|07020207    |    34|RI|                             ##07020204GRANT hotellist TO Miller
  153. ENG|07020208    |     1|  |
  154. ENG|07020208    |     3|  |       L I S T   command :
  155. ENG|07020208    |     5|  |            Displays the stored commands.
  156. ENG|07020208    |     7|  |            SYNTAX :  LIST  [<owner>.<command_name>]
  157. ENG|07020208    |     9|  |            LIST  without  parameters  displays  a  list  of all stored
  158. ENG|07020208    |    10|  |            commands available.
  159. ENG|07020208    |    12|  |            LIST with command name specifications displays  the  stored
  160. ENG|07020208    |    13|  |            command  on  the  screen.  If  <owner>  or  <command  name>
  161. ENG|07020208    |    14|  |            contains an '*', '?',  or  '%',  a  subset  of  the  stored
  162. ENG|07020208    |    15|  |            commands which are available is listed (see examples).
  163. ENG|07020208    |    17|S |            examples  :  LIST *      lists all the names of the user's own
  164. ENG|07020208    |    19|  |                                     stored commands
  165. ENG|07020208    |    20|  |                         LIST M*     lists all the names of the user's own
  166. ENG|07020208    |    21|  |                                     stored commands beginning with 'M'
  167. ENG|07020208    |    22|  |                         LIST *S*    lists all the names of the user's own
  168. ENG|07020208    |    23|  |                                     stored commands containing an 'S'
  169. ENG|07020208    |    24|  |                         LIST M???    lists all the names of the user's own
  170. ENG|07020208    |    25|  |                                     stored commands which begin with an 'M'
  171. ENG|07020208    |    26|  |                                     and are exactly three characters long
  172. ENG|07020208    |    27|  |                         LIST *.*    lists all the names of the stored
  173. ENG|07020208    |    28|  |                                     comands for which the user has got
  174. ENG|07020208    |    29|  |                                     the call privilege (foreign commands)
  175. ENG|07020208    |    30|  |                         LIST M*.S*  lists all the names of the foreign
  176. ENG|07020208    |    31|  |                                     commands having user names beginning
  177. ENG|07020208    |    32|  |                                     with 'M' and command names beginning
  178. ENG|07020208    |    33|R |                                     with 'S'
  179. ENG|07020209    |     1|  |
  180. ENG|07020209    |     3|  |       E D I T   command :
  181. ENG|07020209    |     5|  |            Displays the input area from the LIST mode.
  182. ENG|07020209    |     7|  |            SYNTAX :  EDIT [<owner>.<command name>]
  183. ENG|07020209    |     9|  |            EDIT without parameters displays an empty input form.
  184. ENG|07020209    |    11|  |            EDIT  with  command  name specification displays the stored
  185. ENG|07020209    |    12|R |            command on the screen.
  186. ENG|070203      |     1|  |
  187. ENG|070203      |     3|  |       P R E P A R I N G   R E P O R T :
  188. ENG|070203      |     5| M|            #01 REPORT
  189. ENG|070203      |     6| M|            #02 REPORT OFF
  190. ENG|070203      |     7| M|            #03 REPORT ONLY
  191. ENG|070203      |     8|RM|            #04 REPORT <name of a result set>
  192. ENG|07020301    |     1|  |
  193. ENG|07020301    |     3|  |       R E P O R T   command :
  194. ENG|07020301    |     5|  |            Allows REPORT commands be formulated already in  the  input
  195. ENG|07020301    |     6|  |            area, together with the SELECT statement.
  196. ENG|07020301    |     8|  |            SYNTAX :  <SELECT statement>
  197. ENG|07020301    |     9|  |                      REPORT
  198. ENG|07020301    |    10|  |                         <report command>
  199. ENG|07020301    |    11|  |                         [<report command>]...
  200. ENG|07020301    |    13|  |            Each  line of the edit form placed after the keyword REPORT
  201. ENG|07020301    |    14|R |            is treated like a REPORT command line.
  202. ENG|07020302    |     1|  |
  203. ENG|07020302    |     3|  |       R E P O R T   O F F   command :
  204. ENG|07020302    |     5|  |            Suppresses the display of results for SELECT statements.
  205. ENG|07020302    |     7|  |            SYNTAX :  REPORT OFF
  206. ENG|07020302    |     9|  |            If the option OFF is specified after  the  keyword  REPORT,
  207. ENG|07020302    |    10|  |            the  SELECT  statement  is  executed, but the result is not
  208. ENG|07020302    |    11|  |            output in tabular format. Thus  temporary  results  can  be
  209. ENG|07020302    |    12|R |            generated, only having displayed the desired total result.
  210. ENG|07020303    |     1|  |
  211. ENG|07020303    |     3|  |       R E P O R T   O N L Y   command :
  212. ENG|07020303    |     5|  |            Displays the last result without reexecuting the SELECT.
  213. ENG|07020303    |     7|  |            SYNTAX :  REPORT ONLY
  214. ENG|07020303    |     9|  |            If  the  option ONLY is specified after the keyword REPORT,
  215. ENG|07020303    |    10|  |            then a previous SELECT  statement  which  might  have  been
  216. ENG|07020303    |    11|  |            specified  is  not  executed, but the report is constructed
  217. ENG|07020303    |    12|  |            from the result table  generated  most  recently.  By  this
  218. ENG|07020303    |    13|  |            means  it  is possible to correct incorrect REPORT commands
  219. ENG|07020303    |    14|  |            without having to wait again for the  result  of  a  SELECT
  220. ENG|07020303    |    15|R |            whose exeuction would take a long time.
  221. ENG|07020304    |     1|  |
  222. ENG|07020304    |     3|  |       R E P O R T   <name>   command :
  223. ENG|07020304    |     5|  |            Displays the result set generated with the <name>.
  224. ENG|07020304    |     7|  |            SYNTAX :  REPORT <name of a result set>
  225. ENG|07020304    |     9|  |            If  the name of a result set is specified after the keyword
  226. ENG|07020304    |    10|  |            REPORT, then a previous SELECT statement which  might  have
  227. ENG|07020304    |    11|  |            been   specified   is  not  executed,  but  the  report  is
  228. ENG|07020304    |    12|  |            constructed by using the result set name. By this means  it
  229. ENG|07020304    |    13|  |            is possible to generate different REPORTs without having to
  230. ENG|07020304    |    14|  |            wait again for the result of a SELECT whose execution would
  231. ENG|07020304    |    15|R |            take a long time.
  232. ENG|070205      |     1|  |
  233. ENG|070205      |     3|  |       O T H E R   C O M M A N D S :
  234. ENG|070205      |     4| M|            #01 SET
  235. ENG|070205      |     5| M|            #02 RESET
  236. ENG|070205      |     6| M|            #03 HELP
  237. ENG|070205      |     7| M|            #04 EXIT
  238. ENG|070205      |     8| M|            #05 RUN
  239. ENG|070205      |     9| M|            #06 USE
  240. ENG|070205      |    10| M|            #07 SQLMODE
  241. ENG|070205      |    11| M|            #08 SQLTIME
  242. ENG|070205      |    12|RM|            #09 DATE
  243. ENG|07020501    |     1|  |
  244. ENG|07020501    |     3|  |       S E T   command :
  245. ENG|07020501    |     5|  |            Displays the control parameters.
  246. ENG|07020501    |     7|  |            SYNTAX :  SET
  247. ENG|07020501    |     9|  |            The  SET  command enables the individual setting of control
  248. ENG|07020501    |    10|  |            parameters. The control parameters determine,  among  other
  249. ENG|07020501    |    11|  |            things,  the  default format of tables when being displayed
  250. ENG|07020501    |    12|  |            by REPORT. These parameters can be altered  by  overwriting
  251. ENG|07020501    |    13|  |            them.
  252. ENG|07020501    |    15|  |            Input  is checked and may be rejected, if e.g. a number has
  253. ENG|07020501    |    16|  |            been entered instead of letters. The altered values  remain
  254. ENG|07020501    |    17|S |            valid beyond the session's end.
  255. ENG|07020501    |    19|  |            The  SET  parameters  can temporarily be overridden for the
  256. ENG|07020501    |    20|  |            current result  table  by  means  of  the  REPORT  commands
  257. ENG|07020501    |    21| I|            ##0824DECIMAL, ##0817SEPARATOR, ##0823NULL, and ##0831PRINT.
  258. ENG|07020501    |    23|  |            The meanings of the individual SET parameters
  259. ENG|07020501    |    24|R |            are described in detail in the QUERY manual.
  260. ENG|07020502    |     1|  |            ~
  261. ENG|07020502    |     3|  |       R E S E T   command :
  262. ENG|07020502    |     5|  |            Clears the input area and the command line.
  263. ENG|07020502    |     7|R |            SYNTAX :  RESET
  264. ENG|07020503    |     1|  |
  265. ENG|07020503    |     3|  |       H E L P   command :
  266. ENG|07020503    |     5|  |            Displays explanations on the screen.
  267. ENG|07020503    |     7|  |            SYNTAX :   HELP  [ <command name> ]
  268. ENG|07020503    |     9|  |            HELP  without  command  name  displays  a  menu.  HELP with
  269. ENG|07020503    |    10|R |            command name directly displays the pertinent information.
  270. ENG|07020504    |     1|  |
  271. ENG|07020504    |     3|  |       E X I T   command :
  272. ENG|07020504    |     5|  |            Terminates a QUERY session.
  273. ENG|07020504    |     7|  |            SYNTAX :  EXIT
  274. ENG|07020504    |     9|  |            EXIT leaves QUERY. All modifications are  recorded  in  the
  275. ENG|07020504    |    10|R |            database.
  276. ENG|07020505    |     1|  |
  277. ENG|07020505    |     3|  |       R U N   command :
  278. ENG|07020505    |     5|  |            Performs a database command.
  279. ENG|07020505    |     7|  |            SYNTAX :  RUN
  280. ENG|07020505    |     8|  |                      RUN <command_name> [ <parameter> ... ]
  281. ENG|07020505    |     9|  |                      RUN <owner.command_name> [ <parameter> ... ]
  282. ENG|07020505    |    11|  |            RUN  without  command  name  performs  the database command
  283. ENG|07020505    |    12|  |            currently displayed in the input area.
  284. ENG|07020505    |    14|  |            The command name must designate a stored  command.  If  the
  285. ENG|07020505    |    15|  |            command  is  not  the  user's own command, its name must be
  286. ENG|07020505    |    16|  |            preceded by a prefix consisting of the owner name  followed
  287. ENG|07020505    |    17|S |            by  a  dot.  In  LIST  mode it is sufficient to specify the
  288. ENG|07020505    |    19|  |            consecutive number which, on display, is placed before  the
  289. ENG|07020505    |    20|  |            command name.
  290. ENG|07020505    |    22|  |            If  parameters  are  specified,  the i-th value replaces &i
  291. ENG|07020505    |    23|  |            (%i) in the stored command.
  292. ENG|07020505    |    25|  |            example :  RUN customer_report 'Berlin' 3
  293. ENG|07020505    |    27|  |            Parameters can also be entered via a form.  The  layout  of
  294. ENG|07020505    |    28|  |            the form is specified within the stored command.
  295. ENG|07020505    |    30|  |            example :
  296. ENG|07020505    |    31|  |                        LAYOUT
  297. ENG|07020505    |    32|  |                        customer inquiry:
  298. ENG|07020505    |    33|  |                        -----------------
  299. ENG|07020505    |    34|  |                        customer no :  &1
  300. ENG|07020505    |    35|S |                        ENDLAYOUT
  301. ENG|07020505    |    37|  |                        SELECT firstname, lastname
  302. ENG|07020505    |    38|  |                        FROM   customer WHERE customerno = &1
  303. ENG|07020505    |    40|  |            Up to 16 parameters may be specified.
  304. ENG|07020505    |    42|  |            The  form  layout must always be placed at the beginning of
  305. ENG|07020505    |    43|R |            the stored command.
  306. ENG|07020506    |     1|  |
  307. ENG|07020506    |     3|  |       U S E   command :
  308. ENG|07020506    |     5|  |            Changes to another database or another user.
  309. ENG|07020506    |     7|  |            SYNTAX :  USE [SERVERDB] <db> [ON <node>]
  310. ENG|07020506    |     8|  |                      USE USER <user> <password> [SERVERDB <db> [ON <node>]]
  311. ENG|07020506    |     9|  |                      USE USERKEY <xuserkey>
  312. ENG|07020506    |    11|  |            The USE command terminates the database session and opens a
  313. ENG|07020506    |    12|  |            new one with another user name.
  314. ENG|07020506    |    14|  |            The keyword USER is followed by the name  and  password  of
  315. ENG|07020506    |    15|  |            the  new  user,  or the keyword SERVERDB is followed by the
  316. ENG|07020506    |    16|S |            database name and after ON by the database node, if needed.
  317. ENG|07020506    |    19|  |            USERKEY allows an entry in the XUSER file to be accessed.
  318. ENG|07020506    |    21|  |            USER, PASSWORD and USERKEY name must be enclosed in  single
  319. ENG|07020506    |    22|  |            quotes,  if  they  are  not to be converted into upper case
  320. ENG|07020506    |    23|R |            characters.
  321. ENG|07020507    |     1|  |
  322. ENG|07020507    |     3|  |       S Q L M O D E   command :
  323. ENG|07020507    |     5|  |            Changes the SQLMODE in which QUERY is working.
  324. ENG|07020507    |     7|  |            SYNTAX :  SQLMODE [ <mode> ]
  325. ENG|07020507    |     9|  |            With the SQLMODE command the user can change or display the
  326. ENG|07020507    |    10|  |            SQLMODE in which QUERY is working.
  327. ENG|07020507    |    12|R |            Valid modes are:   ADABAS, ORACLE, DB2, ANSI
  328. ENG|07020508    |     1|  |
  329. ENG|07020508    |     3|  |       S Q L T I M E   command :
  330. ENG|07020508    |     5|  |            Displays the required time for the last SQL statement.
  331. ENG|07020508    |     7|  |            SYNTAX :  SQLTIME  ON | OFF
  332. ENG|07020508    |     9|  |            By means of the SQLTIME command the user can have displayed
  333. ENG|07020508    |    10|  |            the runtime of the last SQL statement.
  334. ENG|07020508    |    12|  |            The implicit runtimes of a subsequent REPORT output will be
  335. ENG|07020508    |    13|  |            included in the displayed value.
  336. ENG|07020508    |    15|  |            These times will be inserted into  the  protocol  file,  if
  337. ENG|07020508    |    16|S |            necessary.
  338. ENG|07020508    |    19|  |            In the Windows Version of QUERY it will only be inserted in
  339. ENG|07020508    |    20|  |            the protocol file.
  340. ENG|07020508    |    22|R |            SQLTIME OFF disables the function.
  341. ENG|07020509    |     1|  |
  342. ENG|07020509    |     3|  |       D A T E   command :
  343. ENG|07020509    |     5|R |            Displays the current date and the current time.
  344. ENG|070206      |     1|  |
  345. ENG|070206      |     2|  |       C R O S S T A B   F U N C T I O N :
  346. ENG|070206      |     4|  |            The CROSSTAB function allows the fixed row structure of the
  347. ENG|070206      |     5|  |            database  table  to be broken up. Starting from an existing
  348. ENG|070206      |     6|  |            table, a new one will  be  created  in  which  the  columns
  349. ENG|070206      |     7|  |            result  from  the  rows  of the starting table. Thus a new,
  350. ENG|070206      |     8|  |            clear representation of the pieces of  information  may  be
  351. ENG|070206      |     9|  |            obtained.
  352. ENG|070206      |    11|  |            SYNTAX :  CROSSTAB  <table name> TO <table name>
  353. ENG|070206      |    12|  |                      COLUMN  <column name> ROW <column name> DATA <expression>
  354. ENG|070206      |    13|  |                      [ PREFIX <character string> ] [ DEFAULT <character string> ]
  355. ENG|070206      |    15|  |            The  first  table  name  indicates  the starting table, the
  356. ENG|070206      |    16|S |            second table name the table to be created.
  357. ENG|070206      |    19|  |            COLUMN denotes the name of the column in the starting table
  358. ENG|070206      |    20|  |            the entries of which give  the  column  names  in  the  new
  359. ENG|070206      |    21|  |            table.  The  starting table is sorted and grouped according
  360. ENG|070206      |    22|  |            to the ROW column which will be inserted in the new table.
  361. ENG|070206      |    24|  |            The expression after the keyword DATA indicates the  column
  362. ENG|070206      |    25|  |            and  the  arithmetic  operation related to it which produce
  363. ENG|070206      |    26|  |            the contents of the new table rows.
  364. ENG|070206      |    28|  |            Column name prefixes and default values  may  be  specified
  365. ENG|070206      |    29|  |            optionally.  The  PREFIX character string will be placed in
  366. ENG|070206      |    30|  |            front of the newly created column names. This is especially
  367. ENG|070206      |    31|  |            useful for numeric output columns. The DEFAULT  value  will
  368. ENG|070206      |    32|  |            be  entered  in  the table, when the column of the starting
  369. ENG|070206      |    33|  |            table does not contain any value.
  370. ENG|070206      |    35|S |            Example :
  371. ENG|070206      |    37| E|
  372. ENG|070206      |    38| E|                        CROSSTAB travel_expenses TO expense_stat
  373. ENG|070206      |    39| E|                            COLUMN calendar week
  374. ENG|070206      |    40| E|                            ROW    employee
  375. ENG|070206      |    41| E|                            DATA   fixed(sum(travel_expenses), 7, 2)
  376. ENG|070206      |    42| E|                        DEFAULT 0 PREFIX CW_
  377. ENG|070206      |    43|RE|            E$}
  378.