Focal Point
Can I use identity columns in WebFocus?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3871091081

August 13, 2006, 08:21 PM
InsideTGT
Can 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
newtofocus
Where you able to get this working out side WebFOCUS, i.e using DB2 connect or any other query tool?.


WF7.1.4 Prod/Test, MRE, self serve, DM
August 18, 2006, 08:54 PM
Tony A
There 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



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10