General question on Database behaviour/SQL

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Nov 7 11:24:14 CST 2006


On 11/7/06 10:40 AM, "Florian Bogeschdorfer" <fb at memedia.de> wrote:

Hi Florian,

> Another question. This syntax produces a cursor I can not write to:
> 
> "SELECT * FROM KUNDENtable,KUNDENKARTENtable WHERE  KD_ID !=0  AND
> CRD_KD_ID=KD_ID "
> 
> Of course and I know. But what if I need to change data from this cursor in
> KUNDENtable only? Actually I do not need any field from KUNDENKARTENtable -
> it is just a search criteria in this case - if KUNDE has a CARD (is linked
> to KUNDENKARTENtable).
> Is there another SQL way to get a read/write cursor?
> 
> If I want to change all resulting records I KUNDENtable and as it is
> read-only - what would be a common approach to change the records?
> 
> Step through the records with a loop and change them with "UPDATE
> KUNDENtable ..."? But then the cursor won't reflect the changes.
> 
> Actually I build a selection with the above SQL and the user steps through
> the address mask and makes changes here and there (in KUNDENtable only)
> 
> And advice?

When you have READ ONLY cursor,
You can UPDATE some record of some its table with help of OTHER SQL commands

    UPDATE ... WHERE id = xxx

Xxx you must extract from your first cursor.

Actually this is how work all mySQL developers.
    
    cursor -> id -> new update -> may be new cursor


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list