Ralf Schneider wrote:
> Hi,
>
> I want to create a view with the following SQL statement:
>
> CREATE VIEW k_0001_combobox_texts AS
> SELECT A."tid", A."language", A."text", A."abbrev"
> FROM combobox_texts A, combobox B
> WHERE A."tid" = B."tid" AND B."cip" = 3
> WITH CHECK OPTION
>
> The two tables combobox_texts and combobox are defined as follows:
>
> CREATE TABLE combobox
> (
> "type" VARCHAR(16),
> "tid" SMALLINT,
> "order" SMALLINT,
> "delete_it" BOOLEAN DEFAULT FALSE,
> "cip" INTEGER,
> PRIMARY KEY ("tid", "cip")
> )
>
> CREATE TABLE combobox_texts
> (
> "tid" SMALLINT,
> "language" VARCHAR(16),
> "text" VARCHAR(64),
> "abbrev" VARCHAR(3),
> PRIMARY KEY ("tid", "language")
> )
>
> When I execute the CREATE VIEW statement I get the error message:
>
> [SAP DB]General error;-7051 POS(1) Read only view WITH CHECK
> OPTION not
> allowed.
>
> But why? What do I have to do for being able to create an
> editable view?
Please check
http://www.sapdb.org/htmhelp/c7/12ffd706ab11d3a97d00a0c9449261/frameset.htm
--> at least needed are:
- referential constraint definition between these two tables,
- tid and cip have to be part of the select list
Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general