pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ice Planet <ice@adiemus.sk>
To: pgsql-sql@postgresql.org
Subject: Type conversion
Date: Tue, 20 Jun 2000 21:24:48 +0200
Message-ID: <SAK.2000.06.20.ogetqkls@adiemus> (raw)

Hello

I have following situation

create table t1 (a int8 primary key, b int8);
create table t2 (x int2);
insert into t1 values (1,1);

A: insert into t2 values (select b from t1 where a = 1)

B: insert into t2 values (select int2(int4(b)) from t1 where a = 1)

Both possibilites fail, how can i do this insert???

Thanks for help

                       Best regards
                                              Ice Planet

e-mail: ice@adiemus.sk
ICQ#: 67765483





view thread (8+ messages)  latest in thread

Message-ID: <SAK.2000.06.20.ogetqkls@adiemus>
Permalink:  ../SAK.2000.06.20.ogetqkls@adiemus/
Also on:    postgresql.org/message-id/SAK.2000.06.20.ogetqkls@adiemus

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ice@adiemus.sk
  Subject: Re: Type conversion
  In-Reply-To: <SAK.2000.06.20.ogetqkls@adiemus>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox