Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update more limited than select?
Message
De
14/02/2008 18:09:04
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01291690
Message ID:
01292848
Vues:
29
>
>>
>>update mytable set flag = "1";
>>       FROM mytable;
>>INNER JOIN (SELECT f1 from look_up group by f1 having count(*) = 1) Tbl1 ON MyTable.F1 = Tbl1.F1
>>INNER JOIN (SELECT f2 from look_up group by f2 having count(*) = 1) Tbl2 ON MyTable.F2 = Tbl1.F2
>>
>
>That works, but I was never asking for an alternate solution to the update, I managed to get around it fine, I was asking if anyone knows why the update which appears to be the same query as the select was giving me the too complex error when the select works ok.

In my experience, which isn't extensive in this, I never managed to get update...where to work without the From {table} clause. Maybe that's the bug or I'm just not getting it, but so it is for me. In a way, the From {table} may be required to establish a set of records which to update, but then it would be equally logical to assume that one would be established from the where clause itself by just applying (or implying) the target alias.

Still inconclusive on this one, specially because most of the time I don't need too many of these, so I don't need/have-the-time to investigate deeper.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform