[SQL] ERROR: missing FROM-clause entry for table "new"

2012-09-13 Thread James Sharrett
ew.col1,new.co2Šnew.colN)'; Execute sql; ERROR: missing FROM-clause entry for table "new" There is nothing wrong with the resulting code from sql because if I output the string and put it in as static SQL in my trigger it works. How do I build the string within the trigger a

Re: [SQL] ERROR: missing FROM-clause entry for table "new"

2012-09-13 Thread David Johnston
ct new.col1,new.co2…new.colN) > > This doesn't: > > sql := 'Insert into A (col1,col2,…colN) '; > sql := sql || 'Select new.col1,new.co2…new.colN)'; > Execute sql; > > ERROR: missing FROM-clause entry for table "new" > > There is not

Re: [SQL] ERROR: missing FROM-clause entry for table "new"

2012-09-14 Thread James Sharrett
; > sql := 'Insert into A (col1,col2,ŠcolN) '; > sql := sql || 'Select new.col1,new.co2Šnew.colN)'; > Execute sql; > > ERROR: missing FROM-clause entry for table "new" > > > > There is nothing wrong with the resulting code from sql beca