Filter out a member from SSRS (MDX) - visual-studio

Ok, So I have a dim called Employee that has Employee_ID and the ID I am trying to filter out from the report table is &[12345].
How would I go about filtering out a record for just that employee ID from my report table?

You can use the Except function:
Except('a set that contains employees', {'the employee you want to exclude'})

Related

How to get distinct single column value while fetching data by joining two tables

$data['establishments2'] = Establishments::Join("establishment_categories",'establishment_categories.establishment_id','=','establishments.id')->where('establishments.city','LIKE',$location)->where('establishments.status',0)->whereIn('establishment_id',array($est_data))->get(array('establishments.*'));
this is controller condition.
I have two tables, in table1 i am matching id with table2 and then fetching data from table1, and in table2 i have multiple values of same id in table 1. i want to get data of table1 values only one time, but as i am hvg multiple data of same id in table2 , data is repeating multiple times, can anyone please tell me how to get data only one time wheater table2 having single value or multiple value of same id... thank you
you can do it by selecting the field name you desired
instead get all field from table establishments
$data['establishments2'] = Establishments::Join("establishment_categories",'establishment_categories.establishment_id','=','establishments.id')->where('establishments.city','LIKE',$location)->where('establishments.status',0)->whereIn('establishment_id',array($est_data))->get(array('establishments.*'));
you can select specific field from table establishments like
$data['establishments2'] = Establishments::Join("establishment_categories",'establishment_categories.establishment_id','=','establishments.id')->where('establishments.city','LIKE',$location)->where('establishments.status',0)->whereIn('establishment_id',array($est_data))->get('establishments.fieldName');
or you can also do
$data['establishments2'] = `Establishments::Join("establishment_categories",'establishment_categories.establishment_id','=','establishments.id')->where('establishments.city','LIKE',$location)->where('establishments.status',0)->whereIn('establishment_id',array($est_data))->select('establishments.fieldName')->get();`

update multiple table with the same trigger DB Oracle

i'm creating a trigger, for ibm maximo application, that has to start when the field mens_ack is updated;
when that happens, the 'status' field must become of a certain value
after that i have to update another table (longdescription table) based on the relationship workorderid=ldkey
create or replace TRIGGER "MAXIMO"."CHANGE_MENS_MAINT_T"
AFTER UPDATE OF MENS_ACK ON WORKORDER
BEGIN
update workorder
set status='SCHED', statusdate= sysdate
where mens_ack='1' and status!='SCHED';
update longdescription
set ldtext= concat(ldtext, 'scheduled maintenance - '+sysdate+' ')
where ldkey = ????;
END;
I can't use NEW and OLD in this trigger, so i doesn't know how to take the WORKORDERID (the key on which the relation is based) in order to specify what record i have to find in longdescription table
can anyone help me?
You could use the RETURNING INTO clause from the first update.
https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/returninginto_clause.htm
update workorder
set status='SCHED', statusdate= sysdate
where mens_ack='1' and status!='SCHED'
returning workorderid into v_workorderid;
Watch out for the number of updated workorders, since the v_workorderid might have to be declared as an array.

Forms Builder showing MaxValue

I'm new to Oracle Forms Builder and I want to display only the max Value of a column. How can I do this?
I presume
You created a Data Block(let's call emp) which has a Query Data Source Name (assume
Oracle's famous emp table)
with Multiple Records Displayed,
and of type Tabular.
Add a max_empno to the Data Block emp, under the item empno
with Number of Items Displayed property set to 1,
Database Item property set to No,
Calculation Mode property set to Summary,
Summary Function property set to Max,
Summarized Block is emp,
Summarized Item is empno.
and setting Query All Records property of the block emp to Yes
shouldn't be forgotten. Then, When the form module is run, the
following interface will appear :

SSAS - Creating named calculation from different tables

I am having troubles when i want to create a named calculation from two different tables.
I have the table "CallesDim" with an id(PK) and a description and the table "UbicacionesDim" with an id (PK), another id (FK to "CallesDim") and a description:
--
CallesDim
id PK
Descripcion VARCHAR
--
UbicacionesDim
id PK
CalleId FK to id from CallesDIM
Altura INT
--
I want to concatenate "Descripcion" from "CallesDim" with Altura from "UbicacionesDim".
I try doing this:
CallesDim.Descripcion + ' ' + CONVERT(VARCHAR,UbicacionesDim.Altura)
but i am having the following error:
the multi-part identifier "CallesDim.Descripcion" could not be bound
Any ideas?
Thanks!
In a named calculation you can only access columns from the table that it is defined on.
Which record of the other table should it take in case it would accept columns from other tables? How should it join? All this cannot be configured.
If you need to join two (or more) tables, you can define a named query that can contain joins and access as many tables as you like. A named query can contain everything that you can state in a single select statement.

auto-populate field 2 based on field 1 in Oracle APEX4.2

i have two fields name's as Monthly salary , annual salary.
i need to write a code in oracle apex so that if i enter a monthly salary, annual salary field should auto populate based on the monthly salary added.
The most easiest way would be to create a dynamic action, wich triggers every time, when there is a change in your first field. As action you choose JavaScript and write the function and populate the second field with the result of the function.
var Field1 document.getElementById('PX_FIELD1').value;
var Field2 = Field1*12;
document.getElementById('PX_FIELD2').value=Field2;
This is just an example, but it shows you how you can read and write from a field with javascript.

Resources