pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shane Ambler <pgsql@Sheeky.Biz>
To: kevin kempter <kevin@kevinkempterllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: insert a -1 into a bigint ?
Date: Wed, 21 May 2008 04:52:30 +0930
Message-ID: <483324F6.7030705@Sheeky.Biz> (raw)
In-Reply-To: <B93EDA1C-3B80-4949-B0C2-36F9EBCF6411@kevinkempterllc.com>
References: <B93EDA1C-3B80-4949-B0C2-36F9EBCF6411@kevinkempterllc.com>

kevin kempter wrote:
> Hi All:
> 

> I want to insert some data along with a -1 for two of the bigint 
> columns. like this:
> 
> insert into seg_id_tmp7
> (   customer_srcid,
>     show_srcid,
>     show_name,
>     season_srcid,
>     season_name,
>     episode_srcid,
>     episode_name,
>     segment_type_id,
>     segment_type,
>     segment_srcid,
>     segment_name,
>     create_dt  )
> select
>     t8.customer_srcid,
>     t8.show_srcid,
>     t8.show_name,
>     t8.season_srcid,
>     t8.season_name,
>     t8.episode_srcid,
>     t8.episode_name
>     -1::bigint ,
>     'none',
>     -1::bigint ,
>     'none',
>     (select start_dt from load_start_date)
> from
>     seg_id_tmp8 t8
> ;
> 
> 
> 
> I've also tried without the ::bigint cast on the above query.
> 
> 
> I always get this error:
> 
> sql:load_sl_cd_segment_dim.sql:237: ERROR:  operator does not exist: 
> character varying - bigint

Try a comma before the -1

You are trying to enter - "t8.episode_name -1::bigint" into the column

hence - "character varying - bigint" does not work



-- 

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz



view thread (4+ messages)  latest in thread

Message-ID: <483324F6.7030705@Sheeky.Biz>
Permalink:  ../483324F6.7030705@Sheeky.Biz/
Also on:    postgresql.org/message-id/483324F6.7030705@Sheeky.Biz

 · 

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-admin@postgresql.org
  Cc: pgsql@Sheeky.Biz, kevin@kevinkempterllc.com
  Subject: Re: insert a -1 into a bigint ?
  In-Reply-To: <483324F6.7030705@Sheeky.Biz>

* 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