Re: [GENERAL] Can't cast from char to integer...

2008-09-30 Thread Mike Diehl
On Tuesday 30 September 2008 10:46:46 am Merlin Moncure wrote: > On Mon, Sep 29, 2008 at 8:02 PM, Mike Diehl <[EMAIL PROTECTED]> wrote: > > That fixed it. If you are ever in Albuquerque, NM., let me know. I'll > > be happy to buy you a beer. > > Tom probably has enough beers coming to him that he

Re: [GENERAL] Can't cast from char to integer...

2008-09-30 Thread Scott Marlowe
On Tue, Sep 30, 2008 at 10:46 AM, Merlin Moncure <[EMAIL PROTECTED]> wrote: > On Mon, Sep 29, 2008 at 8:02 PM, Mike Diehl <[EMAIL PROTECTED]> wrote: >> That fixed it. If you are ever in Albuquerque, NM., let me know. I'll be >> happy to buy you a beer. >> > > Tom probably has enough beers coming

Re: [GENERAL] Can't cast from char to integer...

2008-09-30 Thread Merlin Moncure
On Mon, Sep 29, 2008 at 8:02 PM, Mike Diehl <[EMAIL PROTECTED]> wrote: > That fixed it. If you are ever in Albuquerque, NM., let me know. I'll be > happy to buy you a beer. > Tom probably has enough beers coming to him that he could found a new software company with money from returning the bott

Re: [GENERAL] Can't cast from char to integer...

2008-09-29 Thread Mike Diehl
That fixed it. If you are ever in Albuquerque, NM., let me know. I'll be happy to buy you a beer. Mike. On Monday 29 September 2008 05:26:43 pm Tom Lane wrote: > Mike Diehl <[EMAIL PROTECTED]> writes: > > For example, I'm trying to do this: > > > > insert into data > > select cast('666' a

Re: [GENERAL] Can't cast from char to integer...

2008-09-29 Thread Tom Lane
Mike Diehl <[EMAIL PROTECTED]> writes: > For example, I'm trying to do this: > insert into data > select cast('666' as integer) as block_number, phone as phone_number, > name > from demo_q; > When I run this query, I get: > ERROR: column "block_number" is of type integer b

[GENERAL] Can't cast from char to integer...

2008-09-29 Thread Mike Diehl
Hi all. I'm trying to cut data from one table and put it in another table. The problem comes from the fact that the first table has a field that is a char(x) and the destination table needs that data in an integer. For example, I'm trying to do this: insert into data select cast('666