Skip site navigation (1) Skip section navigation (2)

Type conversion

From: Ice Planet <ice(at)adiemus(dot)sk>
To: pgsql-sql(at)postgresql(dot)org
Subject: Type conversion
Date: 2000-06-20 19:24:48
Message-ID: SAK.2000.06.20.ogetqkls@adiemus (view raw or flat)
Thread:
Lists: pgsql-sql
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(at)adiemus(dot)sk
ICQ#: 67765483



Responses

pgsql-sql by date

Next:From: Tom LaneDate: 2000-06-20 19:48:45
Subject: Re: Type conversion
Previous:From: Tom LaneDate: 2000-06-20 18:16:53
Subject: Re: BETWEEN

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group