Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #2095
| Path | csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Erland Sommarskog <esquel@sommarskog.se> |
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: UPDATE FROM |
| Date | Mon, 19 Jul 2021 20:52:52 +0200 |
| Organization | Erland Sommarskog |
| Lines | 16 |
| Message-ID | <XnsAD6CD46A1C54EYazorman@127.0.0.1> (permalink) |
| References | <20210719121448.6ece4302949ccaaee268158c@g{oogle}mail.com> <20210719172138.5d4e4628fc7454f1c19fc659@g{oogle}mail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | reader02.eternal-september.org; posting-host="a1508176de44ac7e67be1cc33821dbfe"; logging-data="28219"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+HoA7jKd2s8vXMSFgDMxTo" |
| User-Agent | Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) |
| Cancel-Lock | sha1:7vZu48bOfN1iHoKYixvQwdZJmtI= |
| Xref | csiph.com comp.databases.ms-sqlserver:2095 |
Show key headers only | View raw
Anton Shepelev (anton.txt@g{oogle}mail.com) writes:
> Question withdrawn. It was an error in my logic, whereas
> the syntax is quite clear. The simplest UPDATED from another
> table does *not* requre that it the table begin updated be
> mentioned in the FROM clause:
>
> UPDATE upd_tab
> SET col = data_tab.col
> FROM data_tab
> WHERE data_tab.code = upd_tab.code
>
Whereas this is legal and produces something, I definitely recommend
against it. I will have to admit that I don't understand what this is
doing - and I certainly play an SQL expert on TV.
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
UPDATE FROM Anton Shepelev <anton.txt@g{oogle}mail.com> - 2021-07-19 12:14 +0300
Re: UPDATE FROM Anton Shepelev <anton.txt@g{oogle}mail.com> - 2021-07-19 12:23 +0300
Re: UPDATE FROM Anton Shepelev <anton.txt@g{oogle}mail.com> - 2021-07-19 17:21 +0300
Re: UPDATE FROM Erland Sommarskog <esquel@sommarskog.se> - 2021-07-19 20:52 +0200
Re: UPDATE FROM Anton Shepelev <antonius@freeshell.de> - 2021-07-20 17:12 +0300
csiph-web