conversion

From: Ken Kline <ken(at)oldbs(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: conversion
Date: 2001-02-26 02:32:06
Message-ID: 3A99C025.BBF58939@oldbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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;

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ken Kline 2001-02-26 04:11:22 Re: conversion
Previous Message D'Arcy J.M. Cain 2001-02-25 23:54:03 Re: Fwd: Re: sum(bool)?