Annotation of 42BSD/ingres/doc/quel/retrieve.nr, revision 1.1.1.1

1.1       root        1: .th RETRIEVE QUEL 2/29/79
                      2: .sh NAME
                      3: retrieve \- retrieve tuples from a relation
                      4: .sh SYNOPSIS
                      5: .bd retrieve 
                      6: [[\c
                      7: .bd into\c
                      8: ] relname] (target_list) 
                      9: [\c
                     10: .bd where 
                     11: qual]
                     12: .br 
                     13: .bd "retrieve unique" 
                     14: (target_list) [\c
                     15: .bd where
                     16: qual]
                     17: .sh DESCRIPTION
                     18: .it Retrieve 
                     19: will get all tuples which satisfy the qualification and
                     20: either display them on the terminal
                     21: (standard output) or store them in a new relation.
                     22: 
                     23: If a relname is specified, the result of the query will be stored in a new
                     24: relation with the indicated name.
                     25: A relation with this name
                     26: owned by the user must not already exist.
                     27: The current user will be the owner of the new relation.
                     28: The relation will have domain names as specified in the 
                     29: .it target_list
                     30: result_attnames.
                     31: The new relation will be saved on the system for seven days unless
                     32: explicitly saved by the user until a later date.
                     33: .s1
                     34: If the keyword
                     35: .bd unique
                     36: is present, tuples will be sorted on the
                     37: first domain, and duplicates will be removed, before being
                     38: displayed.
                     39: .s1
                     40: The keyword 
                     41: .bd all
                     42: can be used when it is desired to
                     43: retrieve all domains.
                     44: 
                     45: If no result 
                     46: .it relname 
                     47: is specified then the result of the query will be
                     48: displayed on the terminal and will not be saved.
                     49: Duplicate tuples are not removed when the result is
                     50: displayed on the terminal.
                     51: 
                     52: The format in which domains are printed can be
                     53: defined at the time ingres is invoked (see ingres(unix)).
                     54: 
                     55: If a result relation is specified then
                     56: the default procedure is
                     57: to modify the result relation to an cheapsort storage structure
                     58: removing duplicate tuples in the process.
                     59: 
                     60: If the default cheapsort structure is not desired, the
                     61: user can override this at the time \*(II is
                     62: invoked by using the 
                     63: .bd \-r
                     64: switch (see ingres(unix)).
                     65: .s3
                     66: Only the relation's owner and users with retrieve permission may 
                     67: .it retrieve 
                     68: from it.
                     69: .sh EXAMPLE
                     70: .nf
                     71: /\*(** Find all employees who make more than their manager \*(**/
                     72:    range of e is emp
                     73:    range of m is emp
                     74:    retrieve (e.name) where e.mgr = m.name
                     75:            and e.sal > m.sal
                     76: /\*(** Retrieve all domains for those who make more
                     77:        than the average salary \*(**/
                     78:    retrieve into temp (e.all) where e.sal > avg(e.sal)
                     79: /\*(** retrieve employees's names sorted \*(**/
                     80:    retrieve unique (e.name)
                     81: .fi
                     82: .sh "SEE ALSO"
                     83: modify(quel), permit(quel), quel(quel), range(quel), 
                     84: save(quel), ingres(unix)
                     85: .sh DIAGNOSTICS
                     86: .sh BUGS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.