RE: View with LONGs give blank columns

"Zabach, Elke" <[email protected]>
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
 Mike Slinn wrote:
> 
> 
> I want to join two tables into a view.  Each table has a LONG column. 
> When I SELECT from the view, the first LONG is blank.  If I 
> change one of
> the LONGs to a VARCHAR, it works fine.  How can I get around 
> this problem?
> 
>  CREATE TABLE prima (
>    oid INTEGER,
>    CONSTRAINT prima_pk PRIMARY KEY(oid),
>    val long DEFAULT '')
> //
>  CREATE TABLE sec1 (
>    oid INTEGER DEFAULT SERIAL,
>    CONSTRAINT sec1_pk PRIMARY KEY(oid),
>    CONSTRAINT sec1_fk FOREIGN KEY(oid) REFERENCES prima(oid) ON DELETE
> CASCADE,
>    val long DEFAULT '')
> //
>  CREATE VIEW V2 (OID, val, VAL1) AS
>    SELECT P.OID, p.val, S1.VAL
>    FROM PRIMA P, SEC1 S1
>    WHERE P.OID = S1.OID
>    WITH CHECK OPTION
> //
>  INSERT INTO v2 (oid, val, val1) VALUES (1, 'prima a', 'sec1 a')
>  //
>  INSERT INTO v2 (oid, val, val1) VALUES (2, 'prima b', 'sec1 b')
>  //
>  INSERT INTO v2 (oid, val, val1) VALUES (3, 'prima c', 'sec1 c')
>  //
>  select * from v2

The select is not the problem.
Inserting long-columns via an updatable JOIN-view does not work.
--> do the inserts of the long-columns into the primary tables, not in the joinview.
And we will try to fix the bug as soon as possible.

Elke
SAP Labs Berlin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.