🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #624

Re: Update

#624
From: Wayne Niddery [TeamB]
Date: Sun, 02 Sep 2007 14:28
28 lines
1916 bytes
Serra wrote:
> IB 6,02
>
> How can i change below delphi code to IBSql ?
>
> While not dm.OrdDetail.Eof do
> begin
> dm.Parts.FindKey([dm.OrdDetailPARTNO.Value]);
> dm.Parts.Edit;
> dm.Parts.FieldByName('LastDate').Value:=dm.OrderODate.Value;
> dm.Parts.FieldByName('LastPrice').asString:=dm.OrdDetailUPrice.asString;
> dm.Parts.Post;
> dm.OrdDetail.Next;
> end;


Guessing at some table and field names you'll need to correct...

update Parts p set
  LastDate = (select ODate from OrderDetail od where od.PartNo = p.PartNo),
  LastPrice = (select UPrice from OrderDetail od where od.PartNo = 
p.PartNo);

-- 
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"A man is likely to mind his own business when it is worth minding,
when it is not, he takes his mind off his own meaningless affairs by
minding other people's business." - Eric Hoffer 
Technical Details
Message-ID: <46dac8ac$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46dabc0a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,f4e71297a0b445d2
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca>
From: "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca>
Newsgroups: borland.public.interbase.sql
References: <46dabc0a@newsgroups.borland.com>
Subject: Re: Update
Date: Sun, 2 Sep 2007 10:28:59 -0400
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 69.17.170.228
Message-ID: <46dac8ac$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1188743340 69.17.170.228 (2 Sep 2007 07:29:00 -0700)
X-Authenticated-User: wniddery
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail