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 1iKMyb-0003bx-VK for pgsql-general@arkaria.postgresql.org; Tue, 15 Oct 2019 13:35:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKMya-0007ij-Hw for pgsql-general@arkaria.postgresql.org; Tue, 15 Oct 2019 13:35:00 +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 1iKMya-0007iQ-4O for pgsql-general@lists.postgresql.org; Tue, 15 Oct 2019 13:35:00 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iKMyW-0008Lc-AJ for pgsql-general@lists.postgresql.org; Tue, 15 Oct 2019 13:34:58 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 46sxHg2NTyz1YNZ for ; Tue, 15 Oct 2019 09:34:55 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 17622) id 46sxHg1hxLz1ZVj; Tue, 15 Oct 2019 09:34:55 -0400 (EDT) Date: Tue, 15 Oct 2019 09:34:55 -0400 From: stan To: pgsql-general@lists.postgresql.org Subject: SOLVED Re: SELECT returnig a constant Message-ID: <20191015133455.GA20700@panix.com> References: <20191015132851.GA6232@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20191015132851.GA6232@panix.com> X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Oct 15, 2019 at 09:28:51AM -0400, stan wrote: > I used to be able to return a constant value in a SELECT statement in > ORACLE. I need to populate a table for testing, and I was going to do so > like this: >=20 > SELECT > employee.id , > project.proj_no , > work_type.type , > 'rate' 1 > FROM employee > CROSS JOIN project > CROSS JOIN work_type; >=20 > This statement works correctly, till I add the last "=7F'rate' 1 line, th= en it > returns a syntax error. >=20 > How can I do this? >=20 Turns out this works. SELECT employee.id , project.proj_no , work_type.type , 1 as rate FROM employee CROSS JOIN project CROSS JOIN work_type; ~ --=20 "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin