I have sought and not found the answer to this problem:
I insert a row using nested select but also need the uid sequence and datestamp
SQL insert
insert into countdegreejob (countdegreeid,jobid,uniquejobid, id, created, updated)
select (cjtbdn.countdegreeid, j.id, j.uniquejobid ) NEXTVAL('hibernate_sequence'), now(), now()
from job j
right join job_areasofstudy jd on j.id = jd.job_id
inner join countjobtitlebydegreename cjtbdn on j.uniquejobid=cjtbdn.uniquejobid
where cjtbdn.degreename = jd.areasofstudy and jd.job_id is not NULL
I get the following error:
ERROR: syntax error at or near "(" LINE 2: ...jtbdn.countdegreeid, j.id, j.uniquejobid ) NEXTVAL('hibernat...
Any help would be much appreciated