Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iuEOK-0006Wn-JB for pgsql-general@arkaria.postgresql.org; Wed, 22 Jan 2020 11:41:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iuEOH-00037F-B1 for pgsql-general@arkaria.postgresql.org; Wed, 22 Jan 2020 11:41:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iuEOG-000378-So for pgsql-general@lists.postgresql.org; Wed, 22 Jan 2020 11:41:45 +0000 Received: from jan-kohnert.de ([2001:4ba0:fff1:c3::1]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iuEO9-0007gg-Qu for pgsql-general@lists.postgresql.org; Wed, 22 Jan 2020 11:41:43 +0000 X-Virus-Scanned: amavisd-new at jan-kohnert.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jan-kohnert.de; s=20191; t=1579693293; bh=NrbUX7Gz657N6awckIo4CeEDD0zt0MRhxXOjr8iyq9I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=zKtIpHMip1FEC7L6imXTgZ41BcMNGpZYTm8kCV45FztMh3HPzmnZw3GJSl/hS8UNm Lr4ASyGRWbIGy8lYPnaABkimxEMMRpM2MIT4EOayST/i+vp3DM7DSgMAYcVB7akH9R LbD44Zf3jz37Gr7AVfornHC9Y3izaHRLId5LjHIkkPzRi8uS3pxq86KRZCAo3h9M95 /iSxiwW2J8jm6bfv9BUD5GYhQUu4gtGzzh9jrs2epgPNeCGC2rbm6ehEYLGN2MXFg7 v2kl7l9VOzrSWi8b2dznqgiscePOPyFCx2soi2yLCyE1TTR4y7IihKlspVSgf2C607 TIYJYIm+ooaaA== Received: from kohnert-n4.localnet (unknown [IPv6:2a02:810a:143f:b6b8:d3b8:5b6c:5cf9:305b]) by b079.blue.fastwebserver.de (Postfix) with ESMTPSA id 2592815C0667 for ; Wed, 22 Jan 2020 12:41:33 +0100 (CET) From: Jan Kohnert To: pgsql-general@lists.postgresql.org Subject: Re: SQL Query Syntax help Date: Wed, 22 Jan 2020 12:41:32 +0100 Message-ID: <3590239.kQq0lBPeGt@kohnert-n4> In-Reply-To: <20200122110045.14705.qmail@f4mail-235-235.rediffmail.com> References: <20200122110045.14705.qmail@f4mail-235-235.rediffmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, Am Mittwoch, 22. Januar 2020, 12:00:45 CET schrieb srikkanth: [sniped HTML] something like select id, 'Col A' as "Col Name", "Col A" as "Col Value" from input union all select id, 'Col B' as "Col Name", "Col B" as "Col Value" from input ... order by 1, 2; should work. -- Kind regards Jan