Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!amdahl!rtech!wong From: wong@rtech.rtech.com (J. Wong) Newsgroups: comp.databases Subject: Re: INGRES/EQC and SQL/C ...and general notes... Summary: Simpler QUEL solution. Message-ID: <2401@rtech.rtech.com> Date: 25 Aug 88 18:49:30 GMT References: <24546@bu-cs.BU.EDU> Organization: Relational Technology Inc. Alameda, CA 94501 Lines: 19 In article <24546@bu-cs.BU.EDU>, berlin@bu-cs.BU.EDU (David K. Fickes) writes: > > One other question. What's so hard about supporting NESTED EQUEL > statements in the EQUEL/C processor??? I've got some code that looks like > this: > > ## ingres "einstein" > ## range of d is dukasfin3 > ## retrieve (c_uid=d.uid) where d.date=" " and > ## squeeze(d.doc_date)="00/00/??"; > ##{ > ## retrieve (c_year=right(squeeze(d.doc_date),2)) where d.uid=c_uid; > ## replace d(date=date(01/01/c_year)) where d.uid=c_uid; > ##} > Actually, a this can be done using a single QUEL REPLACE statement. ## replace d (date = date("01/01/"+right(squeeze(d.doc_date),2))) ## where d.date=" " and squeeze(d.doc_date)="00/00/??";