db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boris Just (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4110) When deleting rows from a table name with its synonym name, Derby throws SQLSTATE 42X04.
Date Wed, 25 Nov 2009 17:20:39 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782515#action_12782515
] 

Boris Just commented on DERBY-4110:
-----------------------------------

Hi Bryan!
There is a difference between your script and my definition. In addition I have defined an
unique index on the table badax.r058100.
Without index it also works on my database.

IJ Version 10.5
ij> connect 'jdbc:derby:d:\temp\testDB;create=true';
ij> create schema BADAX;
0 Zeilen eingef³gt/aktualisiert/gel÷scht
ij> create table BADAX.R058100 (CHGTSP TIMESTAMP, DELFLAG CHAR(1), LIZENZ INTEGER, KUNDNR
INTEGER, ERSTTSP TIMESTAMP, LFDNR SMALLINT, KONTAKTART CHAR(2), KONTAKTDAT INTEGER, SCHLAGW
CHAR(60), TXT VARCHAR(2048), ERSTSPARTE CHAR(4), ERSTPRODNR CHAR(11), ERSTPGM CHAR(8), VERSION
SMALLINT);
0 Zeilen eingef³gt/aktualisiert/gel÷scht
ij> create synonym BADAX.Q058100 FOR BADAX.R058100;
0 Zeilen eingef³gt/aktualisiert/gel÷scht
ij> CREATE UNIQUE INDEX XR0581B ON BADAX.R058100(LIZENZ,KUNDNR,LFDNR,ERSTTSP);
0 Zeilen eingef³gt/aktualisiert/gel÷scht
ij> insert into "BADAX"."R058100" ("CHGTSP", "DELFLAG", "LIZENZ", "KUNDNR", "ERS
TTSP", "LFDNR", "KONTAKTART", "KONTAKTDAT", "SCHLAGW", "TXT", "ERSTSPARTE", "ERS
TPRODNR", "ERSTPGM", "VERSION") values ('2009-10-16 13:38:21.781', 'A', 105911,1
377917, '2009-10-16 13:38:21.781', 999, 'F ', 20091016, 'Fonds-Polizze/08
                               ', '<dokumente><dokument logicalID="2009-10-16-13
.38.21.734000" physicalID="P1255693101734.pdf" status="V"/></dokumente>', '    '
, '           ', '        ', 0);
1 Zeile eingef³gt/aktualisiert/gel÷scht
ij> delete from BADAX.Q058100;
FEHLER 42X04: Die Spalte 'BADAX.R058100.LIZENZ' ist in keiner Tabelle der FROM-L
iste enthalten, erscheint in einer Verkn³pfungsspezifikation und befindet sich a
u▀erhalb des Geltungsbereichs derselben oder erscheint in einer HAVING-Klausel u
nd ist nicht in der 'GROUP BY'-Liste enthalten. Wenn es sich um eine Anweisung C
REATE oder ALTER TABLE handelt, ist 'BADAX.R058100.LIZENZ' keine Spalte in der Z
ieltabelle.

> When deleting rows from a table name with its synonym name, Derby throws SQLSTATE 42X04.
> ----------------------------------------------------------------------------------------
>
>                 Key: DERBY-4110
>                 URL: https://issues.apache.org/jira/browse/DERBY-4110
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.1.3
>            Reporter: Lakshmi Prasanna
>            Assignee: Bryan Pendleton
>
> Getting an error (using Derby 10.4.1.3) when deleting records from a table using a qualified
synonymn name.
> Table Name is ABC_PROCESS_INVOCATION_XML and the synonmyn name is SYN_ABC_P_I_X
> The query being fired was
> "Delete from SYN_ABC_P_I_X where ID = ? "
> from the error log
> ---------------
> Caused by: ERROR 42X04: Column 'APP.ABC_PROCESS_INVOCATION_XML.ID' is either not in any
table in the FROM list or appears within a join specification and is outside the scope of
the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this
is a CREATE or ALTER TABLE  statement then 'APP.ABC_PROCESS_INVOCATION_XML.ID' is not a column
in the target table.
> ---------------
> After going thru few earlier bugs, a similar bug has been logged earlier bug DERBY-1784

> http://issues.apache.org/jira/browse/DERBY-1784
> But looks like the fix did not make its way to 10.4.1.3?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message