array column problem

Поиск
Список
Период
Сортировка
Искать

array column problem

От:
"Dax Duskin" <dax.duskin@zsassociates.com>
Дата:
Hi all,

I'm having some trouble setting a column to use arrays.

Here's an example of what I am trying to do:

create table tablename (index INTEGER, numarray INTEGER[]);

insert into tablename values(1, {1,2,3});

I receive the "Parser error at or near '{'" error.

Any ideas?  I pretty much copied the format out of Momijan's book.

thanks,
dax duskin


Re: array column problem

От:
"Rob Arnold" <rob@cabrion.com>
Дата:
I think you need to do:

insert into tablename values('{1}, {1,2,3}');

Note brackets an single quotes.
--rob

----- Original Message ----- 
From: "Dax Duskin" 
To: 
Sent: Monday, March 12, 2001 12:06 PM
Subject: array column problem


> Hi all,
> 
> I'm having some trouble setting a column to use arrays.
> 
> Here's an example of what I am trying to do:
> 
> create table tablename (index INTEGER, numarray INTEGER[]);
> 
> insert into tablename values(1, {1,2,3});
> 
> I receive the "Parser error at or near '{'" error.
> 
> Any ideas?  I pretty much copied the format out of Momijan's book.
> 
> thanks,
> dax duskin
> 
> 
> 

Re: array column problem

От:
"Dax Duskin" <dax.duskin@zsassociates.com>
Дата:
Вложения:

Thanks Vijay.

> insert into tablename values(1, '{1,2,3}');

It's amazing what the eyes miss when you haven't had enough coffee.






Vijay Deval  on 03/13/2001 09:47:31 AM

To:   Dax Duskin/Evanston/ZSAssociates@ZSAssociates
cc:

Subject:  Re: [NOVICE] array column problem



Dear Dax

Just checked  Momijan's book.
It should be
insert into tablename values(1, '{1,2,3}');
Vijay


Dax Duskin wrote:

> Hi all,
>
> I'm having some trouble setting a column to use arrays.
> Here's an example of what I am trying to do:
> create table tablename (index INTEGER, numarray INTEGER[]);
> insert into tablename values(1, {1,2,3});
> I receive the "Parser error at or near '{'" error.
> thanks,
> dax duskin
>



FAQ