Re: [SQL] rule for update view that updates/inserts into 2 tables

2008-04-14 Thread Robins Tharakan
Hi Chad, (Pardon me if I am shooting the stars here...) Don't you think that on each update, you would be creating a new row that satisfies that very given condition for the view ? By that I mean that when you do a 'UPDATE... WHERE my_table_id=1' the RULE now inserts another row with my_table_id

[SQL] rule for update view that updates/inserts into 2 tables

2008-04-14 Thread Chad Showalter
I would like to create a rule that, by updating a view, allows me to update one table and insert into another. The following example illustrates what I'm trying to do: --Create Tables CREATE TABLE my_table ( my_table_id serial, a character varying(255),

[SQL] export CSV file through Java JDBC

2008-04-14 Thread Emi Lu
Good morning, Running the following command from command line is ok, but cannot export a table into a csv file through java JDBC code. Please help! JAVA code: === public static void exec(String command) { try{ Process p = Runtime.getRuntime().exec(comma