Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating a table
Message
 
 
À
23/04/2010 09:56:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01461698
Message ID:
01461709
Vues:
38
>>>Hello all!
>>>
>>>Im wrote a query
>>>
>>>UPDATE otest SET otest.id=dup.id;
>>>WHERE;
>>>otest.bdate=dup.bdate;
>>>AND;
>>>otest.fname=dup.fname
>>>
>>>
>>>but ive noticed this query doesnt work when i leave in the Fname which is a character but it queries fien using the date only, the Fname is a character. Can i not do that with a charactER?
>>
>>Try using UPDATE FROM even though it may go against ANSI standards as shown in Hugo Kornelis blog.
>>http://sqlblog.com/blogs/hugo_kornelis/archive/2008/03/10/lets-deprecate-update-from.aspx
>>
>>
>>UPDATE otest SET otest.id=dup.id;
>>from oTest inner join dup ON
>>otest.bdate=dup.bdate;
>>AND;
>>otest.fname=dup.fname
>>
>
>Might be against standards but it works :P
>why wasnt what i said working thou

I'm not exactly sure about the best way to convert your update into subquery... The FROM seems an easy choice...
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform