Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Do This SQL
Message
De
01/10/2005 04:46:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01055122
Message ID:
01055202
Vues:
17
Kevin,
Why do you need a join or 2 SQLs? This looks straight forward with no joins:
m.SearchValue = 1
m.SomeValue = 1
UPDATE MyTable;
    SET SomeField = m.SomeValue ;
    where SomeValue = m.SearchValue

  DELETE FROM MyTable WHERE SomeValue = m.SearchValue
Cetin

>First, I pull some records:
>
>
>SELECT *;
>  FROM MyTable;
>  WHERE SomeValue = 1;
>  INTO CURSOR MyCursor
>
>
>Next, update or delete from original table:
>
>
>
>  UPDATE MyTable;
>    SET SomeField = SomeValue;
>    WHERE Id IN;
>     (SELECT Id FROM MyCursor)
>
>  ** OR
>
>  DELETE FROM MyTable;
>    WHERE Id IN;
>     (SELECT Id FROM MyCursor)
>
>
>
>These 2 SQL's are very slow. How can I do thses using joins?
>
>Thanks
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform