English

Error: ORA-00998: must name this expression with a column alias (sdetable -o create_view)

Error Message

The following error may occur when using "sdetable" to create a view on ArcSDE for Oracle.

"ORA-00998: must name this expression with a column alias (sdetable -o create_view)"

Code:
Ready: sdetable -o create_view -T states_v -t states_sde -c 'STATE_,STATE_ID,COD
E,NAME' -u gdb -p gdb
ArcSDE 9.1 Oracle9i Build 1269 Thu Mar 3 18:54:58 PST 2005
Attribute Administration Utility
-----------------------------------------------------
Error: Underlying DBMS error (-51).
Error: Unable to create view states_v
ORA-00998: must name this expression with a column alias
(states_v)

Cause

The single quotes are not stripped from the column list, but rather passed to the database in the CREATE VIEW command. This is the resulting Oracle command as captured with a trace:

Code:
CREATE VIEW states_v AS SELECT /*+ FIRST_ROWS */ 'STATE_, STATE_ID, CODE,
NAME' FROM GDB.STATES_SDE

Solution or Workaround

Use double quotes rather than single quotes to surround the column list on the command line.