R. Vajsar wrote: > > Oh yes. I'm only looking for relationship between primary key, SYSKEY and > error 4005 ("check if the table mentioned has a user-defined primary key > (then SYSKEY will NOT exist) or not"). If a view hasn't index, then SYSKEY > doesn't exist and error 4005 in this case is a feature? > The primary problem is error: Column not found,-4005 POS(32) Unknown > column name:SYSKEY > when I want to get data from view through ODBC into MS query. Base table > of view has index. > I inspect the vtrace file, but I don't see anything useful:-( > R.V.
You mix things. An index and the existence or not-existence of an index has NOTHING to do with each other. A view does not have a column syskey, even if select * from table_tab and table_tab has no user-defined-key, meaning table_tab has a column named syskey. Why did you not send the vtrace to the list as I asked you to do if you are not able to find the problem? With your explanation, mixing up things and without the statements, noone will be able to explain what is going on. Elke SAP Labs Berlin > > Zabach, Elke wrote: > > > R. Vajsar wrote: > >>The error occures only when creating a query based on VIEW: > >>(CREATE VIEW K_P_VYVOJ AS SELECT ID, KLIENT_ID, PRODUKT, SMLOUV_TYP, > ZMENA > >>= 1, VALUE(DATUM_OD,'1994-01-01') AS DATUM FROM KLIENT_PRODUKT UNION > >>SELECT ID, KLIENT_ID, PRODUKT, SMLOUV_TYP, ZMENA = -1, DATUM_VRAC AS > DATUM > >>FROM KLIENT_PRODUKT WHERE DATUM_VRAC IS NOT NULL). > >> > >>SYSKEY not exist probably - I can't create index for this view. What am > I > >>doing wrong? > >>R. V. > >> > > > > > Do I understand correctly that you try to do a create index for the view > > K_P_VYVOJ? > > You never can create an index for a VIEW. You only can create index for > > basetables, in your case KLIENT_PRODUKT (I hope, this is no view, too). > > > > > > Elke > > SAP Labs Berlin > > > > > >>Zabach, Elke wrote: > >> > >> > >>>R. Vajsar wrote > >>> > >>> > >>>>Hello, > >>>> > >>>>We are using the MaxDB version 7.5.00.19. My application works well, > but > >>>>when I'm using Microsoft Query to import data from view, the error > >>>>occures: Column not found,-4005 POS(32) Unknown column name:SYSKEY. > >>>>Has anyone an idea, what can I do? > >>> > >>>As I do not know the statements sent to the kernel in this context, as > I > >>>do not know the table being part of the statement resulting in that > >>>error and as I do not know if this table does have a user-defined > >>>primary key or not: > >>>You can do a vtrace according to > >>>http://sapdb.2scale.net/moin.cgi/VTrace, but change default in 1. > >>>and 6. to default order . > >>>The search in the resulting file for -4005, look upwards a little bit > >>>(to the corresponding part starting with REQUEST:), inspect the SQL, > you > >>>will find there and then check if the table mentioned has a user- > defined > >>>primary key (then SYSKEY will NOT exist) or not. > >>> > >>>If that will not give the idea what happens, send the table definition > >>>and the statement resulting in the error to the list. -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]