🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.bazy-danych
Article #195472

Re: Zmiana w tabeli na podstawie żądań z drugiej tabeli

#195472
From: Borneq
Date: Tue, 30 Jan 2018 00:31
23 lines
1545 bytes
W dniu 28.01.2018 o 04:36, Borneq pisze:
> W dniu 28.01.2018 o 04:34, Borneq pisze:
>> Tabela Transakcje:
>>    Adres
>>    HaszTransakcji
>>    Blok //nie używany tutaj
>>    Kwota //nie używana tutaj
>>    IndeksWTransakcji
>>
>> Tabela Zmiany:
>>    SzukanyHasz
>>    IndeksWTransakcji
>>    NowyAdres
>>    BlokKtóryŻąda
> 
> I baza danych to MySQL.

Odpowiedź:

update Transakcje t join Zmiany z on t.HaszTransakcji = z.SzukanyHasz
and t.IndeksWTransakcji = z.IndeksWTransakcji
set t.Adres = z.NowyAdres
where z.BlokKtoryZada=NUMER_BLOKU
Technical Details
Message-ID: <p4oed8$qau$1@node1.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <p4jgbs$2c4$1@node1.news.atman.pl> <p4jgfb$2c4$2@node1.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Borneq <borneq@antyspam.hidden.pl>
Newsgroups: pl.comp.bazy-danych
Subject: Re: Zmiana w tabeli na podstawie żądań z
 drugiej tabeli
Date: Tue, 30 Jan 2018 01:31:37 +0100
Organization: ATMAN - ATM S.A.
Lines: 23
Message-ID: <p4oed8$qau$1@node1.news.atman.pl>
References: <p4jgbs$2c4$1@node1.news.atman.pl> <p4jgfb$2c4$2@node1.news.atman.pl>
NNTP-Posting-Host: public-gprs350495.centertel.pl
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1517272296 26974 37.47.0.96 (30 Jan 2018 00:31:36 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Tue, 30 Jan 2018 00:31:36 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2
In-Reply-To: <p4jgfb$2c4$2@node1.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit