Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84549members
353803posts

[Imported] UPDATE query with table join

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
sbeadle
Janeway Janeway
Janeway
0 Likes
1
410

[Imported] UPDATE query with table join

>>Message imported from previous forum - Category:ClearSCADA Software<<
User: nminchin, originally posted: 2018-12-04 05:51:57 Id:331
Is it possible to perform an UPDATE query that includes a table join?

E.g. In SQL Server this would be:

`UPDATE arl
SET arl.Delay1 = 1200
FROM CAlarmRedirectionList arl
INNER JOIN CDBPoint pnt on arl.id = pnt.id
WHERE pnt.FullName = 'Some point fullname'`


Accepted Solutions
sbeadle
Janeway Janeway
Janeway
0 Likes
0
409

Re: [Imported] UPDATE query with table join

>>Responses imported from previous forum


Reply From User: sbeadle, posted: 2018-12-04 08:36:14
Use a nested SELECT:
update table set field etc where table.something = (select ...)
(The select should return a single row/column)


Reply From User: BevanWeiss, posted: 2019-01-03 22:06:53
or replace the = with IN and then the SELECT can return a set... :smiley: simples


Reply From User: du5tin, posted: 2019-01-04 02:33:42
Nick, have you tried setting the aggregate field using the - notation? I am not sure if that works.

 


Reply From User: BevanWeiss, posted: 2019-01-11 03:19:02
I'm pretty sure it doesn't... I think I've tried this before, from memory the indirection was only supported in SELECT statements.

See Answer In Context

1 Reply 1
sbeadle
Janeway Janeway
Janeway
0 Likes
0
410

Re: [Imported] UPDATE query with table join

>>Responses imported from previous forum


Reply From User: sbeadle, posted: 2018-12-04 08:36:14
Use a nested SELECT:
update table set field etc where table.something = (select ...)
(The select should return a single row/column)


Reply From User: BevanWeiss, posted: 2019-01-03 22:06:53
or replace the = with IN and then the SELECT can return a set... :smiley: simples


Reply From User: du5tin, posted: 2019-01-04 02:33:42
Nick, have you tried setting the aggregate field using the - notation? I am not sure if that works.

 


Reply From User: BevanWeiss, posted: 2019-01-11 03:19:02
I'm pretty sure it doesn't... I think I've tried this before, from memory the indirection was only supported in SELECT statements.