home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / doc / quel / replace.doc < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.8 KB  |  51 lines

  1.  
  2.  
  3.  
  4.  
  5.      REPLACE(QUEL)                2/29/79                REPLACE(QUEL)
  6.  
  7.  
  8.  
  9.      NAME
  10.           replace - replace values of domains in a relation
  11.  
  12.      SYNOPSIS
  13.           _r_e_p_l_a_c_e tuple_variable (target_list) [_w_h_e_r_e qual]
  14.  
  15.      DESCRIPTION
  16.           _R_e_p_l_a_c_e changes the values of the domains specified  in  the
  17.           _t_a_r_g_e_t__l_i_s_t  for  all tuples which satisfy the qualification
  18.           _q_u_a_l.  The _t_u_p_l_e__v_a_r_i_a_b_l_e must have been declared  to  range
  19.           over  the relation which is to be modified.  Note that a tu-
  20.           ple variable is required and not the  relation  name.   Only
  21.           domains  which  are  to  be  modified  need  appear  in  the
  22.           _t_a_r_g_e_t__l_i_s_t.    These   domains   must   be   specified   as
  23.           result_attnames  in  the _t_a_r_g_e_t__l_i_s_t either explicitly or by
  24.           default (see quel(quel)).
  25.  
  26.           Numeric domains may be replaced by  values  of  any  numeric
  27.           type  (with  the exception noted below).  Replacement values
  28.           will be converted to the type of the result domain.
  29.  
  30.           Only the owner of a relation, or a user with replace  pemis-
  31.           sion on the relation can do _r_e_p_l_a_c_e.
  32.  
  33.           If the tuple update would violate  an  integrity  constraint
  34.           (see integrity(quel)), it is not done.
  35.  
  36.      EXAMPLE
  37.           /* Give all employees who work for Smith a 10% raise */
  38.              range of e is emp
  39.              replace e(sal = 1.1 * e.sal) where e.mgr = "Smith"
  40.  
  41.      SEE ALSO
  42.           integrity(quel), permit(quel), quel(quel), range(quel)
  43.  
  44.      DIAGNOSTICS
  45.           Use of a numeric type expression to replace a character type
  46.           domain or vice versa will produce diagnostics.
  47.  
  48.      BUGS
  49.  
  50.  
  51.