Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update table with left join
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Desktop
Divers
Thread ID:
01526632
Message ID:
01526707
Vues:
28
>>>>>>I was so used to flip that around in VFP!
>>>>>
>>>>>Hmm, never tried flipping it around in VFP either. BTW, pay attention to other changes I made in your query.
>>>>
>>>>Great, it's working good, and fast. Problem was that originally I had a scan doing the updates in Business objects and posting one by one, and that took too long, so I had to do a direct query to update all at once.
>>>
>>>I am not sure why do you need inner join here. Why not just:
>>>
>>>UPDATE EmpItems ;
>>>SET itOnPosted = 1, ;
>>>itBalAmt = HistItems.itBalNew + HistItems.itPostCalc;
>>>FROM HistItems where HistItems.eiKey = EmpItems.eiKey and HistItems.DelFlag = 0 
>>>
>>
>>This is not going to work. HistItems is a different table so you must join with it.
>
>You have any working strand alone example that supports it? Then show it to me.

I am not sure I understood your question. I know that in SQL Server if you have any type of query involving multiple tables that have to be Joined somehow (either using JOIN or APPLY or old style WHERE join).

Did you have in mind a particular example in your response?
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