Re: error: insert has more expressions than target column
| От | Richard Huxton |
|---|---|
| Тема | Re: error: insert has more expressions than target column |
| Дата | |
| Msg-id | 413DBEA7.9050905@archonet.com обсуждение исходный текст |
| Ответ на | error: insert has more expressions than target column (Dino Vliet <dino_vliet@yahoo.com>) |
| Ответы |
Re: error: insert has more expressions than target column
|
| Список | pgsql-general |
Dino Vliet wrote: > Hi there, > I want to put a number of records (variable number > depending on a attribute of a table) into a certain > table with a trigger statement. > > I have created the follwing trigger: > > CREATE FUNCTION vullalles() RETURNS trigger AS ' > BEGIN > FOR i in 0..7 LOOP > INSERT INTO lessons (select > dayofweek,startdate,endate,startime,endtime,teacher,location,roomnr > from courseschedule); Try it without the brackets around select, or put the column-names in brackets before it. > startdate := startdate + i*7; > EXECUTE startdate; Not sure what this is supposed to be doing. The EXECUTE is redundant. > RETURN NEW; > END LOOP; > END; > ' LANGUAGE plpgsql; -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления: