John Singleton wrote: > > Hello All, > > I just ran into a rather weird problem in a SQL query. Basically, I > created a view from a very large query. The query runs fine when > executed as is, and the create view statement completes successfully > as well. However, when I try to select from that view I get an error, > "BD Append Not Allowed." > > > Any ideas about what this means? The query is below. >
Short answer. Oops, not exactly in connection with your query. But Longer answer: append is allowed only if the key of the record to be appended to the current tree is greater than all other keys in that tree, meaning, the 'new' record can be added/appended at the far right border of the tree. I think this is not the case in your query. But why? Please provide (in a private mail if you like, not to the full list) 0. kernel version used plus values of all installation parameters concerning . join and optimization, meaning : . select * from (either activeconfiguration or dbparameters, . depending on your version used) . where (description / parametername, depending on the table used) LIKE . '%JOIN%' or (description / parametername) LIKE '%OPTIMIZE%' 1. table definitions of all tables used in that query 2. some data of that tables (would make things easier to reproduce) 3. explain for the query 4. vtrace of the query according to http://sapdb.2scale.net/moin.cgi/VTrace with changes in step 1 and 6: default -> default select and step 4: akb -> akbm 5. info if this error occurs even if the query is done as the first query of the whole session or if it is only reproducable in some cases (meaning some intermediate file was not cleared by the work done before that query) Thank you Elke SAP Labs Berlin > Thanks, > > JLS > > SELECT > SUBSCRIPTIONS.ID AS SUBSCRIPTION_ID, > "DBA"."BILLING_ENTITY_MAPPING"."NAME" "SUBSCRIBER", > CHAR(DATE("DBA"."ORDERS"."WHEN"), USA), > "DBA"."BILLING_ADDRESSES"."ADDRESS1", > "DBA"."BILLING_ADDRESSES"."ADDRESS2", > "DBA"."BILLING_ADDRESSES"."ADDRESS3", > "DBA"."BILLING_ADDRESSES"."CITY", > "DBA"."BILLING_ADDRESSES"."STATE", > "DBA"."BILLING_ADDRESSES"."ZIP", > "DBA"."BILLING_ADDRESSES"."COUNTRY", > "DBA"."PEOPLE"."FIRSTNAME" "CONTACT_FIRST_NAME", > "DBA"."PEOPLE"."LASTNAME" "CONTACT_LAST_NAME", > "DBA"."ORGANIZATION_CONTACTS"."WORKPHONE", > "DBA"."ORGANIZATION_CONTACTS"."CELLPHONE", > "DBA"."ORGANIZATION_CONTACTS"."FAX", > "DBA"."ORGANIZATION_CONTACTS"."EMAIL", > (CASE WHEN (ORDERS.QTY >=2) THEN TRUE ELSE FALSE END) AS > IS_BUNDLE > FROM > "DBA"."SUBSCRIPTIONS","DBA"."ORDERS","DBA"."BILLING_ENTITY_MAPPING","DBA ". > "BILLING_ADDRESSES","DBA"."PEOPLE","DBA"."ORGANIZATION_CONTACTS" > WHERE "DBA"."SUBSCRIPTIONS"."ID"= "DBA"."ORDERS"."ITEM" > AND "DBA"."ORDERS"."BILL_TO"= "DBA"."BILLING_ENTITY_MAPPING"."ADDRESS_ID" > AND "DBA"."BILLING_ADDRESSES"."ID"= "DBA"."ORDERS"."BILL_TO" > AND "DBA"."ORDERS"."BILLING_ATTN"= "DBA"."PEOPLE"."ID" > AND "DBA"."ORGANIZATION_CONTACTS"."PERSON_ID"= "DBA"."PEOPLE"."ID" > AND "DBA"."BILLING_ADDRESSES".PERSON_ID IN (SELECT ID FROM ORGANIZATIONS) > > UNION ALL > > SELECT > SUBSCRIPTIONS.ID AS SUBSCRIPTION_ID, > "DBA"."BILLING_ENTITY_MAPPING"."NAME" "SUBSCRIBER", > CHAR(DATE("DBA"."ORDERS"."WHEN"), USA), > "DBA"."BILLING_ADDRESSES"."ADDRESS1", > "DBA"."BILLING_ADDRESSES"."ADDRESS2", > "DBA"."BILLING_ADDRESSES"."ADDRESS3", > "DBA"."BILLING_ADDRESSES"."CITY", > "DBA"."BILLING_ADDRESSES"."STATE", > "DBA"."BILLING_ADDRESSES"."ZIP", > "DBA"."BILLING_ADDRESSES"."COUNTRY", > "DBA"."PEOPLE"."FIRSTNAME" "CONTACT_FIRST_NAME", > "DBA"."PEOPLE"."LASTNAME" "CONTACT_LAST_NAME", > "DBA"."PEOPLE"."WORKPHONE", > "DBA"."PEOPLE"."CELLPHONE", > "DBA"."PEOPLE"."FAX", > "DBA"."PEOPLE"."EMAIL", > (CASE WHEN (ORDERS.QTY >=2) THEN TRUE ELSE FALSE END) AS IS_BUNDLE > FROM > "DBA"."SUBSCRIPTIONS","DBA"."ORDERS","DBA"."BILLING_ENTITY_MAPPING","DBA ". > "BILLING_ADDRESSES","DBA"."PEOPLE" > WHERE "DBA"."SUBSCRIPTIONS"."ID"= "DBA"."ORDERS"."ITEM" > AND "DBA"."ORDERS"."BILL_TO"= "DBA"."BILLING_ENTITY_MAPPING"."ADDRESS_ID" > AND "DBA"."BILLING_ADDRESSES"."ID"= "DBA"."ORDERS"."BILL_TO" > AND "DBA"."ORDERS"."BILLING_ATTN"= "DBA"."PEOPLE"."ID" > AND "DBA"."BILLING_ADDRESSES".PERSON_ID IN (SELECT ID FROM PEOPLE) > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
