Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id A89132E0031 for ; Tue, 20 May 2008 16:22:43 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 02349-08 for ; Tue, 20 May 2008 16:22:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ipmail01.adl6.internode.on.net (ipmail01.adl6.internode.on.net [203.16.214.146]) by developer.postgresql.org (Postfix) with ESMTP id 435092E002C for ; Tue, 20 May 2008 16:22:36 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsgEABPAMkjLevdH/2dsb2JhbAAsgSmtbw X-IronPort-AV: E=Sophos;i="4.27,516,1204464600"; d="scan'208";a="106881461" Received: from ppp247-71.static.internode.on.net (HELO DevBox.local) ([203.122.247.71]) by ipmail01.adl6.internode.on.net with ESMTP; 21 May 2008 04:52:32 +0930 Message-ID: <483324F6.7030705@Sheeky.Biz> Date: Wed, 21 May 2008 04:52:30 +0930 From: Shane Ambler User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: kevin kempter CC: pgsql-admin@postgresql.org Subject: Re: insert a -1 into a bigint ? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/175 X-Sequence-Number: 29259 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