Re: [SQL] executing dynamic commands

2006-02-02 Thread christian . michels
Thanx a lot guys - it works ! Cheers Chris On Wed, 1 Feb 2006 christian ( dot ) michels ( at ) eifelgeist ( dot ) com wrote: > Hi, > > I user PostgreSQl 8.0.4 on Win2003 Server and write a function to copy rows > from one table into another table with the same column definition. > My first

Re: [SQL] executing dynamic commands

2006-02-01 Thread christian . michels
Thanx for the quick response ! Sorry for asking a bit confusing question ... Using the View is a good idea but does not fully solve my problem. To make it a bit more clear: I want to copy all records from table1 to table2 assuming that the two tables have exactly the same column definition and c

[SQL] executing dynamic commands

2006-02-01 Thread christian . michels
Hi, I user PostgreSQl 8.0.4 on Win2003 Server and write a function to copy rows from one table into another table with the same column definition. My first approach was to use something like: query_value := 'INSERT INTO ' || tabledest || ' SELECT * FROM ' || tablesrc; EXECUTE query_value; Thi