Conditions using subquery in EUL

Hi,
New to Discoverer - can anyone please clarify the following.
1) Is it possible to have a condition created in EUL using correlated subquery?
2) Is it true that in Discoverer Plus 10g, one cannot create a condition with subquery and can do it only in Discoverer Desktop ?
Thanks
Jay

Say you have two tables - accounts and billing. You want to provide an optional condition to users to choose accounts that are billed. The tool we currently use allows us to pre-create the condition as below:
exists (select 1 from billing a where a.acct_code = accounts.acct_code)
Users can then drag and drop this condition in the where criteria of the report query panel. Say they want to list the accounts that are billed - the tool will generate the following sql, based on the above condition:
SELECT
ACCOUNTS.ACCT_CODE
FROM
ACCOUNTS
WHERE
( exists (select 1 from billing a where a.acct_code = accounts.acct_code) )
)

Similar Messages

  • Using Subquery in Prepared Statement

    can i use subquery in my insert using prepared statement
    need to specify the * property
    eg: insert into table1 values(select * from table2)

    can i use subquery in my insert using prepared
    statement
    need to specify the * property
    eg: insert into table1 values(select * from table2)Subqueries are perfectly okay, of course, but I think the proper idiom is:
    INSERT INTO foo(a, b, c)
    SELECT x, y, z
    FROM bar
    WHERE  x = 'baz'MOD

  • Spliting files based on condition using multi mapping with BPM

    Hi All,
    Can any one please let me know How to <b>Splite the outbound records based on condition using multi mapping with Integration Process in BPM</b>?
    Thanks
    Govindu.

    Hi All,
    Sorry for mistake this question for Exchange infrastructure guys.
    Thanks,
    Govindu

  • New-CMGlobalCondition unable to create New script Condition using Power Shell

    I am using config Manger 2012 and trying to use power shell cmdlet to create a new Global Condition using PowerShell but its not working for me using this
    Do not understand how to use that command any idea.
    New-CMGlobalCondition -DataType Boolean -DeviceType Windows -FilePath file.ps1 -Name test -ScriptLanguage PowerShell
    Error comes as 
    New-CMGlobalCondition : No object corresponds to the specified parameters.
    At line:1 char:1
    + New-CMGlobalCondition -DataType Boolean -DeviceType Windows -FilePath file.ps1 - ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Confi...onditionCommand:NewGlobalConditionCommand) [New-CMGlobalCondition], I 
       temNotFoundException
        + FullyQualifiedErrorId : ItemNotFound,Microsoft.ConfigurationManagement.Cmdlets.AppModel.Commands.NewGlobalConditionCommand

    Hi,
    What's your version of SCCM? I ran this command line on SCCM 2012 R2 CU2.
    It seems SCCM 2012 R2 CU2 fixed New-CMGlobalCondition cmdlet issue.
    "The New-CMGlobalCondition cmdlet incorrectly requires use of the
    -WhereClause parameter."
    Description of Windows PowerShell changes in Cumulative Update 2 for System Center 2012 R2 Configuration Manager
    Best Regards,
    Joyce

  • I can't accept iTunes store terms and conditions using my iPhone...

    I can't accept iTunes store terms and conditions using my iPhone... It means there's no possibility to downoad any new app from the store...

    Have you tried to restore it?If you have important data,back it up and restore it after entering DFU Mode.OR TRY TO RESTART YOUR PHONE.Google DFU MODE if you dont understand.Cheers!!!

  • How to use subquery factoring ("with" clause) in OWB?

    Hi,
    Is it possible to use subquery factoring (popularly known as "with" clause) in OWB 10gR2? I have a mapping with a splitter and union-all, which generates a query that has repeated scans of the same table. Subquery Factoring would be very useful here. I think this is a very common situation, so, I hope there's a way to achieve this. (If not in this version, this would be my wishlist item for the next version.)
    Appreciate your help.
    Regards,
    Rahul

    Hi Rahul,
    I'm afraid you have to put this on your wishlist. You may put the query with the "with"-clause into a view (or table function if you need parameters) if performance is too bad. But that is somehow against the idea (and benefits) of owb.
    Another possibility is to use a temporary table and spilt the mappings into two parts: first fill the temp table, then the target table.
    Regards,
    Carsten.

  • Cost of using subquery vs using same table twice in query

    Hi all,
    In a current project, I was asked by my supervisor what is the cost difference between the following two methods. First method is using a subquery to get the name field from table2. A subquery is needed because it requires the field sa_id from table1. The second method is using table2 again under a different alias to obtain table2.name. The two table2 are not self-joined. The outcome of these two queries are the same.
    Using subquery:
    select a.sa_id R1, b.other_field R2,
    (select b.name from b
    where b.b_id = a.sa_id) R3
    from table1 a, table2 b
    where ...Using same table twice (table2 under 2 different aliases)
    select a.sa_id R1, b.other_field R2, c.name R3
    from table1 a, table2 b, table2 c
    where
    c.b_id = a.sa_id,
    and ....Can anyone tell me which version is better and why? (or under what circumstances, which version is better). And what are the costs involved? Many thanks.

    pl/sql novice wrote:
    Hi all,
    In a current project, I was asked by my supervisor what is the cost difference between the following two methods. First method is using a subquery to get the name field from table2. A subquery is needed because it requires the field sa_id from table1. The second method is using table2 again under a different alias to obtain table2.name. The two table2 are not self-joined. The outcome of these two queries are the same.
    Using subquery:
    Using same table twice (table2 under 2 different aliases)
    Can anyone tell me which version is better and why? (or under what circumstances, which version is better). And what are the costs involved? Many thanks.In theory, if you use the scalar "subquery" approach, the correlated subquery needs to be executed for each row of your result set. Depending on how efficient the subquery is performed this could require significant resources, since you have that recursive SQL that needs to be executed for each row.
    The "join" approach needs to read the table only twice, may be it can even use an indexed access path. So in theory the join approach should perform better in most cases.
    Now the Oracle runtime engine (since Version 8) introduces a feature called "filter optimization" that also applies to correlated scalar subqueries. Basically it works like an in-memory hash table that caches the (hashed) input values to the (deterministic) correlated subquery and the corresponding output values. The number of entries of the hash table is fixed until 9i (256 entries) whereas in 10g it is controlled by a internal parameter that determines the size of the table (and therefore can hold different number of entries depending on the size of each element).
    If the input value of the next row corresponds to the input value of the previous row then this optimization returns immediately the corresponding output value without any further action. If the input value can be found in the hash table, the corresponding output value is returned, otherwise execute the query and keep the result combination and eventually attempt to store this new combination in the hash table, but if a hash collision occurs the combination will be discarded.
    So the effectiveness of this clever optimization largely depends on three different factors: The order of the input values (because as long as the input value doesn't change the corresponding output value will be returned immediately without any further action required), the number of distinct input values and finally the rate of hash collisions that might occur when attempting to store a combination in the in-memory hash table.
    In summary unfortunately you can't really tell how good this optimization is going to work at runtime and therefore can't be properly reflected in the execution plan.
    You need to test both approaches individually because in the optimal case the optimization of the scalar subquery will be superior to the join approach, but it could also well be the other around, depending on the factors mentioned.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Import Product Price and Condition using LSMW IDoc method

    Hi Friends,
    I am working on the Product Import to CRM from flat file using LSMW IDoc method using the "CRMXIF_PRODUCT_MATERIAL_SAVE" message type.
    I am able to import the entire product with its required details except the Price and its conditions.
    Can anyone please let me know which structure or with message type to be used to import the Product Price and condition using the IDoc method.
    Please pass on your valuable comments.
    Thanking you,
    Naveen

    Hi Naveen.
    I am doing the same thing but only the product gets created and the details like short text, unit etc. do not get populated. The idoc gets processed successfuly. Can you share the fields that are required to be mapped or are mandatory.

  • Action links show link conditionally using simple filter

    Hello Gurus,
    When I set up an interaction with action link, every thing works fine. But when I try to use the 'show link conditionally' using a simple condition, I get an error such as:
    "State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 16001] ODBC error state: 37000 code: 8180 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.. [nQSError: 16001] ODBC error state: 37000 code: 8120 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Column 'SAWITH3.c6' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)"
    Can anyone help with this?
    Thanks

    Try to apply that condition to the report and see how it works
    Btw: check this
    sql - Reason for Column is invalid in the select list because it is not contained in either an aggregate function or the…

  • Conditions using xpath in Receiver determination

    How to write conditions using xpath in receiver determaination. Please provide few examples.
    Regards,
    Suresh.

    hi
    Defining Conditions
    You also have the option of specifying the conditions to be applied when forwarding a message to the receiver(s) in a receiver determination.
    Generally, a condition relates to the contents of a message; if a specified condition is fulfilled for a particular payload element (the corresponding element has a certain value, for example), then the message is forwarded to the specified receiver(s).
    &#9679;     If you want to specify a new condition for forwarding the message to a receiver, in the table in the Display/Edit Receiver Determination editor in the Configured Receivers frame, choose Insert New Condition () and call the condition editor by using the input help ().
    &#9679;     If you want to specify a new condition for forwarding the message to multiple receivers, in the table in the Display/Edit Receiver Determination editor in the Configured Receivers frame, choose Insert Line After Selection ( ) and call the condition editor  by using the input help (). 
    In the condition editor, you can select an element from the message payload and specify a value with which the value of this element is to be compared at runtime.
    check the link below
    http://help.sap.com/saphelp_nw04/helpdata/en/67/49767669963545a071a190b77a9a23/content.htm
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Conditions using xpath in interface determaination

    how to write conditions using xpath in interface determaination. Please provide few examples.
    Regards,
    Suresh.

    hi
    Specifying Conditions (for Multiple Inbound Interfaces)
    If you have assigned more than one inbound interface, you can specify the conditions for forwarding the message.
    To do so, in the Condition column, call the condition editor  ( icon).
    This column is only available when you are assigning multiple inbound interfaces
    check the link below on condition editor:
    http://help.sap.com/saphelp_nw04/helpdata/en/67/49767669963545a071a190b77a9a23/content.htm
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Delete pricing condition using FM crm_order_maintain

    Hi experts
    I need to delete an order pricing condition using the FM crm_order_maintain but i can't do it....
    somebody can help me with the code for do this?
    Thanks in advance
    Marco

    Do one thing,,,
    Go to CRMD_ORDER
    Open the transaction in change mode
    Go to the Pricing condition tab
    put /H in transaction code box
    delete the pricing condition manually from the transaction
    Put break point on CRM_ORDER_MAINTAIN function module...
    debugger will stop at the function module...
    check the data in all tables at this time and try to pass the same...it should work..

  • Conditional use of shapes possible ?

    I am trying to create a table in which I want to show a up arrow in red OR a down arrow in green depending on the comparison of two element values.
    My first thought was to use shapes.
    I created one red up arrow and one green down arrow and placed them on top of each other.
    In the Web tab I made the following code for one of the shapes:
    <if:value1 >= value2?><?shape-size-x:0.01?><?end if?>
    In the other shape I did the 'opposite' code.
    I want to hide one of them by setting a minimal size.
    But, it does not look like it is possible to use the if statement in shapes ?
    Has anyone managed to do something similar, conditional use of shapes.
    If it is not possible by using shapes, can it maybe be solved by using a picture ?
    Can pictures be put on top of each other and be used conditionally ?

    Your idea is interesting, Goutham Shankar.
    It is something like this I am interested in.
    But, I do not understand your solution completely.
    You say that I should embed the image as an xml tag.
    But how do I do this when I have two different images that should be in the same place ( one of them visible )
    Should some of your code be placed in the Web Tab of the image, or is this code placed in normal form fields in the layout ?
    Do you only need one form field to cover both images ?
    Have you placed the two images on top of each other in the layout ?
    Please give a little more detailed information.

  • How to find deptno wise sum(sal) using subquery

    hi all,
    how to find deptno wise sum(sal) using subquery.
    can u tell me any one please.
    thanks,
    regards.

    If we are talking standard emp and dept tables ala scott schema then (say); -
    select ename, sal, total_dept_salary
    from emp,
    (select sum(sal) as Total_Dept_Salary,
    deptno
    from empt
    group by
    deptno) saldept
    where emp.deptno = saldept.deptno
    Is that what you were after?? (I would advise against correlated sub-queries on all but the most modest of tables)
    There are nicer ways of doing the subquery depending on which version of the db you are on...

  • When does OBIEE forcibly use Subquery Factoring ?

    In a 10.2 "datawarehouse" schema I see OBIEE queries of the form :
    WITH  SAWITH0 AS (select distinct T12345.COLUMN_1 as c1 from       DIMENSION_TABLE T12345
                      where  ( T12345.COLUMN_1 like 'HEMANT%')
    ) select distinct SAWITH0.c1 as c1 from       SAWITH0I cannot understand why OBIEE wouldn't run a simpler
    select distinct T12345.COLUMN_1 as c1 from       DIMENSION_TABLE T12345
    where  ( T12345.COLUMN_1 like 'HEMANT%')What OBIEE setup would cause even simple queries to be generated as using Subquery Factoring ?
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

    Hi Hemant,
    use of WITH can be disabled in the OBIEE RPD Connection pool. Its enabled by default to allow the performance benefit you would see when using aggregated result sets. I personally think the OBIEE server is simply not advanced enough to determine when it doesn't need to use it (ie when selecting distinct dimension member values in dashboard prompts).
    Just my 2c. Hopefully some of the experianced users on here can expand a little more for you. Id be interested to know as well.

Maybe you are looking for