Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:sql:statements:select:home [2009/12/04 06:17]
tdo
dev:sql:statements:select:home [2012/10/26 14:28] (current)
Line 3: Line 3:
 ====== Omnidex SQL SELECT ====== ====== Omnidex SQL SELECT ======
 {{page>:​sql_bar&​nofooter&​noeditbtn}} {{page>:​sql_bar&​nofooter&​noeditbtn}}
 +===== Description =====
 +The Omnidex SQL Select statement is the primary statement used to query records on Omnidex enhanced data.
 +
  
  
-===== Description ===== 
 ===== Syntax ===== ===== Syntax =====
  
 +<code SQL>
   SELECT expression_list   SELECT expression_list
       FROM data_source       FROM data_source
Line 16: Line 19:
       [ ON [ CURSOR ] cursor_no ] | [ INSTANCE instance_no ]       [ ON [ CURSOR ] cursor_no ] | [ INSTANCE instance_no ]
       [ WITH options ]       [ WITH options ]
 +</​code>​ 
 +<code SQL>
   expression_list   expression_list
          [ < TOP (n)           [ < TOP (n) 
Line 28: Line 32:
          [ $uniquekey | $odxid ]          [ $uniquekey | $odxid ]
                    
 +</​code>​
 +<code SQL>
   FROM table1 [ table_alias ] [, table2 [ table_alias ] [ $omnidex ] ]   FROM table1 [ table_alias ] [, table2 [ table_alias ] [ $omnidex ] ]
        [ LFET | RIGHT ]        [ LFET | RIGHT ]
Line 34: Line 40:
            [ , table2 ]            [ , table2 ]
            [ ON table1.linkfield = table2.linkfield ]            [ ON table1.linkfield = table2.linkfield ]
 +</​code>​
  
 +<code SQL>
   WHERE    WHERE 
        [ EXISTS (subquery) ]        [ EXISTS (subquery) ]
        [ IN (subquery) ]        [ IN (subquery) ]
- +</​code>​ 
-  GROUP BY +<code SQL> 
- +  GROUP BY group_by_columns 
-  ​HAVING [ left_operand operator subquery ] +      HAVING [ left_operand operator subquery ] 
-         ​[ left_operaand IN (subquery) ] +             ​[ left_operaand IN (subquery) ] 
 +</​code>​ 
 +<code SQL>
   ORDER BY [column | position ] [, column | position ]   ORDER BY [column | position ] [, column | position ]
 +</​code>​
 ===== Discussion ===== ===== Discussion =====
-  SELECT + 
-      [<TOP n [SKIP n] | EVERY n | RANDOM (n [,seed]) | SAMPLE('​columns'​ [, '​qualifier'​])] +
-      [<​DISTINCT | ALL>] +
-      select_item [, select_item ...] +
-      [INTO table] +
-      FROM table_list +
-      [WHERE where_clause] +
-      [GROUP BY expression_list] +
-          [HAVING predicates ] +
-      [ORDER BY expression_list] +
-      [ON [CURSOR] cursor_no] | [INSTANCE instance_no] +
-      [WITH options] +
- +
-  select_item +
       One of the following:       One of the following:
  
          ​* ​          All columns for the named tables using a syntax of:          ​* ​          All columns for the named tables using a syntax of:
-                     ​[[[environment.]database.]table.]*+                     [ [ [ environment. ] database. ] table. ] *
  
          ​column ​     A column, optionally qualified by a table, optionally with an alias          ​column ​     A column, optionally qualified by a table, optionally with an alias
 
Back to top
dev/sql/statements/select/home.1259907452.txt.gz · Last modified: 2012/10/26 14:28 (external edit)