August 13, 2006, 08:21 PM
InsideTGTCan I use identity columns in WebFocus?
I've got 2 questions - first do Focus .foc files have any equivalent to a DB2 identity column? Secondly, does Webfocus not support identity columns even in passthru statements? Or can someone correct my syntax from the following:
SQL DB2
ALTER TABLE WFRTC.ACS_EXPENSE
ADD UNKEY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY;
END
generates the following error message:
(FOC1400) SQLCODE IS -104 (HEX: FFFFFF98)
: [42601] [IBM][CLI Driver][DB2/AIX64] SQL0104N An unexpected token "IDEN
: TITY" was found following "AS". Expected tokens may include: "
: ren>". SQLSTATE=42601
(FOC1414) EXECUTE IMMEDIATE ERROR.
The table is in UDB v8 on the unix platform. I appreciate any insight on this.
August 18, 2006, 03:48 PM
newtofocusWhere you able to get this working out side WebFOCUS, i.e using DB2 connect or any other query tool?.
August 18, 2006, 08:54 PM
Tony AThere are only certain SQL statements that are valid, even in passthru, check out the relevant documentation to ensure that the syntax you require is valid.
If the synatx you require is invalid then use a view or SQL function called via an SQL stored procedure.
T