Error "defines an Unary Operator as aggregation type but is missing member property '#UO'" - iccube

I am using Unary Operator as Aggregation Type to calculate Measure and defining Rollup Hierarchy and it is working fine till data is present in underlying tables.
But getting below error if underlying table doesn't have any data.
The rollup hierarchy '[LR Structures].[LR Structures]' in measure '_LR Amount 1' defines an Unary Operator as aggregation type but is missing member property '#UO'
I have already defined the Unknown member as 'Unknown'

From icCube 6.8.6, this validity check will be relaxed for "empty" hierarchies used as rollup. It is left up to the user not to use the corresponding measures.

Related

How to query a DynamoDB index with Dynamoose?

I have a DynamoDB table with animals and I'm interacting with it using Dynamoose. My table has a 'UserId' attribute, that indicates the user that registered that animal. I want to write a query that finds all the animals registered by the same user, i.e., gets all the items that have the attribute 'UserId' matching the input string.
I'm trying to use Dynamoose's queries like this MyModel.query('UserId').eq(user.id).using('UserId-index').exec();, but it always gives this error Index can't be found for query. I imagine that this is caused because it is not finding the index for the attribute 'UserId', but I have an index 'UserId-index' on my table.
I also tried specifying the index that should be used on the query with the using() method, like this MyModel.query('UserId').eq(user.id).using('UserId-index').exec();, but it gave me this other error: Either the KeyConditions or KeyConditionExpression parameter must be specified in the request, which I don't get at all.
Note that I don't wanna use scan(), as the official documentation highly encourages the developers to use query() instead.

bind parameter inside a lexical parameter oracle reports builder

Is there a way to use a bind parameter inside a lexical parameter query something like this?:
select col from tbl where col = :bind_param
note: the code above is an input in a lexical parameter
When saying a "lexical query", do you mean a "lexical parameter"?
If I understood you correctly, then yes - you can do that, by setting it in the After Parameter Form trigger. (BTW, that's where I set my lexical parameters' values, always).
Open Reports Online Help System and search for "lexical". It is very well described. I believe that this is what you are asking:
A lexical reference cannot be used to create additional bind variables
after the After Form trigger fires. For example, suppose you have a
query like the following (note that the WHERE clause is replaced by a
lexical reference):
SELECT ENAME, SAL FROM EMP
&where_clause
If the value of the where_clause parameter contains a reference to a
bind variable, you must specify the value in the After Form trigger or
earlier (*LF). You would get an error if you supplied the following value
for the parameter in the Before Report trigger:
WHERE SAL = :new_bind
If you supplied this same value in the After Form trigger, the report
would run.
(*LF) Now, that's somewhat contradictory - "or earlier" actually is the Before Report trigger, so ... take it with caution. As I've said (and I'll repeat it): I set lexical parameters' values in the After Parameter Form. Worked always (for me).

How do I define a dimension so that null values in the FK are not ignored when showing all values?

I a modeling an OLAP cube using Modrian Workbench Schema and using Jaspersoft to present it. The cube is built upon a fact table with FKs to dimension tables.
Currently my fact table has nullable foreign keys to the dimensions, which I personally find interesting (and, as far as I know, it is just s styling decision whether to use nullable or not nullable FKs ( https://dba.stackexchange.com/questions/3512/fact-table-foreign-keys-null ).
The problem is that when selecting ALL States (State is a dimension in my design), I get only the records that have a state, not the records without states (in which the state id is null).
Is Mondrian capable of getting the rows that have not state id information? How can I define that?
I think you'll have to go with non-nullable FKs and a none / n/a / unknown etc. member if you want the ALL member to refer to all facts.
If you later want to write queries that only consider rows with real dimension values, you can exclude the none member again.

Apply operator in SQL and report viewer

I have a stored procedure that I'm trying to call from report viewer and I'm getting the error below
Exception has been thrown by the target of an invocation.
Failed to enable constraints. One or more rows contain values
violating non-null, unique, or foreign-key constraints.
The underlying SP makes use of the apply operator to join a function and a table. How do i fix the error?

procedure declaration error (PLS-00488)

I am trying to make a procedure return a subset of records as a single type a_ntt meeting a certain requirement for which I am trying to define a cursor a_cur, and this is the relevant code for my question:
a_t a_cur%ROWTYPE;
TYPE a_ntt IS TABLE OF a_t;
l_a a_ntt;
My database server throws PLS-00488 (invalid variable declaration object must be a type or subtype) considering variable a_t. I would like to know why. To me it seems I have provided a type to a_t, I would suggest ROWTYPE does that for me, but obviously I am not getting something.
I would like to know why this error occurs, why declaring a_t as a_cur%ROWTYPE does not prevent this.
Just to make sure, I have resolved the issue by adding %TYPE to the line, so TYPE a_ntt IS TABLE OF a_t%TYPE;, but I would like to know why this is necessary.
a_t is not a type. It is a variable whose type is a_cur%ROWTYPE. You can't use it as a type.
a_t%TYPE is a type though, so that works.
The syntax diagrams for the "collection variable declaration" is in the PL/SQL docs. You'll see that either you need a type, or a rowtype_attribute which has cursor, table or view name with %ROWTYPE attached, or a type_attribute which is essentially a variable name with %TYPE attached.

Resources