pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Kline <ken@oldbs.com>
To: pgsql-sql@postgresql.org
Subject: conversion
Date: Sun, 25 Feb 2001 21:32:06 -0500
Message-ID: <3A99C025.BBF58939@oldbs.com> (raw)

Hello,
another brain twister, at least for me...

i have a table of varchar and one of the values I want
to insert into another table, one of the columns is
defined as INTEGER in destination table, column...
and none of these statements seem to work

 INSERT INTO pledge_classes (semester, year)
 SELECT pseason, to_number('pyear','9999') from temp;

 INSERT INTO pledge_classes (semester, year)
 SELECT pseason, pyear::integer from temp;

 INSERT INTO pledge_classes (semester, year)
 SELECT pseason, pyear::numeric(4) from temp;




view thread (10+ messages)  latest in thread

Message-ID: <3A99C025.BBF58939@oldbs.com>
Permalink:  ../3A99C025.BBF58939@oldbs.com/
Also on:    postgresql.org/message-id/3A99C025.BBF58939@oldbs.com

 · 

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: ken@oldbs.com
  Subject: Re: conversion
  In-Reply-To: <3A99C025.BBF58939@oldbs.com>

* 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