🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: CASE .. WHEN .. THEN

#195295
From: Roman Tyczka
Date: Thu, 30 Mar 2017 07:43
22 lines
1351 bytes
On Tue, 28 Mar 2017 08:04:04 -0700 (PDT), piotr.pawel.olczyk@gmail.com
wrote:

> Mam pytanie czy w CASE .. WHEN .. THEN po THEN może być blok instrukcji?

Ale jakich instrukcji? Po THEN możesz tylko zwrócić wartość dla kolumny
spełniającej warunek WHEN.
 
> np.
> .....
> select wartosc,
> case 
> when wartosc >= 10 then -> tu blok instrukcji przypisujących wartości w różnych kolumnach
> end,
> .....
> from tabela

Powiedz jaki konkretnie chcesz osiągnąć efekt, tak będzie prościej.

-- 
pozdrawiam
Roman Tyczka
Technical Details
Message-ID: <1blx3uv1fsjuf$.dlg@tyczka.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <1305c9a3-bc01-46bc-b059-8c77e7bbb5cc@googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Roman Tyczka <noemail@because.no>
Newsgroups: pl.comp.bazy-danych
Subject: Re: CASE .. WHEN .. THEN
Date: Thu, 30 Mar 2017 09:43:04 +0200
Organization: ATMAN - ATM S.A.
Lines: 22
Sender: romek@tyczka.no.found
Message-ID: <1blx3uv1fsjuf$.dlg@tyczka.com>
References: <1305c9a3-bc01-46bc-b059-8c77e7bbb5cc@googlegroups.com>
NNTP-Posting-Host: 94.75.90.137
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1490859785 32104 94.75.90.137 (30 Mar 2017 07:43:05 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Thu, 30 Mar 2017 07:43:05 +0000 (UTC)
User-Agent: 40tude_Dialog/2.0.15.84
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit