|  | Posted by --CELKO-- on 09/18/06 22:12 
Please post DDL, so that people do not have to guess what the keys,constraints, Declarative Referential Integrity, data types, etc. in
 your schema are. Sample data is also a good idea, along with clear
 specifications.  It is very hard to debug code when you do not let us
 see it.
 
 >>This table having 200 records [sic]. I want to update first [sic]  20 "no" records [sic] to update to "yes"  <<
 
 Rows are not records; fields are not columns; tables are not files;
 there is no sequential access or ordering in an RDBMS, so "first",
 "next" and "last" are totally meaningless. If you want an ordering,
 then you need to have a column that defines that ordering.
 
 >> update reserve
 set allocated='yes'
 from(select allocated from reserve where allocated='no') <<
 
 Never use the proprietary UPDATE.. FROM.. syntax; the results are
 unpredictable.
 
 Want to try again with a usable spec?
  Navigation: [Reply to this message] |