The fields for both the tables are: id, first_name, last_name.
However, I would like to replace the id and first_name in table1 to: 3 and 'nil' to insert into table2.
Expand|Select|Wrap|Line Numbers
- INSERT INTO table2 SELECT * FROM dblink('dbname=db1', 'SELECT 3, nil, last_name FROM table1 WHERE id = 1000') AS t1(id integer, first_name varchar, last_name varchar);
Anyone knows how to replace characters in dblink or any solution to this problem??
Thanks in advance!