Passing Parameters For Same Columns In 2 Different Tables
OBIEE 11g
I have 2 different dimension tables in my Subject Area.
Dim1 has following columns: Promotion Code, Promotion Description, Promotion Date
Fact1 has following columns: a_count, b_count, c_count
Dim2 has following columns: Promotion Code, Promotion Description, Promotion Date
Fact2 has following columns: a_count, b_count, c_count, d_count
Report 1 has following columns: Promotion Code, Promotion Description, Promotion Date, a_count, b_count, c_count (From Dim1 & Fact1)
Report 2 has following columns: Promotion Code, Promotion Description, Promotion Date, a_count, b_count, c_count, d_count (From Dim2 & Fact2)
I have tried to pass the parameters Promotion Code, Promotion Description, Promotion Date from Report 1 to Report 2 but this has not worked for me as Report 2 is not receiving the parameters. Is there a way I can do this. Thanks in advance.
Thanks for your response Jay,
In Report 1 I have added prompts (Prompts tab) for Promotion Code, Promotion Description and Promotion Date. I have also set the following presentation variables in the prompts:
PromotionCode,
PromotionDescription
PromotionDate
In Report 2 I then add a filter for each of the same columns and match them to the presentation variables created in Report 1 as follows:
Promotion Code is equal to / is in @{PromotionCode}
Promotion Description is equal to / is in @{PromotionDescription}
Promotion Date is equal to / is in @{PromotionDate}
My expectation is that the values in the presentation variables will be passed from the Prompts in Report 1 to the filters in Report 2. This is not what is happening. Im not sure what I am doing wrong.
Similar Messages
-
Same column name from different table
i have a sql query as like this : "SELECT * FROM TABLE1,TABLE2". i use oracle. both TABLE1 and TABLE2 have the same column named 'COLUMN1'. while i get rows how i know the value of COLUMN1 from which table (TABLE1 or TABLE2).
sample code snippet is above. do u help me!
while (rs.next())
value1 = rs.getString("COLUMN1");
// is value1's value from table1 or table2. how do i know this?
// i try value1 = rs.getString("TABLE1.COLUMN1"); but it doesn't work :(
....I case you don't know what an alias is, it would look something like this:
SELECT a.COLUMN1 as FirstColumn1, b.COLUMN1 as SecondColumn1 FROM FirstTable a, SecondTable b
Notice that in the FROM clause we've appended a short name for each table. You're not limited to one character, but I try to keep it simple. Now we can refer to the tables as a and b.
Because I did that I have to refer to any ambiguous columns (although it's good practice to refer to ALL columns) using the table name prefix and a period. This tells the driver which "COLUMN1" I want. Then we include as AS clause which allows us to tell the driver what we want that column name to be when it's returned to us. This is specially usefule when I have two columns in two separate tables with the same name (as you have here) or if I'm calculating data (i.e. (a.QTY * b.PRICE) as UnitPrice) that doesn't have a column name, so here I can give it one.
It's a little weird at first since you use the alias names in the select before you actually define them in the FROM clause, but you'll get use to it.
Now you retrieve FirstColumn1 and SecondColumn1 from your ResultSet, not Column1.
HTH. -
How To Create Table View With Same Column name But Different Table?
Hi All,
I have the problem to create a tableview with same column name but in different table.
The Table that i have:-
Table - PAC051MPROFORMA
Column - mrn,visitid
Table - PAC051TPROFORMA
Column - mrn,visitid
Table - PAC052MTRANSBILL
Column - mrn,visitid
Then i want to create a table view to view that table. This is my SQL
CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
where
*(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
and
*(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
That SQL Return this error = ORA-00957: duplicate column name
Then I modify that SQL to
CREATE VIEW pacviewproforma (mrn,visitid)
As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
where
*(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
and
*(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
This time this error return = ORA-01730: invalid number of column names specified
What should i do?
Thanks...Hi,
SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
2 As Select
3 PAC051MPROFORMA.mrn,
4 PAC051MPROFORMA.visitid,
5 PAC051TPROFORMA.mrn,
6 PAC051TPROFORMA.visitid,
7 PAC052MTRANSBILL.mrn,
8 PAC052MTRANSBILL.visitid
9 from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
10 where
11 (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
12 and
13 (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
ERROR at line 1:
ORA-00957: duplicate column namePlease give different names to each column.
Something like this..
SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
_visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
2 As Select
3 PAC051MPROFORMA.mrn,
4 PAC051MPROFORMA.visitid,
5 PAC051TPROFORMA.mrn,
6 PAC051TPROFORMA.visitid,
7 PAC052MTRANSBILL.mrn,
8 PAC052MTRANSBILL.visitid
9 from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
10 where
11 (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
12 and
13 (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
View created.
SQL> DESC pacviewproforma;
Name Null? Type
MPROFORMA_MRN NUMBER
MPROFORMA_VISITID NUMBER
TPROFORMA_MRN NUMBER
TPROFORMA_VISITID NUMBER
MTRANSBILL_MRN NUMBER
MTRANSBILL_VISITID NUMBER
ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
Twinkle -
Best practice for a same query against 2 different tables
Hello all,
I want to extract info about tablespaces storage, both permanent and temporary. For that I use 2 different cursors that do exactly the same query but against a different table (dba_data_files and dba_temp_files).
CURSOR permanentTBSStorageInfo (tablespaceName VARCHAR2) IS
SELECT file_name, bytes, autoextensible, maxbytes, increment_by
FROM dba_data_files
WHERE tablespace_name = tablespaceName;
CURSOR temporaryTBSStorageInfo (tablespaceName VARCHAR2) IS
SELECT file_name, bytes, autoextensible, maxbytes, increment_by
FROM dba_temp_files
WHERE tablespace_name = tablespaceName;
First I'm bothered that I have to use 2 cursors to execute the same query against 2 different tables. Is there no another way around?
Then I fetch the results of this cursors in 2 different loops because I didn't find a way to dynamically call the cursors. I am looking for best practice here, knowing that I will do the same parsing against the results of the 2 cursors.
Thank you,Hi
Check whether the below query is helpful or not
select fs.tablespace_name "Tablespace",
fs.tempspace "Temp MB",
df.totalspace "Total MB"
from
(select
tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from
dba_data_files
group by
tablespace_name
) df,
(select
tablespace_name,
round(sum(bytes) / 1048576) tempSpace
from
dba_temp_files
group by
tablespace_name
) fs
where
df.tablespace_name = fs.tablespace_name;
Thanks -
Introduction
In SQL Server Reporting Services, we can define a mapping between the fields that are returned in the query to specific delivery options and to report parameters in a data-driven subscription.
For a report with a parameter (such as YEAR) that allow multiple values, when creating a data-driven subscription, how can we pass a record like below to show correct data (data for year 2012, 2013 and 2014).
EmailAddress Parameter
Comment
[email protected] 2012,2013,2014 NULL
In this article, I will demonstrate how to configure a Data Driven Subscription which get multi-value parameters from one column of a database table
Workaround
Generally, if we pass the “Parameter” column to report directly in the step 5 when creating data-driven subscription.
The value “2012,2013,2014” will be regarded as a single value, Reporting Services will use “2012,2013,2014” to filter data. However, there are no any records that YEAR filed equal to “2012,2013,2014”, and we will get an error when the subscription executed
on the log. (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles)
Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'Name' is not a valid value.
This means that there is no such a value on parameter’s available value list, this is an invalid parameter value. If we change the parameter records like below.
EmailAddress Parameter Comment
[email protected] 2012 NULL
[email protected] 2013 NULL
[email protected] 2014 NULL
In this case, Reporting Services will generate 3 reports for one data-driven subscription. Each report for only one year which cannot fit the requirement obviously.
Currently, there is no a solution to solve this issue. The workaround for it is that create two report, one is used for view report for end users, another one is used for create data-driven subscription.
On the report that used create data-driven subscription, uncheck “Allow multiple values” option for the parameter, do not specify and available values and default values for this parameter. Then change the Filter
From
Expression:[ParameterName]
Operator :In
Value :[@ParameterName]
To
Expression:[ParameterName]
Operator :In
Value :Split(Parameters!ParameterName.Value,",")
In this case, we can specify a value like "2012,2013,2014" from database to the data-driven subscription.
Applies to
Microsoft SQL Server 2005
Microsoft SQL Server 2008
Microsoft SQL Server 2008 R2
Microsoft SQL Server 2012
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.For every Auftrag, there are multiple Position entries.
Rest of the blocks don't seems to have any relation.
So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
Try out this snippet.
DATA lt_data TYPE TABLE OF string.
DATA lv_data TYPE string.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = 'C:\temp\test.txt'
CHANGING
data_tab = lt_data
EXCEPTIONS
OTHERS = 19.
CHECK sy-subrc EQ 0.
TYPES:
BEGIN OF ty_str,
a1 TYPE string,
a2 TYPE string,
a3 TYPE string,
p1 TYPE string,
p2 TYPE string,
p3 TYPE string,
END OF ty_str.
DATA: lt_str TYPE TABLE OF ty_str,
ls_str TYPE ty_str,
lv_block TYPE string,
lv_flag TYPE boolean.
LOOP AT lt_data INTO lv_data.
CASE lv_data.
WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
lv_block = lv_data.
lv_flag = abap_false.
WHEN OTHERS.
lv_flag = abap_true.
ENDCASE.
CHECK lv_flag EQ abap_true.
CASE lv_block.
WHEN '[Auftrag]'.
SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
WHEN '[Position]'.
SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
APPEND ls_str TO lt_str.
ENDCASE.
ENDLOOP. -
How to get only column names from different tables as single table columns
Hi All,
I have one requirement in which we want only column names from different tables.
for example :
I have three tables T1 ,T2, T3 having
col1 clo2 clo3 --> T1 ,
col3 col5 ,clo6 --> T2 ,
Clo6 col8 col9 --> T3
columns i want to get only all Column names from all table as single Resultset not any data from that how can i get that empty resultset
because this empty result i want to bind in datagridview(front end) as Empty resultset
Please tell me anyways to do this
Niraj SevalkarIf I understand you want an empty result set, just with metadata. SET FMTONLY do the trick:
SET FMTONLY ON
SELECT Col1, Col2, Col3, ....., Coln
FROM
T1 CROSS JOIN T2 CROSS JOIN T3
SET FMTONLY OFF
Another alternative is to include an imposible contition
SELECT Col1, Col2, Col3, ....., Coln
FROM
T1 CROSS JOIN T2 CROSS JOIN T3
WHERE 1 = 0
If you are using a SqlDataAdapter in your client application. You can use the FillSchema method. the select command may be any select statement that returns the columns you want. Under the covers FillSchema will call SET FMTONLY ON.
If you are using SqlCommand.ExecuteReader you can pass SchemaOnly to CommandBehavior argument. SET FMTONLY ON is called under the covers. Again the select command may be any select statement that returns the columns you want.
"No darás tropezón ni desatino que no te haga adelantar camino" Bernardo Balbuena -
Sum of same fields in two different tables
Hi ,
I am facing a problem, hope anyone would help
I have two tables.. here is the sample data..
create table t1
(item_ID NUMBER(2),
book_ID NUMBER(2),
price NUMBER(2))
insert into t1 (item_ID, book_ID, price) values (1,1,60);
insert into t1 (item_ID, book_ID, price) values (1,2,70);
insert into t1 (item_ID, book_ID, price) values (1,3,80);
insert into t1 (item_ID, book_ID, price) values (2,1,10);
insert into t1 (item_ID, book_ID, price) values (2,1,20);
insert into t1 (item_ID, book_ID, price) values (1,3,40);
create table t2
(item_ID NUMBER(2),
book_ID NUMBER(2),
price NUMBER(2))
insert into t2 (item_ID, book_ID, price) values (1,1,89);
insert into t2 (item_ID, book_ID, price) values (1,2,29);
insert into t2 (item_ID, book_ID, price) values (1,3,99);
insert into t2 (item_ID, book_ID, price) values (2,1,55);
insert into t2 (item_ID, book_ID, price) values (2,1,90);
insert into t2 (item_ID, book_ID, price) values (1,3,10);
as you can see, both tables have the same column names with different data. what
I require is that i need to calculate the SUM of price grouped by book_id from
both the tables in a single SQL statement output.
so my required output is this:
BOOK_ID SUM(PRICE)
1 323
2 99
3 229
where the SUM(price) for each book_id is for all the books in both the tables
where book_id = 1 and then 2 in the second row and then 3 in the third row.
Would anyone please help, as I am unable to write the query for this.?
Thanks,
Sonali.<quote>I was just curious if we can do that by some other SQl query and using UNION ALL operator...</quote>
Of course there are other ways to do it ... but not necessarily better ... just to satisfy your curiosity:
flip@FLOP> select book_id,sum(price) from t1 group by book_id;
BOOK_ID SUM(PRICE)
1 5898240
2 4587520
3 7864320
4 2621440
Elapsed: 00:00:01.02
flip@FLOP> select book_id,sum(price) from t2 group by book_id;
BOOK_ID SUM(PRICE)
1 30670848
2 3801088
3 15597568
5 1310720
Elapsed: 00:00:02.06
flip@FLOP> SELECT book_id, sum(price)
2 FROM ( select * from t1
3 union all
4 select * from t2
5 )
6 GROUP BY book_id;
Â
BOOK_ID SUM(PRICE)
1 36569088
2 8388608
3 23461888
4 2621440
5 1310720
Â
Elapsed: 00:00:04.01
flip@FLOP>
flip@FLOP> with a1 as
2 (
3 select book_id, sum(price) p
4 from t1
5 group by book_id
6 )
7 ,a2 as
8 (
9 select book_id, sum(price) p
10 from t2
11 group by book_id
12 )
13 select nvl(a1.book_id,a2.book_id), nvl(a1.p,0)+nvl(a2.p,0) p
14 from a1 full outer join a2 on (a1.book_id = a2.book_id)
15 ;
Â
NVL(A1.BOOK_ID,A2.BOOK_ID) P
1 36569088
2 8388608
3 23461888
4 2621440
5 1310720
Â
Elapsed: 00:00:04.02 -
Retrieve data from 2 columns of 2 different tables and display in 1 column
Hi,
Is it possible to retrieve data from 2 different columns of 2 different tables and display it in the same column of a datablock in a form.
For example:
Table A
Col1
1
2
3
Table B
Col1
2
4
5
The column from the datablock in the form should display the following:
1
2
3
2
4
5You can create a view
select ... from table_a
union
select ... from table_b
and base the block on that.
However, if you want to allow DML on the block it gets more complicated. -
Sum two different columns from two different tables
Can you select and sum two different columns, from two different tables in the same sql statement?
i.e.
table1
Item----OnHand_Qty
A--------10
A--------15
B--------10
B--------10
C--------20
table2
Item----Trx_Qty
A--------2
A--------4
A--------6
B--------1
B--------1
C--------4
I'm looking for the following results from a query
Item----Sum(Onhand_Qty)---Sum(Trx_Qty)
A--------25Like this?
SQL> create table table1 (item,onhand_qty)
2 as
3 select 'A', 10 from dual union all
4 select 'A', 15 from dual union all
5 select 'B', 10 from dual union all
6 select 'B', 10 from dual union all
7 select 'C', 20 from dual union all
8 select 'D', 30 from dual
9 /
Tabel is aangemaakt.
SQL> create table table2 (item, trx_qty)
2 as
3 select 'A', 2 from dual union all
4 select 'A', 4 from dual union all
5 select 'A', 6 from dual union all
6 select 'B', 1 from dual union all
7 select 'B', 1 from dual union all
8 select 'C', 4 from dual union all
9 select 'E', 3 from dual
10 /
Tabel is aangemaakt.
SQL> select nvl(t1.item,t2.item) item
2 , t1.sum_onhand_qty
3 , t2.sum_trx_qty
4 from ( select item, sum(onhand_qty) sum_onhand_qty
5 from table1
6 group by item
7 ) t1
8 full outer join
9 ( select item, sum(trx_qty) sum_trx_qty
10 from table2
11 group by item
12 ) t2
13 on (t1.item = t2.item)
14 /
I SUM_ONHAND_QTY SUM_TRX_QTY
A 25 12
B 20 2
C 20 4
E 3
D 30
5 rijen zijn geselecteerd.Regards,
Rob. -
Update SAME column name in two tables from ONE query
Dear All Seniors
Please tell me is it possible to update a same column name in two tables.
I have two tables in same schema
(1)table name
pem.igp_parent
column name
igp_no.
igp_type
(2)table name
pem.igp_child
column name
igp_no.
igp_type
i want to update igp_no column in one query please tell me how it would be possible.
thanks
yassenYou want to update the data from what to what? Where is the new data coming from?
If you are trying to put the same data in two different tables, that strongly implies that you have a normalization problem that needs to be addressed.
Why do you want a single query rather than updating each table in turn? Can you join the two target tables to produce a key-preserved view?
Justin -
To find Common data in 2 columns in two different tables.
Hi,
Could someone help me out with a querry to find out common data from 2 columns in two different tables??
Thanks
Rajesh966915 wrote:
suppose i hav 2 tables
Table A
s.No name EID
1 aaa 123
2 bbb 234 ... etc..
and Table B
S.no salary eid location
1 mmm$ 123 india
2 ddd$ 556 Uk
3 fff$ 236 US
How do i select the common entry in both the tables??why do you post in forum for SQL & PL/SQL; yet never post anything in either language?
what do you mean by "common enrty"?
does every column value must match exactly across 2 rows in different table? -
How to generate a number sequence for a column of a Z*table?
Hi ,
How to generate a number sequence for a column of a Z*table?
plz guide me.
thanks
Albert1) Use SNRO for defining a number range.
2) Use FM NUMBER_GET_NEXT for getting the next number with object, sub object etc..
See one example below.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = c_01
object = c_z_prd_code
* QUANTITY = '1'
subobject = p_vkorg
* TOYEAR = '0000'
* IGNORE_BUFFER = ' '
IMPORTING
number = in_prd_code
* QUANTITY =
* RETURNCODE =
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8
3) You may write these code in main program of the table maintinence
rgds,
TM. -
Passing parameters for a query throught XML and capturing response in the same
Hi All,
I have defined a RequestParameters object and i am passing paramerts for a query through XML and trying to capture the result in the same and send back to the source. In this case i am send XML from excel.
Below is my XML format.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Insert xmlns="http://tempuri.org/">
<dataContractValue>
<dsRequest>
<dsRequest>
<SOURCE></SOURCE>
<ACTION>Insert</ACTION>
<RequestParams>
<RequestParams>
<ACC_NO>52451</ACC_NO>
<EMP_CITY>HYD</EMP_CITY>
<EMP_NAME>RAKESH</EMP_NAME>
<EMP_CONTACT>99664</EMP_CONTACT>
<EMP_JOM>NOV</EMP_JOM>
<EMP_SALARY>12345</EMP_SALARY>
</RequestParams>
<RequestParams>
<ACC_NO>52452</ACC_NO>
<EMP_CITY>HYD</EMP_CITY>
<EMP_NAME>RAKESH</EMP_NAME>
<EMP_CONTACT>99664</EMP_CONTACT>
<EMP_JOM>NOV</EMP_JOM>
<EMP_SALARY>12345</EMP_SALARY>
</RequestParams>
</RequestParams>
</dsRequest>
<dsRequest>
<SOURCE></SOURCE>
<ACTION>Update</ACTION>
<RequestParams>
<RequestParams>
<ACC_NO>52449</ACC_NO>
<EMP_CITY>HYD1</EMP_CITY>
<EMP_NAME>RAKESH1</EMP_NAME>
<EMP_SALARY>1345</EMP_SALARY>
</RequestParams>
<RequestParams>
<ACC_NO>52450</ACC_NO>
<EMP_CITY>HYDer</EMP_CITY>
<EMP_NAME>RAKEH</EMP_NAME>
<EMP_SALARY>1235</EMP_SALARY>
</RequestParams>
</RequestParams>
</dsRequest>
</dsRequest>
</dataContractValue>
</Insert>
</s:Body>
</s:Envelope>
Where i have a List of dsRequest and RequestParams, where i can send any number of requests for Insert,Update. I have two a XML element defined in RequestParams "RowsEffected","error" where the result will be caputred and is updated
to the response XML.
I have 6 defined in RequestParams
EMP_SALARY(int),ACC_NO(int),EMP_CITY(string),EMP_NAME(string),EMP_CONTACT(string),EMP_JOM(string)
My Question is:
When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
ResponseParams.Add(
newdsResponse()
ACTION = OriginalParams[a].ACTION,
SOURCE = OriginalParams[a].SOURCE,
Manager = OriginalParams[a].Manager,
RequestParams = OriginalParams[a].RequestParams
Where the OriginalParams is dsRequest
Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
Is there any way i can avoid this and build response with only the parameters given in the Request ??
Appreciate ur help..Thanks
Cronsey.Hi Kristin,
My project is, User will be giving the parameters in the excel, and using VBA, the values are captured and an XML is created in the above mentioned format and is send to web service for the Insert/Update.
I created a webservice which reads the values from <datacontract> and it consist of list of <dsRequests> where any number of Insert/Upate commands can be executed, with in which it contains a list of <RequestParams> for multiple insertion/Updation.
//function call
OriginalParams = generator.Function(query, OriginalParams);
where OriginalParams is List<dsRequest>
//inside function
command.Parameters.Add()// parameters adding
int
val = command.ExecuteNonQuery();
after the execution,an XML element is added for the response part.and it is looped for all the RequestParams.
OriginalParams[i].Result.Add(
newResult()
{ ERROR = "No Error",
ROWS_EFFECTEFD = 1 });
//once all the execution is done the response building part
for(inta
= 0; a < OriginalParams.Count; a++)
ResponseParams.Add(
newdsResponse()
Result = OriginalParams[a].Result
QUEST: When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
Is there any way i can avoid this and build response with only the parameters given in the Request ??
Appreciate ur help..Thanks
Cronsey. -
Selecting different parameters for same plot
So I am currently working on a VI to integrate on a system. In this VI I would like to have a plot that will aloow me to select different parameters for both X and Y axes. I was thinking of having a drop down menu with the different parameters, ie Time vs Pressure, Pressure vs Temperature. How can I go about making this?
I would also like to have the choice of plotting multiple signals on the same graph, ie Temperature 1 & Temperature 2 vs Time.
Right now I am only able to graph one paramater vs time, I am graphing Pressure vs Time on this current VI.
Thanks for the helpYou did not mention, whether you want an online plotting feature, or you have already all data, and you just want to plot them? The following regards to the online data collection case:
I would go with a XY-Graph. I would store the XY value pairs in arrays (or you can go with cluster and arrays inside), and building them incrementally. You can store them in shift register(s), but also think about how to avoid the memory leak (if your shift register(s) reaches a size limit, delete some data from the beginning).
The drop-down menu could be connected to an Event structure, where you can change the axis labels via property nodes, and also change the source of data for the Graph.
edit: you can also add multiple Y-axis to the Graph, if you find it useful -
Constructing Calculated Measures in MDX for different measures using same columns in a fact table
Hello,
i have a fact table with 2 columns corresponding to dimensions Dim1, Dim2. In the same table i have 4 other columns Value_Type(int), INT_VALUE(int), FLOAT_VALUE(float), TEXT_VALUE(string). There are a number of measures which are identified by Value_Type and
depending on their nature could be written in one of the 3 columns (INT_VALUE(int), FLOAT_VALUE(float), TEXT_VALUE(string)) Let's say Measure1 with Measure_Type=1 is age, 2 is account balance and 3 is Name for clarity. There could be other measure types that
use these 3 same columns for data. So the sample fact table looks like this
Dim1 Dim2 Measure_Type INT_VALUE FLOAT_VALUE TEXT_VALUE
10 10 1 25
10 10 2 2000,34
10 10 3 John
10 20 1 28
10 20 2 3490,23
10 20 3 Frank
My task is to write an MDX query for each Dim1, Dim2 combination which returns all 3 measures in the same row. The idea is to construct a calculated member for each Measure that returns value from the right field. For example for Measure1 we take INT_VALUE
with measure_type=1. The problem is i don't know how to construct MDX query for these calculated members. Can you please help me?
So my final goal is to write an MDX query that returns all measures in one row for each set of Dim1, Dim2
SELECT [Measure1], [Measure2], [Measure3] ON COLUMNS,
NON EMPTY [Dim1].[Dim1].[Dim1].Members*[Dim2].[Dim2].[Dim2].Members ON ROWS
FROM [Cube]
Dim1 Dim2 Measure1 Measure2 Measure3
10 10 25 2000,34 John
10 20 28 3490,23 FrankHi Kosmipt,
I would combine the "INT_VALUE", "FLOAT_VALUE" and "TEXT_VALUE" columns into one with STRING data type for the fact table. And there should be one dimension to store the Measure_Type informations. Then in cube, you can write MDX scope for every one of
"Measure_Type" dimension members. For example,
scope(
[Measures].[M]
[DimMType].[MType].&[1]= CINT([Measures].[M]);
end scope;
Once the cube is built by the above way, you can write MDX like something like the following to achieve your purpose.
WITH member [Measures].[Measure1] AS ([DimMType].[MType].&[1],[Measures].[M])
member [Measures].[Measure2] AS ([DimMType].[MType].&[2],[Measures].[M])
member [Measures].[Measure3] AS ([DimMType].[MType].&[3],[Measures].[M])
thanks,
Jerry
Maybe you are looking for
-
When I attempt to connect to iCloud I get the error message: Apple id's email address cannot be verified. There is nothing wrong with my apple id and I do not want to change it.Any suggestions?
-
HT201318 how to cancel an icloud upgrade within 15 days
I've recently bought an icloud upgrade but now I dont need it. I know I can contact apple for a full refund within 15days of purchase but whats the best way to do this online?
-
Where to Go for Help With A Lost Original Serial Number?
To make a long and frustrating story really short, I had to re-install OSX Snow Leopard on my Mac Pro (don't ask me why...). In doing that, I had to re-install my Final Cut Studio. The latest version I have is an upgrade package duly registered with
-
Hi, what is the difference between these two fields VPSTA (Direct input: field MARA-VPSTA (full maintenance status) PSTAT (Direct input: field MARA-PSTAT (maintenance status)) Thanks.
-
What is this infrequent popup mean?
Every now and then, a popup comes up on my Mac, but it's on the screen for less than a second, so I can never see what it is. All I've barely seen on it is the fact that it says deny or allow. This started with Lion, and even though I've upgraded to