Subject Re: Small Update SQL trick (problem)
Author majstoru
Hi Adam,

First, thanks for help!

Let me to give you a real primer! I have a table article with some
records (structure id, name, price) and I have a Document table that
is updating article price (price calculation) (structure article, qty,
Here is sample data:
id name price
1 name1 10.00
2 name2 20.00
3 name3 30.00

article qty newprice
1 10 15.00
2 10 25.00
3 10 35.00

And that is data. Now I need SQL that will update all prices from
Document into the Article table (fex: Article 1, price 10 UPDATED to
price 15), in Delphi:
for i := 1 to document.recordcout do
if article.locate('id', document.fieldbyname('article').asstring, [
]) then
// update procedure
all these functions, if it is possible in one SQL, without SP.
Why not SP. I have SQL's for some functions in my application and this
is one small problem which I have to complete all client request!

Thanks again for ultra fast reply!