I am trying to execute insert operation throught javascript method.
var temp="INSERT INTO gowSampleDB(sSTG_ID,sATTRB_CD,sATTRB_VAL) VALUES ('9383677898998939','GOWTHAMANTEST','GOWTHAMTEST1')";
logInfo("My query :"+temp);
var strSql = sqlExec(temp);
but its throwing unique constraint exception. How do i refer to my sequence and get the next value to insert?
02/11/2020 12:50:57 PM WDB-200001 SQL statement 'INSERT INTO gowSampleDB(sSTG_ID,sATTRB_CD,sATTRB_VAL) VALUES ('9383677898998939','GOWTHAMANTEST','GOWTHAMTEST1')' could not be executed.
02/11/2020 12:50:57 PM PGS-220000 PostgreSQL error: ERROR: duplicate key value violates unique constraint "gowsampledb_id" DETAIL: Key (isampledbid)=(0) already exists.