SQL Anywhere 17 gives this error but I don't see any user or builtin functions. I removed aggregate functions and IsNull() and still get the complaint. What offends?
Could not execute statement.
Syntax error near 'rowid' -- Materialized view definition must not use
the following construct: 'User defined or builtin functions'
SQLCODE=-1031, ODBC 3 State="HY000"
Line 3, column 1
Create materialized view DBA.PCC_Option_DVTRisk_Mview as
SELECT
currentPCC.pcc_id,
currentPCC.product_family_option_id,
currentPCC.DVT_Status AS DVT_Risk_Factor,
currentPCC.Built AS Same_Rev_Built,
currentPCC.DVT_Status AS DVT_Status,
currentPCC.Shipped AS Same_Rev_Shipped,
otherRevPCC.Built AS Other_Rev_Built,
otherRevPCC.DVT_status AS Other_Rev_DVTd,
otherRevPCC.Shipped AS Other_Rev_Shipped
FROM
(
SELECT DBA.PCC.pcc_id,
DBA.product_families.product_code,
DBA.product_families.rev_char, DBA.PCC.option_code,
DBA.product_family_options.short_name,
product_family_option_values.product_family_option_id,
DBA.product_family_option_values."value",
CASE DVT_Status WHEN 'PASSED' THEN 0 WHEN 'FAILED' THEN 3 ELSE 1 END DVT_status,
built, shipped
FROM DBA.product_families, DBA.product_family_options, DBA.PCC, DBA.product_family_option_values
LEFT OUTER JOIN product_option_value_list ON
product_family_option_values.product_family_option_id = DBA.product_option_value_list.product_family_option_id AND
DBA.product_family_option_values."value" = DBA.product_option_value_list."value"
LEFT OUTER JOIN product_instance ON product_option_value_list.product_id = product_instance.product_id
WHERE DBA.product_families.product_family_id = DBA.product_family_options.product_family_id AND DBA.product_family_options.product_family_option_id = DBA.product_family_option_values.product_family_option_id AND
DBA.product_family_option_values.pcc_id = DBA.PCC.pcc_id AND (DBA.product_family_options.Mfg_property = 0 AND product_family_options.Active = 1)
) currentPCC
LEFT JOIN (
SELECT DBA.product_option_value_list.product_code,
DBA.product_family_options.short_name, DBA.product_families.rev_char,
DBA.product_family_option_values."value",
CASE DVT_Status WHEN 'PASSED' THEN 0 WHEN 'FAILED' THEN 3 ELSE 1 END DVT_status,
built, shipped
FROM DBA.product_families, DBA.product_family_options,
DBA.product_family_option_values, DBA.product_option_value_list
WHERE DBA.product_families.product_family_id = DBA.product_family_options.product_family_id
AND product_option_value_list.product_code = DBA.product_families.product_code
AND DBA.product_family_options.product_family_option_id = DBA.product_family_option_values.product_family_option_id
AND DBA.product_family_options.Mfg_property = 0
AND DBA.product_family_option_values."value" = DBA.product_option_value_list."value"
) otherRevPCC
ON currentPCC.short_name = otherRevPCC.short_name AND currentPCC."value" = otherRevPCC."value"
AND currentPCC.product_code = otherRevPCC.product_code
AND currentPCC.rev_char <> otherRevPCC.rev_char
CHECK IMMEDIATE REFRESH