Re: RES: [SQL] Inserting data in composite types!

2006-11-13 Thread Richard Broersma Jr
> Thanks, It works! I have tried: > > insert into employee (c, nome, sal) values(1, 'emp name', '(1, (01/01/2000, > 01/01/2000))' ); > > And it doesn't work! What is the error message? Regards, Richard Broersma Jr. ---(end of broadcast)---

RES: [SQL] Inserting data in composite types!

2006-11-13 Thread Rodrigo Sakai
10 Para: [EMAIL PROTECTED] Cc: pgsql-sql@postgresql.org Assunto: Re: [SQL] Inserting data in composite types! I am able to do this thing with the following query: insert into employee (a, name, s) values(1, 'emp name', ((1, '(01/01/2000, 01/01/2000)'))); --Imad www.Enterprise

Re: [SQL] Inserting data in composite types!

2006-11-13 Thread imad
I am able to do this thing with the following query: insert into employee (a, name, s) values(1, 'emp name', ((1, '(01/01/2000, 01/01/2000)'))); --Imad www.EnterpriseDB.com On 11/13/06, Rodrigo Sakai <[EMAIL PROTECTED]> wrote: Hi, I have a question about how to insert data in composi

Re: [SQL] Inserting data in composite types!

2006-11-13 Thread Shane Ambler
Rodrigo Sakai wrote: Hi, I have a question about how to insert data in composite types! Imagine the exemple: CREATE TYPE t_time AS ( a date, b date ); CREATE TABLE salary ( salary numeric(10,2), t_date t_time ); I know that if I want to insert data in the t

Re: [SQL] Inserting data in composite types!

2006-11-13 Thread Markus Schiltknecht
Hi, Rodrigo Sakai wrote: How can I insert a single row in this table??? INSERT INTO employee (emp_salary) VALUES ((1000.00, '(2006/10/10, 2006/12/10)')); BTW: are you sure you don't want to use foreign keys instead? Something like: CREATE TABLE salaries ( id SERIAL PRIMARY KEY, sala

[SQL] Inserting data in composite types!

2006-11-13 Thread Rodrigo Sakai
  Hi, I have a question about how to insert data in composite types!     Imagine the exemple:   CREATE TYPE t_time AS (   a date,   b date );   CREATE TABLE salary (    salary numeric(10,2),    t_date t_time );   I know that if I want to insert data in the table SALARY I just