Re: ArrayIndexOutOfBoundsException when creating view

Tobias Downer <[email protected]>
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
Hi,

Did you get the error as soon as you ran the CREATE VIEW command?  Did 
you alter one of the tables the view is based on?

Does only the 'SELECT' part of the query work as expected?  eg. the 
following query;

SELECT 	DA.SCHLUESSEL AS SCHLUESSEL,
		DA.BENUTZERGRUPPE AS BENUTZERGRUPPE,
		DA.USERNAME AS USERNAME,
		DB.KUNDE AS KUNDE,
		DB.STANDZEIT AS STANDZEIT,
		DB.EINSATZDAUER AS EINSATZDAUER,
		V.VERSION AS VERSION,
FROM		DATEN_ALLG DA, DATEN_BEARB DB, VERSION V
WHERE 	DA.SCHLUESSEL=DB.DATEN_ALLG_FK
AND 		DA.SCHLUESSEL=V.REFNR
AND 		DB.DATEN_ALLG_FK=V.REFNR;

Could you explain layout of the 'DATEN_ALLG', 'DATEN_BEARB' and 
'VERSION' tables so I can try and reproduce the error.

Thanks,
Toby.

Klaudio Kaiser wrote:
> Hi,
> 
> while creating a view with mckoi (1.0.3 in Server-mode) i got an
> ArrayIndexOutOfBoundsException.
> 
> SQL-Statement:
> 
> CREATE VIEW V_DATEN_DBA AS
> 	SELECT 	DA.SCHLUESSEL AS SCHLUESSEL,
> 			DA.BENUTZERGRUPPE AS BENUTZERGRUPPE,
> 			DA.USERNAME AS USERNAME,
> 			DB.KUNDE AS KUNDE,
> 			DB.STANDZEIT AS STANDZEIT,
> 			DB.EINSATZDAUER AS EINSATZDAUER,
> 			V.VERSION AS VERSION,
> 	FROM		DATEN_ALLG DA, DATEN_BEARB DB, VERSION V
> 	WHERE 	DA.SCHLUESSEL=DB.DATEN_ALLG_FK
> 	AND 		DA.SCHLUESSEL=V.REFNR
> 	AND 		DB.DATEN_ALLG_FK=V.REFNR;
> 
> I debugged a little and it seems to be a bug in method setColumnMap(col_map,
> new_column_names) in the QueryPlan-Class.
> Is there a quick fix for this problem? I hope the view definition is ok.
> 
> Greetings
>   Klaudio


---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]
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.