Re: [SQL] trigger failed to identify the partions

2009-09-09 Thread Richard Huxton
Sridhar Reddy Ratna wrote: > > cmd := 'INSERT INTO ' || dateTable || > EXECUTE cmd; > RETURN NEW; > If I changed the RETURN NEW to RETURN NULL its inserting only one row. Yes. RETURN NEW allows the insert to procede normally so you end up with the two rows. > But to work wi

[SQL] how to: refer to select list calculations other places in the calculations.

2009-09-09 Thread Little, Douglas
Hi, I have very complex sql (generated by cognos) I'm porting from Teradata that basically uses column alias in the calculated columns. Is there any way to do this type of thing in Psql? Essentially I need to do is refer to a calculated column later in the select list (but far more complex - lik

[SQL] Differences between bit string constant sintax

2009-09-09 Thread Oliveiros C,
Dear All, I have a table which has a field that is of type bit varying. When I do a direct INSERT with , say, X'1F', everything works fine. But in this table I have to insert several tens of thousands of records each time, so I decided to use COPY command. And if I build a file like this (colum

Re: [SQL] trigger failed to identify the partions

2009-09-09 Thread Sridhar Reddy Ratna
Hi Richard, Thanks for your suggestion. It worked great. But when I used table spaces for the inherited tables, data is being inserted to the fpsdts01 or fpsdts02 along with the default table space. So I am getting duplicate rows in select SQL. I have created the table with default

Re: [SQL] trigger failed to identify the partions

2009-09-09 Thread Richard Huxton
Sridhar Reddy Ratna wrote: > > dateTable := coll_fp_subdtls_01; > > ELSE > > dateTable := coll_fp_subdtls_02; > ERROR: column "coll_fp_subdtls_01" does not exist > > ERROR: column "coll_fp_subdtls_01" does not exist I think you mi

[SQL] trigger failed to identify the partions

2009-09-09 Thread Sridhar Reddy Ratna
Hi all, I have created a table and partitions as below. CREATE TABLE coll_fp_submission_details ( rrid numeric NOT NULL, sid numeric NOT NULL, pfid numeric NOT NULL, "timestamp" date NOT NULL, schema_version numeric NOT NULL, details character varying NOT NULL, app_