Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Melvin Davidson
Edson, I've attached a script that shows how to use bash to assign a variable from a SQL statement. On Fri, Dec 25, 2015 at 12:48 PM, Adrian Klaver wrote: > On 12/25/2015 08:26 AM, Edson F. Lidorio wrote: > >> >> >> > >>> >>> I'musing versionbelowPostgreSQL. >>> >>> PostgreSQL 9.4.5 on x86_64-u

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Adrian Klaver
On 12/25/2015 08:26 AM, Edson F. Lidorio wrote: I'musing versionbelowPostgreSQL. PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit -- Edson via pgadmin not accept this syntax. You have any other way to do? Should have added to previous post

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Adrian Klaver
On 12/25/2015 08:26 AM, Edson F. Lidorio wrote: On 25-12-2015 13:09, Charles Clavadetscher wrote: Hello I am not in clear what your use case is, but you may have a look at that: http://www.depesz.com/2013/02/25/variables-in-sql-what-how-when/ The bottom line is that in a psql interactive s

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Adrian Klaver
On 12/25/2015 08:37 AM, Melvin Davidson wrote: FYI, it is always wise (and polite) to advise what version of PostgreSQL you are using and what O/S you are using. Actually the OP put that at the bottom of the first post: "I'm using version below PostgreSQL. PostgreSQL 9.4.5 on x86_64-unknown-l

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Melvin Davidson
sum > > - > > 55 > > (1 row) > > > > Bye > > Charles > > > > *From:* pgsql-general-ow...@postgresql.org [ > mailto:pgsql-general-ow...@postgresql.org > ] *On Behalf Of *Edson F. Lidorio > *Sent:* Freitag, 25. Dezember 2015 14:23 > *To:* pgsql-gener

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Edson F. Lidorio
5. Dezember 2015 14:23 *To:* pgsql-general@postgresql.org *Subject:* [GENERAL] Strange syntax with select Hello, I excuse my ignorance with SQL and my English. I wonder if these procedures are correct or is it a bug? I'm trying to put the result of a select within the v_saldo_ini variable,

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Charles Clavadetscher
postgresql.org Subject: [GENERAL] Strange syntax with select Hello, I excuse my ignorance with SQL and my English. I wonder if these procedures are correct or is it a bug? I'm trying to put the result of a select within the v_saldo_ini variable, except I realized that the postgresql creat

Re: [GENERAL] Strange syntax with select

2015-12-25 Thread Andreas Kretschmer
Edson F. Lidorio wrote: > Hello, > I excuse my ignorance with SQL and my English. > I wonder if these procedures are correct or is it a bug? It's not a bug, but storing the result in a new table is senseless. Why do are doing that? Andreas -- Really, I'm not out to destroy Microsoft. That wi

[GENERAL] Strange syntax with select

2015-12-25 Thread Edson F. Lidorio
Hello, I excuse my ignorance with SQL and my English. I wonder if these procedures are correct or is it a bug? I'm trying to put the result of a select within the v_saldo_ini variable, except I realized that the postgresql created a table with v_saldo_ini variable. See the steps below: CREATE