question

kandanDevi avatar image
kandanDevi asked

Sql UPdate quary

Hi Can any one help me on this, I have two tables named as Master and salesOrg,I have to update missing informations in master table based on "SALES_ORGANIZATION ID"(only for the missing rows) ![alt text][1] ![alt text][2] [1]: /storage/temp/3436-master.png [2]: /storage/temp/3437-salesorg.png
sqlssismsbi
master.png (43.6 KiB)
salesorg.png (45.9 KiB)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Wimbush avatar image David Wimbush commented ·
What have you tried so far? What's going wrong with it?
0 Likes 0 ·
kandanDevi avatar image
kandanDevi answered
Hi David,I have tried with following sql query... Update Master set master.REGION=SalesOrgs.REGION from Master Join SalesOrgs on Master.REGION=SalesOrgs.Region where master.REGION=null there are null values but the results what I got is 0 rows updated...
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kandanDevi avatar image
kandanDevi answered
Thanks,David... I have got the results with the following query **Update Master set master.Subregion=SalesOrgs.Subregion from Master Join SalesOrgs on Master.[SALES_ORGANIZATION ID]=SalesOrgs.[SALES_ORGANIZATION ID] where master.Subregion is NULL**
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Wimbush avatar image David Wimbush commented ·
No need to thank me - you did it! Glad you got there. I suggest you accept your answer so it's all tidied up.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.