Dynamic LoadVars expression
HI All,
I am writing actionscript to get variables from a database
using php. I have used the LoadVars object and can set a variable
using the following line of code which works
_root.show1=myLoadVar.display1
In this case myLoadVar is an instance of the Loadvars class
and display1 is one of a series of variables sent from php.
I need to make the right hand side of the expression dynamic
eg(display1, display2, display3 etc)
I have tried using eval but it does not work.
Thanks for any help.
for(i = 0; i < maxnumbersinlist; i++) {
_root["show" + i] = myLoadVar["display" + i];
}
Similar Messages
-
Hi Experts,
Iu2019m trying to build a routine with dynamic logical expressions but it's now working...
Basically Iu2019m building a string with the expression, a and after the string it's completed Iu2019m calling a macro that consist in a if.
if expression eq true
return true value
but the value returned by the macro it's always false, even when the logical expression it's true...
i already tried the logical function BOOLC but apparently my version, ECC 6, doesnu2019t recognize it....
Below goes the code, if anyone could help me Iu2019ll be appreciated.
"Macro definition
DEFINE check_condition.
IF &1 EQ ABAP_TRUE.
move 'X' to &2.
endif.
END-OF-DEFINITION.
LOOP AT tab_regras."Rules
CLEAR: str_cond, lv_result.
LOOP AT dfies_tab WHERE fieldname CS 'ARGUMENTO'.
CLEAR: lw_string, str_1, str_2, str_3.
ASSIGN COMPONENT dfies_tab-fieldname OF STRUCTURE tab_regras TO <fs_field>.
CHECK <fs_field> IS NOT INITIAL.
SPLIT <fs_field> AT '/' INTO str_1 str_2 str_3.
ASSIGN (str_1) TO <fs_value1>.
" ASSIGN (str_2) TO <fs_value2>.
" ASSIGN (str_3) TO <fs_value3>.
IF str_cond IS INITIAL..
CONCATENATE <fs_value1> str_2 str_3 INTO str_cond SEPARATED BY space.
CONTINUE.
ENDIF.
CONCATENATE str_cond 'and' <fs_value1> str_2 str_3 INTO str_cond SEPARATED BY space."string condition
ENDLOOP.
check_condition str_cond lv_result.
CHECK lv_result EQ 'X'.
Thanks in advance,
Best Regards
João MartinsIt would be helpful if you show us what is the example content of str_cond .
Anyhow your check looks like you want to compare some condition with value X which abap_true denotes i.e.
if field_1 = 10 and field_2 = 20 EQ 'X'.
endif.
This doesn't make sense for me or maybe I am missing something which is hidden behid this str_cond . Your left hand side expression value must however be equal to right hand side value. So the conditon will only be true if
if 'X' = 'X'.
endif.
Regards
Marcin
PS: please note that in ABAP there is no real boolean value, so you can't have condition like in JAVA or C
if (true_condition)
//do something
you always have to compare two values (here abap_true which is X if fact).
Edited by: Marcin Pciak on May 24, 2011 3:59 PM -
How to evaluate dynamic XPath expression in BPEL?
I have an xml file where I keep many settings for my BPEL process. At runtime, I read the file and I want to select values from it based on values in the process payload.
For example, imagine that the process payload is an order:
<order>
<header>
<id/>
<customer_id/>
<team_id/>
</header>
<items>
<item>
<id/>
<sku/>
<price/>
<quantity/>
</item>
</items>
</order>
Now, in my xml settings file, I have a section where I keep a mapping of "team_id" and "assignment_group", so that for each team id, I can select the appropriate group to whom a task should be assigned. The relevant section of the settings file will look something like this:
<assignment_groups>
<group team_id='0923230'>invoice_approvers</group>
<group team_id='3094303'>order_approvers</group>
<group team_id='3434355'>shipping_approvers</group>
</assignment_groups>
So, imagine I get an order input to my process where the team_id is '3094303'. Now I have to lookup the correct assignment group in my settings file.
So, I construct the dynamic XPath expression
/settings/assignment_groups/group[@team_id=3094303]
I know that this would evaluate to "order_approvers". However, even though I have the XPath expression in a BPEL variable, and I have my settings file as a BPEL variable also, I don't know how to execute the XPath expression against the settings BPEL variable to retrieve the correct value.
Any ideas appreciated.
Thanks,
JackJames:
Thank you for the response. Incidentally, this is the very same document and section that I have been looking at for guidance. Specifically, the section titled "Dynamically indexing by Constructing an XPath at Run Time" on page 12-13.
I tried to do something similar to the example at the top of page 13:
<variable name="iterator" type="xsd:integer"/>
<assign>
<copy>
<from expression="concat('/invoice/line-item[',bpws:getVariableData('iterator'), ']/line-total')"/>
<to variable="xpath"/>
</copy>
<copy>
<from expression="bpws:getVariableData('input', 'payload',bpws:getVariableData('xpath')) + ..."/>
</copy>
</assign>
I am able to achieve the first copy operation to get my dynamic XPath into a BPEL variable and that's fairly straightforward. But I am unable to get the second copy to work. Specifically, I am not sure what to put in the second argument of the bpws:getVariableData function. I have tried many different combinations, but when I try to compile my program, I get the following compilation error:
Error:
[Error ORABPEL-10902]: compilation failed
[Description]: in "C:\code\TrainingWS\SampleGetSettings\bpel\SampleGetSettings.bpel", XML parsing failed because "org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr".
[Potential fix]: n/a.
Thanks,
Jack -
How to build a full dynamic WHERE expression in ADFBC Faces View Object ?
Dear Steve
>
I need an example about how to build a full dynamic WHERE expression in
ADFBC View Object
In UIX I known to do that, but i don't kwown how to do in ADFBC Faces.
please help me to see an example.
thanks
Juan CarlosYou write an AM level method to set the where clause and you expose it as a client method. (just like you did before)
Then you can drag this method onto a page as a button and then pressing on this button will execute the method.
If you want this to be done automatically without pressing a button - you go to the pagedef.xml file for your page and add a methodInvocation binding to that AM method, and then add a method executable to the executables section calling this method. -
Dynamic El expression evaluation
Hello,
I have a bean which returns me map of key-value pairs ( String,String) . In my jsff, I need to access the map's value based on key which is a a dynamic El expression
<af:iterator id="i1" value="#{bindings.leaderBoardEntities.collectionModel}"
var="entity" rows="#{bindings.leaderBoardEntities.rangeSize}">
<af:image id="i2" source="#{pageFlowScope.ImagesBean.imageUrlPair[entity.displayName]}"
shortDesc="user info"
inlineStyle="width:50px;height:50px;"/>
</af:iterator>
I am unable to evalue the key for the map.
I tried,
source="#{pageFlowScope.ImagesBean.imageUrlPair[entity.displayName]}
source="#{pageFlowScope.ImagesBean.imageUrlPair['#{entity.displayName}']}
source="#{pageFlowScope.ImagesBean.imageUrlPair['${entity.displayName}']}
source="#{pageFlowScope.ImagesBean.imageUrlPair[#{entity.displayName}]}--this is syntactically wrong
However , this works
source="#{pageFlowScope.ImagesBean.imageUrlPair['Twitter']}
Kindly help meHi,
this is because the row does not have a setDisplayName and getDisplayName method. It has setAttribute(int), setAttribute(String) as well as getAttrinute(int), getAttribute(String) methods. So the input you provide is constantly null
Frank -
Dynamic Logical Expressions in ABAP: IF (lt_cond)...
is it possible to have a dynamically constructured logical expression?
I have a condition I need to use in an IF, but I want to avoid hard-coding, so I dynamicallybuild it.
for a simple example:
CONCATENATE ITAB-f1
'EQ'
varValue
INTO lt_cond SEPARATED BY SPACE.
IF (lt_cond).
WRITE:/ 'Success'.
ENDIF.
Is it possible to do this?
NLI am trying to use the macro to check an IF (cond).
cond is a dynamically constructed condition.
The bold part of my code way below is my problem area.
I'm having no trouble getting COND constructed. But I am having trouble between my macro and the processing as my error always tells me I'm calling my macro without 2 actual parameters. Or when I DEFINE my macro with &1 instead of &1 &2, I get 'incorrect logical expression'.
I've read all the documentation I can find on this, but i still cannot figure out why my macro is not processing.
Code is lengthy, but if you can, please help.
I'm anticipating the output to be 'FAILURE' at this point. I just want the condition COND to be processed.
data: tabfield(20) type c,
orcheck type I,
cond type string.
DATA: BEGIN OF ITAB_NOTIDX OCCURS 0,
FIELD LIKE ZDOLTARC02-SEARCHFLD,
VALUE LIKE ZDOLTARC03-VALUE,
STRUCTURE LIKE ZDOLTARC02-STRUCTURE,
AOBJ LIKE ZDOLTARC02-A_OBJ,
END OF ITAB_NOTIDX.
DATA: BEGIN OF ITAB_AOBJ OCCURS 0,
AOBJ LIKE ZDOLTARC02-A_OBJ,
END OF ITAB_AOBJ.
DATA: ITAB_AOBJF LIKE ITAB_AOBJ.
DATA: ITAB_NOTIDXF LIKE ITAB_NOTIDX.
DATA: varAOBJ LIKE ZDOLTARC02-A_OBJ.
ITAB_NOTIDXF-FIELD = 'LIFNR'.
ITAB_NOTIDXF-VALUE = '123'.
ITAB_NOTIDXF-STRUCTURE = 'BKPF'.
ITAB_NOTIDXF-AOBJ = 'FI_DOCUMNT'.
APPEND ITAB_NOTIDXF TO ITAB_NOTIDX.
ITAB_NOTIDXF-FIELD = 'LIFNR'.
ITAB_NOTIDXF-VALUE = 'ABC'.
ITAB_NOTIDXF-STRUCTURE = 'BKPF'.
ITAB_NOTIDXF-AOBJ = 'FI_DOCUMNT'.
APPEND ITAB_NOTIDXF TO ITAB_NOTIDX.
ITAB_NOTIDXF-FIELD = 'LIFNR'.
ITAB_NOTIDXF-VALUE = '001'.
ITAB_NOTIDXF-STRUCTURE = 'BKPF'.
ITAB_NOTIDXF-AOBJ = 'FI_DOCUMNT'.
APPEND ITAB_NOTIDXF TO ITAB_NOTIDX.
ITAB_NOTIDXF-FIELD = 'SAKNR'.
ITAB_NOTIDXF-VALUE = '111'.
ITAB_NOTIDXF-STRUCTURE = 'BSEG'.
ITAB_NOTIDXF-AOBJ = 'FI_DOCUMNT'.
APPEND ITAB_NOTIDXF TO ITAB_NOTIDX.
ITAB_NOTIDXF-FIELD = 'SAKNR'.
ITAB_NOTIDXF-VALUE = '222'.
ITAB_NOTIDXF-STRUCTURE = 'BSEG'.
ITAB_NOTIDXF-AOBJ = 'FI_DOCUMNT'.
APPEND ITAB_NOTIDXF TO ITAB_NOTIDX.
ITAB_NOTIDXF-FIELD = 'KUNNR'.
ITAB_NOTIDXF-VALUE = 'CCC'.
ITAB_NOTIDXF-STRUCTURE = 'BSEG'.
ITAB_NOTIDXF-AOBJ = 'FI_DOCUMNT'.
APPEND ITAB_NOTIDXF TO ITAB_NOTIDX.
ITAB_NOTIDXF-FIELD = 'KUNNR'.
ITAB_NOTIDXF-VALUE = 'DDD'.
ITAB_NOTIDXF-STRUCTURE = 'BSEG'.
ITAB_NOTIDXF-AOBJ = 'FI_DOCUMNT'.
APPEND ITAB_NOTIDXF TO ITAB_NOTIDX.
LOOP AT ITAB_NOTIDX.
WRITE:/ ITAB_NOTIDX-FIELD, ITAB_NOTIDX-VALUE, ITAB_NOTIDX-STRUCTURE, ITAB_NOTIDX-AOBJ.
ENDLOOP.
DATA: VARFIELDNAME LIKE ZDOLTARC02-FIELD.
CONCATENATE cond
INTO Cond.
SORT ITAB_NOTIDX BY AOBJ FIELD.
varFieldName = Itab_NOTIDX-FIELD.
ORCHECK = 0.
ITAB_AOBJF = 'FI_DOCUMNT'.
APPEND ITAB_AOBJF TO ITAB_AOBJ.
LOOP AT ITAB_AOBJ.
MOVE ITAB_AOBJ-AOBJ TO varAOBJ.
WRITE:/ varAOBJ.
LOOP AT ITAB_NOTIDX WHERE AOBJ EQ varAOBJ.
WRITE:/ 'LOOP TEST'.
IF ITAB_NOTIDX-FIELD EQ varFieldName.
WRITE:/ VARFIELDNAME.
IF ORCHECK <> 0.
CONCATENATE cond
'OR'
INTO cond SEPARATED BY SPACE.
ENDIF.
CONCATENATE ITAB_NOTIDX-STRUCTURE
ITAB_NOTIDX-FIELD
INTO tabfield.
CONCATENATE cond
tabfield
'EQ'
'''' ITAB_NOTIDX-value ''''
INTO cond SEPARATED BY SPACE.
ORCHECK = ORCHECK + 1.
ELSE.
MOVE ITAB_NOTIDX-FIELD TO varFieldName.
WRITE:/ '2', VARFIELDNAME.
CLEAR TABFIELD.
ORCHECK = 0.
CONCATENATE ITAB_NOTIDX-STRUCTURE
varFieldName
INTO TABFIELD.
CONCATENATE cond
'AND'
TABFIELD
'EQ'
'''' ITAB_NOTIDX-VALUE ''''
INTO cond SEPARATED BY SPACE.
ORCHECK = ORCHECK + 1.
ENDIF.
ENDLOOP.
ENDLOOP.
CONCATENATE COND
INTO COND.
write:/ COND. "constructed properly
<b>DEFINE my_dynamic_check.
if &1, &2.
write:/ 'Success'.
else.
write:/ 'Failed'.
endif.
END-OF-DEFINITION.
my_dynamic_check (cond).</b> -
Adding dynamic filter expressions
I am working on a ESB flow and I wanted to write a filter expression that can dynamically fetch database values and accordingly route the flow.
Since it didnt work, I thought of assigning this to a xsl variable and compare this variable value in the next Routing Service node Filter Expression.
So I tried as follows: filterVar" variable holds the value of what I am looking for.
<xsl:template match="/">
<inp1:CommitmentRequest>
<xsl:variable name="filterVar" select='orcl:lookup-table("accounts","dest",/imp1:AccountsRequest/imp1:Code/imp1:SITEID,"acc_code","DSname")' />
and in the next Routing Service I have an expression written as:
$filterVar = 'ACC1'
Is it the correct way of doing? By approaching this variable assignment, I will be adding a Routing Service un necessarily. Still, if this is the way it is going to work and if there is no straight forward way, I will have to use this approach.
Please note that "/imp1:AccountsRequest/imp1:Code/imp1:SITEID" is the correct tree structure as I can assign this value directly in XSL mapping to a new field of target XML. I didnt want to assign this way as I dont want to create a new variable in XML as it will never be used as data in successive stages.
Thanks,Thanks Dave.
Certainly the namespace issue was there. But, even with that issue fixed, message is not passing the filter stage.
I mapped this expression to a target element of target xml and it assigned a value of 'ACC1' to it.
orcl:lookup-table("accounts","dest",/inp1:AccountsRequest/inp1:Code/inp1:SITEID,"acc_code","DSname")
The strange thing I noticed id that in none of the cases as montioned below, the message doesnt pass the filter stage.
$filterVar = 'ACC1'
$filterVar != 'ACC1'
Any idea why?
Instead of using variable assignment method, do you have any other idea that lets me retrieve database values on the fly and make decisions?
I tried lookup-table() in filter expression directly, that didnt work either. Ideally, I wanted this approach to work.
I have also tried data enrichment as suggested by Allan Galsgow. Didnt have any luck either.
Thanks,
Note: The varaible assignment is done as follows in the xsl mapping:
<xsl:variable name="filterVar" select='orcl:lookup-table("accounts","dest",/inp1:AccountsRequest/inp1:Code/inp1:SITEID,"acc_code","DSname")' />
Message was edited by:
user582595
Message was edited by:
user582595 -
Dynamic tuple expression in *REC statement
Hi there,
I think I know the answer to this already, but here goes...
I need to use a tuple expression in a *REC statement (in place of the old-fashioned GET) but I want it to be dynamic, so at least one of the tuple members changes at runtime.
To use the basic example from SAP Help, but amended slightly, let's say this is the standard expression:
*XDIM_MEMBERSET P_ACCT = CE0004010,CE0652000
*WHEN P_ACCT
*IS "CE0004010"
*REC(EXPRESSION=%VALUE%/([P_ACCT].[CE0652000],[P_ACTIVITY].[LABPRD],[P_ENTITY].[E123]), P_ACCT="CE0661000")
*ENDWHENBut what if the P_ENTITY member should be dynamic, depending on the ENTITY member the user selects in the DM package? What I WANT to do is something like this:
*XDIM_MEMBERSET P_ACCT = CE0004010,CE0652000
*WHEN P_ACCT
*IS "CE0004010"
*REC(EXPRESSION=%VALUE%/([P_ACCT].[CE0652000],[P_ACTIVITY].[LABPRD],[P_ENTITY].[%ENTITY_SET%]), P_ACCT="CE0661000")
*ENDWHEN
...but it doesn't work. Is this even possible? And if so, what am I doing wrong?
Thanks very much,
Jason
PS. I'm already using a lookup to pull out a tax% in the same script, so I can't use it for this as well...Some theory:
You have some scope at the script start (defined by user selection in DM prompt)
For each dimension you have variable %SOMEDIM_SET% containing initial script scope. If you change scope of some dimension using *XDIM_MEMBERSET SOMEDIM=MEM1,... you can always later restore original scope with *XDIM_MEMBERSET SOMEDIM=%SOMEDIM_SET%
WHEN/ENDWHEN will loop records with base members of the scope before WHEN. %VALUE% is a current record value.
You can use tuple references to other members in EXPRESSION=... Dimensions not defined in tuple will have the same base member as current record. In tuple you can also use parent members.
You can use LOOKUP as a replacement of FLD to get member from the property of the member in current record. LOOKUP can get data from current model or other model.
Vadim -
SSRS dynamic image expression not working
Hi All;
All my below dynamic expression not wrking
=iif(First(Fields!new_mainValue.Value,
"DataSet1")="ABC",True,False)
Any help much appreciated
Thanks
Pradnya07Below worked for me
=iif(First(Fields!new_mainValue.Value,
"DataSet1")="ABC",False,True) -
Dynamic boolean expression evaluation
Hey everyone,
We have a table that consists of a couple key columns and a column containing a boolean expression. We want to select a number of rows based on the key columns and evaluate the boolean expression in the expression column for each, only returning the first row wherein the boolean expression evaluates to true.
We are using a context to inject the test variables into the boolean expressions and currently we are selecting all the key rows in a PL/SQL procedure and going through the cursor evaluating each of the boolean expressions with an execute immediate.
The expressions are currently formated in the columns as anonymous PL/SQL blocks that, when called, will either return true or false to the PL/SQL procedure. Upon returning true, the procedure stops looping and returns true to the caller.
Psuedo-code would be:
- set-up sys_context with condition variables
- create cursor for: select * from expression_tbl et where <key matches>
- begin loop through cursor
- execute immediate cursor_row.expression using out :out_is_true
- if out_is_true = 'Y' then return true
- loop
- return false
The expressions (anonymous PL/SQL blocks) from the table look something like this:
begin if ((''||sys_context('ctx', '1')||'' = 'FL') AND (''||sys_context('ctx', '3')||'' BETWEEN 1619 AND 4598) ) then :1 := 'Y'; end if; end;
This works, but it seems like I should be able to do this another way and potentially extract more performance.
So...a couple questions:
1) I have read on ask Tom that a dynamic select statement (rather than an anonymous PL/SQL block) can evaulate the boolean expressions. I.E. rather than use an execute immediate clause on an anonymous PL/SQL block contained in the expression column, I would make the expression column compatible with a where clause and create this dynamic SQL query: 'select count(*) from dual where ' || expression. I would then execute that query and if it returns a row then the expression is true, otherwise it is false. My question is, does anyone think the performance of parsing the SQL and executing it would be better than that of executing an anonymous PL/SQL block for every row? Tom said that the SQL could incur a lot of hard-parses and kill performance, but how deathly is the constant compilation of anonymous PL/SQL blocks as shown above in comparison?
2) Would there be any benefit to pulling the execute routines out of the PL/SQL block and issuing a query such as the following:
select * from expression_tbl et where <key matches> AND pkg.eval_routine(et.expression) = 'Y' AND rownum <= 1.
I realize that the evaulating routine would then need to either perform an execute immediate on et.expression (if we keep the current method in place) or formulate the dynamic SQL statement and execute it. But, could this be faster than doing the same loop through rows explicitely in PL/SQL?
Doing this would trim my PL/SQL down to:
- set up sys_context
- execute the above select statmenet
- if a row is returned then return true otherwise return false
Seems more elegant, but the peformance is all that matters.
3) Is there any built-in routine that I may be able to replace pkg.eval_routine from 2 with that would evaulate boolean expressions for me? Or any other way to inline the idea from 1 with 2? I can't think of one given the dynamic nature of the beast, but...maybe there's something I missed.
Thanks everyone! Hopefully I've expressed myself clearly.Brian - According to Tom Kyte Doing PL/SQL inside Execute Immediate should be faster as you are already within the context of a PL/SQL engine. If we choose to do it in SQL then the PL/SQL engine has to hand it over to the SQL Engine for executing the dynamic Select statements and so might be a little slower. But I am not sure if the difference can be quantifiable unless u do your own test of both evaluators and run them for like a few thousand times in a loop.
If you are using 10g R2 - you might want to look into DBMS_RLMGR package which is the API for the Oracle's version of the embedded business rule manager.
I looked into it but it didn't fit our needs as its deficient with respect to rule versioning and effective and until date based business rule enforcement/ validation.
After taking a shot at designing something home grown I feel its not that difficult to construct one that fit our needs inclusive of the features( rule versioning, effective and until dates) that I listed above as deficiencies in the Oracle embedded rule engine.
If you don't have those requirements may be using the Business Rule manager API of 10g R2 might not be a bad anticipating it will be improved in future versions.
Regards
-Suren -
Dynamic binding expression to get data from array
I am retrieveing from an object to label my button as
follows:
quote:
<mx:Button label = "{wordlist.word.LABEL[0][index]}"
I now want the binding expression to be dynamic, meaning that
LABEL has to be a variable. How would I do this?
quote:
<mx:Button label =
"{wordlist.word.????[LABEL]????[0][index]}""lunacafu" <[email protected]> wrote in
message
news:gqte13$1g4$[email protected]..
>I am retrieveing from an object to label my button as
follows:
>
>
quote:
<mx:Button label = "{wordlist.word.LABEL[0][index]}"
>
> I now want the binding expression to be dynamic, meaning
that LABEL has to
> be
> a variable. How would I do this?
>
>
quote:
<mx:Button label =
"{wordlist.word.????[LABEL]????[0][index]}"
First, if wordlist.word.LABEL is an XMLListCollection or
ArrayCollection,
you need to use getItemAt instead of bracket notation. Once
you get to that
point, you need to cast it to whatever data type the object
at 0 is.
HTH;
Amy -
select count(*)
from vwsr_all_merged_data s
where sr_tio_priority in ('Level 0','CEO','TER','Priority Assistance','Enquiry')
and sr_status = 'Open'
and SR_BUS_UNIT IN ('Business Support and Improvement','Finance and Administration','Cust Sat Simplification and Productivity','Project New and Customer Experience','Corp Strategy and Customer Experience','Other')
COUNT(*)
126the same should be possible dynamically with Case expression ,before that i create the string as
SELECT
CASE
WHEN :name = 'BS&I' THEN ('('||''''||'Business Support and Improvement'||''''||','||''''||'Finance and Administration'||','||''''||'Cust Sat Simplification and Productivity'
||''''||','||''''||'Project New and Customer Experience'||''''||','||''''||'Corp Strategy and Customer Experience'||''''||','||''''||'Other'||''''||')')
ELSE null
END
FROM dual
CASEWHEN:NAME='BS&I'THEN('('||''''||'BUSINESSSUPPORTANDIMPROVEMENT'||''''||','||
('Business Support and Improvement','Finance and Administration,'Cust Sat Simplification and Productivity','Project New and Customer Experience','Corp Strategy and Customer Experience','Other')
SQL> var name varchar2(10)
SQL> exec :name:='BS&I'
PL/SQL procedure successfully completed.the same string query i put here within subquery to make above string , it does not work.
select count(*)--sr_bus_unit,count(trunc(sr_open_date))
from vwsr_all_merged_data s
where sr_tio_priority in ('Level 0','CEO','TER','Priority Assistance','Enquiry')
and sr_status = 'Open'
and SR_BUS_UNIT IN
( SELECT
CASE
WHEN :name = 'BS&I' THEN ('('||''''||'Business Support and Improvement'||''''||','||''''||'Finance and Administration'||','||''''||'Cust Sat Simplification and Productivity'
||''''||','||''''||'Project New and Customer Experience'||''''||','||''''||'Corp Strategy and Customer Experience'||''''||','||''''||'Other'||''''||')')
ELSE null
END
FROM dual
COUNT(*)--SR_BUS_UNIT,COUNT(TRUNC(SR_OPEN_DATE))
0Edited by: user13653962 on 24/01/2013 17:09
Edited by: user13653962 on 24/01/2013 17:10No man , it is still no working , anyhow i really appreciate yours help , yours help drive me to find other way and you contributed 70% to achieve the result. Next query worked.
SQL> SET DEFINE OFF;
SQL>
SQL> SELECT COUNT (*)
2 FROM vwsr_all_merged_data s
3 WHERE sr_tio_priority IN
4 ('Level 0', 'CEO', 'TER', 'Priority Assistance', 'Enquiry')
5 AND sr_status = 'Open'
6 AND SR_BUS_UNIT IN
7 ('Business Support and Improvement',
8 'Finance and Administration',
9 'Cust Sat Simplification and Productivity',
10 'Project New and Customer Experience',
11 'Corp Strategy and Customer Experience',
12 'Other')
13 UNION ALL
14 SELECT COUNT (*) --sr_bus_unit,count(trunc(sr_open_date))
15 FROM vwsr_all_merged_data s
16 WHERE sr_tio_priority IN
17 ('Level 0', 'CEO', 'TER', 'Priority Assistance', 'Enquiry')
18 AND sr_status = 'Open'
19 AND SR_BUS_UNIT IN
20 (SELECT CASE
21 WHEN 'BS&I' = 'BS&I'
22 THEN
23 ( ''''
24 || 'Business Support and Improvement'
25 || ''''
26 || ','
27 || ''''
28 || 'Finance and Administration'
29 || ''''
30 || ','
31 || ''''
32 || 'Cust Sat Simplification and Productivity'
33 || ''''
34 || ','
35 || ''''
36 || 'Project New and Customer Experience'
37 || ''''
38 || ','
39 || ''''
40 || 'Corp Strategy and Customer Experience'
41 || ''''
42 || ','
43 || ''''
44 || 'Other'
45 || '''')
46 ELSE
47 NULL
48 END
49 FROM DUAL)
50
SQL>
SQL>
SQL> /
COUNT(*)
126
0Second Query
SQL> var name varchar2(10)
SQL> exec :name:='BS&I'
PL/SQL procedure successfully completed.
SQL> set define off
SQL> SELECT COUNT (*) --sr_bus_unit,count(trunc(sr_open_date))
2 FROM vwsr_all_merged_data s
3 WHERE sr_tio_priority IN
4 ('Level 0', 'CEO', 'TER', 'Priority Assistance', 'Enquiry')
5 AND sr_status = 'Open'
6 AND SR_BUS_UNIT IN
7 (SELECT CASE
8 WHEN :NAME = 'BS&I'
9 THEN
10 ('Business Support and Improvement')
11 ELSE
12 NULL
13 END
14 FROM DUAL
15 UNION
16 SELECT CASE
17 WHEN :NAME = 'BS&I'
18 THEN
19 ('Finance and Administration')
20 ELSE
21 NULL
22 END
23 FROM DUAL
24 UNION
25 SELECT CASE
26 WHEN :NAME = 'BS&I'
27 THEN
28 ('Cust Sat Simplification and Productivity')
29 ELSE
30 NULL
31 END
32 FROM DUAL
33 UNION
34 SELECT CASE
35 WHEN :NAME = 'BS&I'
36 THEN
37 ('Project New and Customer Experience')
38 ELSE
39 NULL
40 END
41 FROM DUAL
42 UNION
43 SELECT CASE
44 WHEN :NAME = 'BS&I'
45 THEN
46 ('Corp Strategy and Customer Experience')
47 ELSE
48 NULL
49 END
50 FROM DUAL
51 UNION
52 SELECT CASE
53 WHEN :NAME = 'BS&I'
54 THEN
55 ('Other')
56 ELSE
57 NULL
58 END
59 FROM DUAL
60 )
61 /
COUNT(*)--SR_BUS_UNIT,COUNT(TRUNC(SR_OPEN_DATE))
126
SQL> -
Dynamic-actions/expressions for Radio button in VC
Hi,
I would like to know whether dynamic actions for radio-buttons are possible in VC??
I have a situation where, i have to display/hide an input-field according to the radio-button that i select.
Is this possible in VC??
Because, i do not find any place where i can write expressions for a radio-button so that it can take actions accordingly.Actually its possible.
Here is the sample code for this.
tables : kna1.
parameters : chk1 radiobutton group g1 user-command abc,
chk2 radiobutton group g1.
parameters : chk3 type kunnr.
at selection-screen output.
loop at screen.
if chk1 = 'x' and screen-name = chk3.
chk3-active = '0'.
endif.
endloop.
In this way you can hide a input-field on the screen. -
SSIS : How to create Column Header dynamically using expression in Flat File Source
Hi Team,
I need to keep configured Header Names for columns, Is there is any way to set each column name from expression? or is there is any other way?Nope
But you could add a dummy row to your source to include column headers and then use options column headers in first row in flat file connection manager.
So suppose you've three columns column0,coulmn1,column2 and you want to make it as ID,Name,Datethen make source query as
SELECT 'ID' AS Col1,'Name' AS Col2,'Date' AS Col3, 0 AS ord
UNION ALL
SELECT Column1,Column2,Column3,1
FROM YourTable
ORDER BY Ord
then choose column headers in first row option
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to get dynamic boolean expression's value?
String str = "((true)&((false)|true))";
how to get the result of boolean from str?You will need to write a simple parser to parse the string and evaluate the expression.
Maybe you are looking for
-
I need to retouch images of silver jewelry, is lightroom the software that can help me?
I need to retouch images of silver jewelry, is lightroom the software that can help me?
-
HELP! PC Suite Has Locked My 6220 That Was Previou...
After first using PC Suite with my Nokia 6220, it has started requesting a restriction code when it is powered up. My phone was previously unrestricted to any network. I don't know what operator it is now restricted too. I have borrowed a few SIM car
-
hi friends , is there is any possibility to capture the event of a session end from the server side.this is neede to terminate the files created during the session.so after the sessionthose temp files have to be cleared.this can be done only if we kn
-
Can't Import DTS files to project
Hi, there, I passed through a lot of warning and error messages basically due to some kinds of bugs in the temperates ( PGC error, OPS error 0X00000020 ) and not supporting MPG audio files ( End of file error ) I could work out, but there is still on
-
Java.awt.Checkbox label
How can I change the position of the Checkbox label to the left of the checkbox? Thanks for any help you can provide. ER