management.order_management_dated
Error in query number 7
We are sorry, but an error occurred while generating this page. You should contact the site's administrator.
In "dwui/table/management.order_management_dated.sql": Failed to set variable records_count: In "dwui/table/management.order_management_dated.sql": The following error occurred while executing an SQL statement:
error returned from database: ODBC emitted an error calling 'SQLExecDirect':
State: 42501, Native error: 1, Message: ERROR: permission denied for view order_management;
Error while executing the query
The SQL statement sent by SQLPage was:
SELECT COUNT(*) FROM management.order_management_dated WHERE (CAST(? AS TEXT) IS NULL OR (((CAST(? AS TEXT)::JSONB) ->> 'uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'uuid')::UUID = uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'part_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'part_uuid')::UUID = part_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'partcode' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'partcode')::INT8 = partcode) AND ((CAST(? AS TEXT)::JSONB) ->> 'part_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'part_title')::"varchar" = part_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'part_description' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'part_description')::"varchar" = part_description) AND ((CAST(? AS TEXT)::JSONB) ->> 'document' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'document')::TEXT = document) AND ((CAST(? AS TEXT)::JSONB) ->> 'search_vector' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'search_vector')::TSVECTOR = search_vector) AND ((CAST(? AS TEXT)::JSONB) ->> 'partstatus_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'partstatus_title')::"varchar" = partstatus_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'partstatus_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'partstatus_uuid')::UUID = partstatus_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'company_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'company_uuid')::UUID = company_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'company_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'company_title')::"varchar" = company_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'managing_user_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'managing_user_uuid')::UUID = managing_user_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'managing_user_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'managing_user_title')::"varchar" = managing_user_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'purchase_order_reference' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'purchase_order_reference')::TEXT = purchase_order_reference) AND ((CAST(? AS TEXT)::JSONB) ->> 'item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'item_count')::"numeric" = item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'sale_price_inclusive_p_pc' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'sale_price_inclusive_p_pc')::"numeric" = sale_price_inclusive_p_pc) AND ((CAST(? AS TEXT)::JSONB) ->> 'sale_price_inclusive' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'sale_price_inclusive')::"numeric" = sale_price_inclusive) AND ((CAST(? AS TEXT)::JSONB) ->> 'order_date_ts' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'order_date_ts')::TIMESTAMPTZ = order_date_ts) AND ((CAST(? AS TEXT)::JSONB) ->> 'deliver_ts' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'deliver_ts')::TIMESTAMPTZ = deliver_ts) AND ((CAST(? AS TEXT)::JSONB) ->> 'commitment_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'commitment_uuid')::UUID = commitment_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'project_code' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'project_code')::TEXT = project_code) AND ((CAST(? AS TEXT)::JSONB) ->> 'description' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'description')::"varchar" = description) AND ((CAST(? AS TEXT)::JSONB) ->> 'customer_name' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'customer_name')::TEXT = customer_name) AND ((CAST(? AS TEXT)::JSONB) ->> 'record_created_by_user_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'record_created_by_user_uuid')::UUID = record_created_by_user_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'note_for_procurement' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'note_for_procurement')::TEXT = note_for_procurement) AND ((CAST(? AS TEXT)::JSONB) ->> 'note_for_management' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'note_for_management')::TEXT = note_for_management) AND ((CAST(? AS TEXT)::JSONB) ->> 'order_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'order_title')::"varchar" = order_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'overproduction_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'overproduction_item_count')::INT8 = overproduction_item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'minimal_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'minimal_item_count')::"numeric" = minimal_item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'all_delivered' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'all_delivered')::INT8 = all_delivered) AND ((CAST(? AS TEXT)::JSONB) ->> 'delay_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'delay_item_count')::INT8 = delay_item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'estimated_purchase_price_p_pc' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'estimated_purchase_price_p_pc')::mpq = estimated_purchase_price_p_pc) AND ((CAST(? AS TEXT)::JSONB) ->> 'cancellation_requested' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'cancellation_requested')::INT4 = cancellation_requested) AND ((CAST(? AS TEXT)::JSONB) ->> 'commitment_start_ts' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'commitment_start_ts')::TIMESTAMPTZ = commitment_start_ts) AND ((CAST(? AS TEXT)::JSONB) ->> 'commitment_end_ts' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'commitment_end_ts')::TIMESTAMPTZ = commitment_end_ts) AND ((CAST(? AS TEXT)::JSONB) ->> 'cancellation_reason' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'cancellation_reason')::TEXT = cancellation_reason) AND ((CAST(? AS TEXT)::JSONB) ->> 'date' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'date')::TIMESTAMPTZ = date) AND ((CAST(? AS TEXT)::JSONB) ->> 'isnow' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'isnow')::INT8 = isnow) AND ((CAST(? AS TEXT)::JSONB) ->> 'dated_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'dated_item_count')::"numeric" = dated_item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'dated_sale_price_inclusive_p_pc' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'dated_sale_price_inclusive_p_pc')::"numeric" = dated_sale_price_inclusive_p_pc) AND ((CAST(? AS TEXT)::JSONB) ->> 'dated_sale_price_inclusive' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'dated_sale_price_inclusive')::"numeric" = dated_sale_price_inclusive) AND ((CAST(? AS TEXT)::JSONB) ->> 'dated_minimal_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'dated_minimal_item_count')::"numeric" = dated_minimal_item_count)))
dwui/table/management.order_management_dated.sql: line 48
dwui/table/management.order_management_dated.sql: line 48 Backtrace
Failed to set variable records_countIn "dwui/table/management.order_management_dated.sql": The following error occurred while executing an SQL statement:
error returned from database: ODBC emitted an error calling 'SQLExecDirect':
State: 42501, Native error: 1, Message: ERROR: permission denied for view order_management;
Error while executing the query
The SQL statement sent by SQLPage was:
SELECT COUNT(*) FROM management.order_management_dated WHERE (CAST(? AS TEXT) IS NULL OR (((CAST(? AS TEXT)::JSONB) ->> 'uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'uuid')::UUID = uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'part_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'part_uuid')::UUID = part_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'partcode' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'partcode')::INT8 = partcode) AND ((CAST(? AS TEXT)::JSONB) ->> 'part_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'part_title')::"varchar" = part_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'part_description' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'part_description')::"varchar" = part_description) AND ((CAST(? AS TEXT)::JSONB) ->> 'document' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'document')::TEXT = document) AND ((CAST(? AS TEXT)::JSONB) ->> 'search_vector' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'search_vector')::TSVECTOR = search_vector) AND ((CAST(? AS TEXT)::JSONB) ->> 'partstatus_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'partstatus_title')::"varchar" = partstatus_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'partstatus_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'partstatus_uuid')::UUID = partstatus_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'company_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'company_uuid')::UUID = company_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'company_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'company_title')::"varchar" = company_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'managing_user_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'managing_user_uuid')::UUID = managing_user_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'managing_user_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'managing_user_title')::"varchar" = managing_user_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'purchase_order_reference' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'purchase_order_reference')::TEXT = purchase_order_reference) AND ((CAST(? AS TEXT)::JSONB) ->> 'item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'item_count')::"numeric" = item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'sale_price_inclusive_p_pc' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'sale_price_inclusive_p_pc')::"numeric" = sale_price_inclusive_p_pc) AND ((CAST(? AS TEXT)::JSONB) ->> 'sale_price_inclusive' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'sale_price_inclusive')::"numeric" = sale_price_inclusive) AND ((CAST(? AS TEXT)::JSONB) ->> 'order_date_ts' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'order_date_ts')::TIMESTAMPTZ = order_date_ts) AND ((CAST(? AS TEXT)::JSONB) ->> 'deliver_ts' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'deliver_ts')::TIMESTAMPTZ = deliver_ts) AND ((CAST(? AS TEXT)::JSONB) ->> 'commitment_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'commitment_uuid')::UUID = commitment_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'project_code' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'project_code')::TEXT = project_code) AND ((CAST(? AS TEXT)::JSONB) ->> 'description' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'description')::"varchar" = description) AND ((CAST(? AS TEXT)::JSONB) ->> 'customer_name' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'customer_name')::TEXT = customer_name) AND ((CAST(? AS TEXT)::JSONB) ->> 'record_created_by_user_uuid' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'record_created_by_user_uuid')::UUID = record_created_by_user_uuid) AND ((CAST(? AS TEXT)::JSONB) ->> 'note_for_procurement' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'note_for_procurement')::TEXT = note_for_procurement) AND ((CAST(? AS TEXT)::JSONB) ->> 'note_for_management' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'note_for_management')::TEXT = note_for_management) AND ((CAST(? AS TEXT)::JSONB) ->> 'order_title' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'order_title')::"varchar" = order_title) AND ((CAST(? AS TEXT)::JSONB) ->> 'overproduction_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'overproduction_item_count')::INT8 = overproduction_item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'minimal_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'minimal_item_count')::"numeric" = minimal_item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'all_delivered' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'all_delivered')::INT8 = all_delivered) AND ((CAST(? AS TEXT)::JSONB) ->> 'delay_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'delay_item_count')::INT8 = delay_item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'estimated_purchase_price_p_pc' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'estimated_purchase_price_p_pc')::mpq = estimated_purchase_price_p_pc) AND ((CAST(? AS TEXT)::JSONB) ->> 'cancellation_requested' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'cancellation_requested')::INT4 = cancellation_requested) AND ((CAST(? AS TEXT)::JSONB) ->> 'commitment_start_ts' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'commitment_start_ts')::TIMESTAMPTZ = commitment_start_ts) AND ((CAST(? AS TEXT)::JSONB) ->> 'commitment_end_ts' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'commitment_end_ts')::TIMESTAMPTZ = commitment_end_ts) AND ((CAST(? AS TEXT)::JSONB) ->> 'cancellation_reason' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'cancellation_reason')::TEXT = cancellation_reason) AND ((CAST(? AS TEXT)::JSONB) ->> 'date' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'date')::TIMESTAMPTZ = date) AND ((CAST(? AS TEXT)::JSONB) ->> 'isnow' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'isnow')::INT8 = isnow) AND ((CAST(? AS TEXT)::JSONB) ->> 'dated_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'dated_item_count')::"numeric" = dated_item_count) AND ((CAST(? AS TEXT)::JSONB) ->> 'dated_sale_price_inclusive_p_pc' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'dated_sale_price_inclusive_p_pc')::"numeric" = dated_sale_price_inclusive_p_pc) AND ((CAST(? AS TEXT)::JSONB) ->> 'dated_sale_price_inclusive' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'dated_sale_price_inclusive')::"numeric" = dated_sale_price_inclusive) AND ((CAST(? AS TEXT)::JSONB) ->> 'dated_minimal_item_count' IS NULL OR ((CAST(? AS TEXT)::JSONB) ->> 'dated_minimal_item_count')::"numeric" = dated_minimal_item_count)))
dwui/table/management.order_management_dated.sql: line 48Note: You can hide error messages like this one from your users by setting the 'environment' configuration option to 'production'.