Predicate push down in 10.2.0.3 but not in 11.1.0.7

In the SQL and PL/SQL forum, there was an interesting question on why a predicate isn't pushed down in an 11.1.0.7 database while 10.2.0.3 did push the predicate, here: Same query works OK on 10.2.0.3 and not OK on 11.1.0.7-please help
The last post contains 10053 trace output. Maybe any of the performance experts in this forum has an explanation?
Regards,
Rob.

SQL> ALTER TABLE LOGIN ADD (
  2  CONSTRAINT FK_LOGIN_MPI
  3  FOREIGN KEY (MPID)
  4  REFERENCES PERSON_ID (MPID));
REFERENCES PERSON_ID (MPID))
ERROR at line 4:
ORA-02270: no matching unique or primary key for this column-list
SQL> Select
  2  rn,
  3  mpid,
  4  first,
  5  middle,
  6  last,
  7  account_status,
  8  username,
  9  last_login,
10  date_added,
11  degree,
12  ssn
13  from
14  (
15  Select
16  rownum as rn,
17  mpid,
18  first,
19  middle,
20  last,
21  account_status,
22  username,
23  last_login,
24  date_added,
25  degree,
26  ssn
27  from
28  (
29  SELECT distinct
30  p.mpid as mpid,
31  UPPER(name_first) as first,
32  UPPER(name_middle_initial) as middle,
33  UPPER(name_last) as last,
34  l.account_status,
35  username,
36  TO_CHAR(last_login, 'DD-Mon-YYYY') as last_login,
37  TO_CHAR(date_added, 'DD-Mon-YYYY') as date_Added,
38  degree,
39  ssn
40  FROM
41  PERSON_ID p,
42  login l
43  WHERE
44  p.mpid=l.mpid AND UPPER(p.name_last) LIKE '%SMITH%'
45  ORDER BY
46  name_last ASC
47  )
48  )
49  where
50  rn >= 1 and rn <= 20;
name_last ASC
ERROR at line 46:
ORA-01791: not a SELECTed expression
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bi
PL/SQL Release 10.1.0.5.0 - Production
CORE    10.1.0.5.0      Production
TNS for Solaris: Version 10.1.0.5.0 - Production
NLSRTL Version 10.1.0.5.0 - Productionbon, je n'ai pas de 10.1.0.4 windows, mais je doute que ça fasse vraiment la différence
donne moi l'output dans sqlplus

Similar Messages

  • Push button ijn appraisal showing in backend but not showing inn portal

    Hi Expert,
    I would like to ask that push button in appraisal while configuring ESS/MSS package.
    It is showing in backend, but not showing in portal.
    Request you to give your inputs to bring push button on to the portal.

    Hi,
    are you using the same user to access backend and portal?. In backend, did you try from transaction PHAP_CHANGE with that user?. If you try with transaction PHAP_ADMIN in backed you are accessing as administrator, so you cannot compare the behaviour in PHAP_ADMIN and portal.
    Regards,
    Ana

  • Fulltext CONTAINSTABLE predicate push down - wrong statistics

    Hi, 
    We use the CONTAINSTABLE function to search the fulltext index in our production environment. 
    We use the strategy, described in this article http://support.microsoft.com/kb/2549443
    This is part of our query. The query is mixed with relational and fulltext predicates: 
    df.DOCUMENT_TEXTS_TMP doctext ON doc.DOC_ID = doctext.DOC_ID
    INNER JOIN containstable(df.DOCUMENT_TEXTS_TMP, ABOUT, @p_about) r ON doctext.ID = r.[KEY] AND r.[KEY] BETWEEN @p_From_ID AND @p_To_ID
    This is part  of the SCHEMA: 
    CREATE TABLE [df].[DOCUMENT_TEXTS_TMP](
    [DOC_ID] [bigint] NOT NULL,
    [ABOUT] [nvarchar](1000) NOT NULL,
    [REMARK] [nvarchar](4000) NULL,
    [REGISTRATION_DATE] [datetime] NULL,
    [ID] [bigint] NOT NULL)
    We encode the REGISTRATION_DATE and the DOC_ID into the ID column with this function: 
    DATEDIFF(DAY, '19000101', REGISTRATION_DATE]) * 100000000000000 + DOC_ID
    We use the ID column as a key for the full text index.
    When we search with the predicate "AND r.[KEY] BETWEEN @p_From_ID AND @p_To_ID" the estimated number of rows returned from the containstable function is roughly 10 percent of the total number of rows without that predicate. This is true ONLY
    when we use wildcard for the @p_about parameter: like this - @p_about = N'"Jhon*"'. When we remove the wildcard ('"Jhon"') then the estimations are ok ! 
    When we search without the "AND r.[KEY] BETWEEN @p_From_ID AND @p_To_ID" predicate, then the estimated number of rows returned from the containstable function are very good independently from the wildcard in the @p_about param.
    We reached the 10% number with many samples. It is not exact percent, but it is roughly there.
    Because of this, there are situations in which wrong query plans are generated and the performance is very poor.
    Is there a specific reason for this behaviour or maybe we do something wrong ?
    Thank you in advance,
    Atanas

    this is the first I have heard of that parameter...
    TASD:
    SQL> show
    parameter optimizer_secure
    NAME                               
    TYPE    VALUE
    optimizer_secure_view_merging                 boolean      TRUE
    So what affect does it have on what I'm seeing???
    Thanks so much for the help!
    Cory

  • Drop down boxes ok in Crystal Reports but not ok in Crystal Reports Server

    I have the following problem with "dynamic dropdowns"
    Initially, I have a Crystal Report (.rpt).  It has two dynamic drop downs. They work
    in both Crystal Reports Designer (preview)  and Crystal Reports Server (right-click-View).
    The first drop down is the result of a rather complex sql query. The second drop down
    is a child of the first.
    I make a small change to the sql "WHERE" clause using the Crystal Reports Designer. It works fine in preview.
    I save (Enterprise mode) to Crystal Server. I use Business View Manager to configure
    the _DC_n object.  (I did notice that the .._DC_n gets incremented by one.)
    The _DF object seems to know about the updated sql so I do not have change it.
    However, when I go to back to Crystal Reports Server, and right-click-View, the
    "dynamic dropdown" is not working properly.  I can not make sense
    of what has been retrieved.
    Please tell me what is most likely to have gone wrong here?  The Business View Manager
    seemed to knew about the sql change. But Crystal Reports Server has
    not responded to the change in the same way as Crystal Reports Designer.
                       ...thank you, Stan

    When you publish a report to Crystal Server, the dynamic prompts are no longer handled in the report itself.  Instead depending on how they're published, they either go away or they're published to the "repository" and managed through the "Business View Manager" (BVM), which is available as part of the Client Tools install.
    To get the dynamic prompt into the repository, you have to check the "Enable Repository Refresh" checkbox at the bottom of the "Save As" screen after you log in to CRS.  However, doing it this way is NOT best practice, especially if you're using the query from the report to provide the data for the prompt.  If you do this for all of your reports, you get a LOT of bloat in the repository objects and it makes the job of migrating from one version of CRS to another MUCH more difficult!
    What I've done in the past to get a simple "sample" prompt published is create a report that just contains the data that I want to have in the dynamic parameter using a single table - this is usually what I call a "lookup" table that has a "code" field and a "description" or "name" field.  I then create a dynamic parameter in that report that just pulls the data from the single table.  I'll publish the report to my favorites with the Repository Refresh enabled.
    I then run the BVM and look for the following objects (default location is under "Cascading Dynamic Prompts":
    <prompt name>_DC - This is the Data Connection for the prompt.  Edit this, enter the password, and set it to "Never Prompt" for the password.  NOTE:  This DC can be reused by multiple prompts.  If you continue to add prompts through publishing Crystal Reports with prompts, you will get MANY of  these that all point to the same database!
    <prompt name>_DF - This is the Data Foundation for the prompts.  When you create a new one, you need to select an existing DC and then either one or more tables or write a command to provide the data for your prompt.  It works much like the Database Explorer in Crystal.  The one that was just saved has all of the information required for the prompt.
    <prompt name>_BE - This is the Business Element.  When you create one, you have to select and existing DF and one or more fields.  You can also create a filter on the data.  This is used to generate the SQL that will be run to provide the data for the prompt.
    <prompt name>_ BV - This is the Business View.  When you create one, you have to select the Business Element.  I'm not sure of the exact purpose of this, but you have to have one in order to set up the "List of Values".
    <prompt name> - This is the List of Values (LOV).  This defines what fields are available for the prompt itself.
    You can create folders to organize these objects so that its easier to maintain.
    To use a LOV that you've defined in BVM to feed data to new dynamic prompts, do the following:
    1.  Connect to CRS from Crystal.
    2.  Create/Edit your prompt.
    3.  Set the prompt to be dynamic.
    4.  Under "Choose a Data Source", select "Existing" and select the LOV from the drop-down list.
    5.  Update the properties in the parameter.
    When viewing or scheduling a report, the dynamic prompts will run through the Crystal Reports 2013 Report Application Server in CRS (it will be named differently if you're not on CRS 2013, but will have "Report Application Server" in the name.)
    -Dell

  • Push deletes MAIL on Mac Mail application but NOT on iPhone 3G??

    Hey folks..
    So I seem to have this issue. I was able last night to get the Push to (seemingly) work for contacts/calendars/mail. However I notice this issue. When an email comes in, if I delete it from the iPhone it will delete it off the Mail application on my Mac. But if I try and delete the email off the Mac's Mail application it DOES NOT delete the email off the iPhone without me having to go onto the phone and open up Mail and then it will.
    Any suggestions would be greatly appreciated, I'd love to solve this dilemma
    Jason

    Sorry, there is no iOS 4.3 update for the iPhone 3g or the iPod Touch 2g.

  • Why push notifications work in my iOS6 app but not in iOS7?

    I'm having problems with push notifications in iOS7.
    I have developed an application for iOS6 and push notifications works very well. But, when I put that app in a iOS7 device, it doesn't run.
    But something very strange happen. If I use Development key, my iOS7 device can receive push, but with Production key, It can't.
    I can get my devide token for push but it is not able to receive anything.
    Any idea?
    This is my code:
    Appdelegate.m
        - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
            // PUSH-CODE
            [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
        // PUSH-CODE
        - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
            NSString *token = [[deviceToken description] stringByTrimmingCharactersInSet:      [NSCharacterSet characterSetWithCharactersInString:@"<>"]];
            token = [token stringByReplacingOccurrencesOfString:@" " withString:@""];
            NSLog(@"Token: %@", token);
            [[NSUserDefaults standardUserDefaults] setObject:token forKey:@"deviceToken"];
            [[NSUserDefaults standardUserDefaults] synchronize];
        - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
            NSLog(@"Failed to get token, error: %@", error);

    Jeff·Þ·Bohrer wrote:
    I might be insane but try replacing the path tunnels with a Shift register.
    Yes, Jeff, you are insane.  But that has nothing to do with LabVIEW.
    I fully agree that you should be using shift registers for the fields that need passed through as well as the error cluster.  But I don't see anything here that would cause issues.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • I've downloaded an app well is listed in ituned down the page as" sharing files" but not in the app list above ...

    as well the app is not listed on my purchased apps but like I said its showes in my home screen I have used it when I tried to sync itunes said that the location of the files is missing.
    I am using window 7 home edition.
    thanks yoav

    No matter how many times you ask this question, the answer is going to be the same.
    You can submit feedback to Apple here:
    http://www.apple.com/feedback

  • BPC 7.5 MS Drill Down works on one dimension in rows but not the other

    Good day,
    Working in BPC 7.5 MS.  I have a piped report with 3 dimensions in rows.  Members in the first dimension are hard-coded in the expand range.  The second dimension is a combination of SELF and DEP members.  The third is set to SELF.  In our original AppSet, I can double-click drill down on both the second and third dimensions without issue.
    I've re-created this report in a new AppSet (same BPC version).  All settings are essentially identical (I've double and triple checked).  The drill down works on the second dimension, but not the third.  I've run out of places to look to find the problem.  Any thoughts?
    Thanks in advance.
    Kim

    It took a while but I finally found some quiet time to re-visit this issue.  Thank you for the suggestions above.  Ultimately I verified that the hierarchy, member selection and tables were all ok.
    My next step was to create a new EVDRE with the same members and slowly factor in the piping, membersets, etc.  Drill down worked appropriately.  So that told me something else was at work.
    Turns out the problem was with one of the 'display' columns to the right of the row key range.  These columns use formulas to display a triangle if the member isn't calc, thus giving the end user a visual clue that you can drill down on the member.  Long story short, BPC just didn't like that formula.  A minor change (along with some conditional formatting to replace the piece of formula that was removed) eliminated the problem.  Drill down is now working.

  • My 4S keeps heating up and running battery down, I have deleted apps etc but still overheating?

    MMy 4s keeps over heating and running battery down, have tried reset, deleting apps but not working.  Unable even to put in cover as overheats. ?

    First, try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose data by resetting.
    If this does not help, set it up as new device, explained here:
    How to erase your iOS device and then set it up as a new device or restore it from backups
    If still no luck, get it checked by visiting an Authorized Apple Service Provider or contact Apple Support to get it serviced:
    iPhone - Contact Support - Apple Support

  • 3-column css "push down" problem

    I'm using a 3-column nav css design for my site (take a look
    at rjkg.com/GS.html), but the center and right columns are being
    pushed down in IE. Here's the css (navbar is left, headlines is
    right, and content is center):
    #navBar{
    float: left;
    width: 20%;
    margin: 0px;
    padding: 0px;
    background-color: #ffddbb;
    border-right: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    #headlines{
    float:right;
    width: 20%;
    border-left: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    padding-right: 10px;
    background-color: #ffddbb;
    background: #ffddbb;
    #content{
    float: left;
    width: 499px;
    margin-top: 0px;
    margin-right: 0px;
    margin-left: 0px;
    What do I do to make it showcorrectly in IE?
    Also, in Firefox, the center column isn't actually centered
    between the two sidebars, but I'd like it to be. Any clues?
    Thanks in advance from this newbie!
    R.

    > rjkg.com/GS.html), but the center and right columns are
    being pushed
    > down in
    > IE. Here's the css (navbar is left, headlines is right,
    and content is
    > center):
    >
    > #navBar{
    > float: left;
    > width: 20%;
    > margin: 0px;
    > padding: 0px;
    > background-color: #ffddbb;
    > border-right: 1px solid #cccccc;
    > border-bottom: 1px solid #cccccc;
    > }
    >
    > #headlines{
    > float:right;
    > width: 20%;
    > border-left: 1px solid #cccccc;
    > border-bottom: 1px solid #cccccc;
    > padding-right: 10px;
    > background-color: #ffddbb;
    > background: #ffddbb;
    > }
    >
    > #content{
    > float: left;
    > width: 499px;
    > margin-top: 0px;
    > margin-right: 0px;
    > margin-left: 0px;
    > }
    >
    > What do I do to make it showcorrectly in IE?
    >
    > Also, in Firefox, the center column isn't actually
    centered between
    > the two
    > sidebars, but I'd like it to be. Any clues?
    20% + 20% + 499px = ?
    You can't mix measures like that. Try replacing 499 with 60%.
    Your float
    will now drop in all browsers. Why?
    20% + 20% + 60% = 100%
    But the borders and padding you've assigned are added to the
    width,
    resulting in another mathematical improbablility. The easiest
    way to fix
    that is the remove the padding and borders from the main
    boxes and then
    nest content boxes inside the main boxes. Assign your borders
    and
    padding to those nested elements.
    Al Sparber - PVII
    http://www.projectseven.com
    Extending Dreamweaver - Nav Systems | Galleries | Widgets
    Authors: "42nd Street: Mastering the Art of CSS Design"

  • My phone wont reset with the both buttons pushed down method.. anyone knows anything else? please help!

    my iphone 4 is stuck in the spinning wheel mode, ive tried reseting it with both buttons pushed down and it wont reset! anyone knows some other way to do it? please let me know! thanks

    When you push both buttons (home and on/off), you need to hold them down together for 10-12 seconds till the Apple logo appears.

  • Remote desktop 8.0.14 (and prior) full screen RDweb session, screen pushed down by Mac Menu bar, mouse pointer on wrong position

    Hi
    On Mac OS X 10.10 Yosemite, there is a clear bug on the Microsoft Remote desktop app when
    a) remoting into a Windows server that is set to display full screen
    b) when you are logging in using a RDweb server aka RDS 2012.
    After logging in to the remote server, the full screen representation of the server desktop has the following issues:
    - The Mac Launchpad is still visible over the Windows desktop, making that part of the Windows desktop impossible to reach.
    - The published screen is pushed down about 15 pixels. It is pushed down by the Mac's menu that also remains visible.
    When I directly remote into the same server using traditional direct RDP (Not via the RDweb, gateway setup) the screen positions correctly. 
    I guess: Somehow the Remote desktop app  (8.0.14) does not seem to get the message from the server that this is a full screen session? Is there some information that the connection Broker or Gateway is not passing allong to
    the client? 
    I have replicated this many times. It is the same whether I connect to a 2012 server or to a 2008 server.
    Bart

    Hi,
    For a try you can use URI scheme for the specified desktop screen or full screen and check the result. You can refer the following article for information.
    Remote Desktop Client URI Scheme Support
    https://technet.microsoft.com/en-us/library/dn690096.aspx
    Apart if you have RD Gateway setup then you can try the option for RD Gateway to uncheck “Bypass RD Gateway for Local address” and verify result.
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • In ODSI 10gR3 fn:string-length() not pushing down to db (SR: 7714015.993)

    Under ALDSP 2.5, the following XQuery...
    where string-length($medacf) = 0 or $medacf = $acf/column_name
    ...used to generate this SQL:
    where ((? = 0) OR (? = t1."COLUMN_NAME"))
    However, under ODSI 10gR3, the where clause is missing. Here's the query plan:
    <?xml version="1.0"?>
    <FLWOR>
    <return>
    <elementConstructor name="UserGroup" tip="{ld:PhysicalLayer/UserProfile/UserGroup}UserGroup">
    <elementConstructor field="(0)" name="UserID" from="$f7815">
    </elementConstructor>
    <elementConstructor field="(1)" name="GroupID" from="$f7815">
    </elementConstructor>
    </elementConstructor>
    </return>
    <where sqlstop="Unable to generate SQL for XQuery expression: Cannot generate SQL for the function {http://www.bea.com/xquery/xquery-operators}integer-equal with parameters (Parameter,INTEGER), (Constant,INTEGER). There is no equivalent SQL for this function in general or with these particular parameter kinds/types. ">
    <operator ns="op" name="boolean-or" tip="{http://www.w3.org/2004/07/xpath-operators}boolean-or">
    <EQ sqlstop="Cannot generate SQL for the function {http://www.bea.com/xquery/xquery-operators}integer-equal with parameters (Parameter,INTEGER), (Constant,INTEGER). There is no equivalent SQL for this function in general or with these particular parameter kinds/types. " tip="{http://www.bea.com/xquery/xquery-operators}integer-equal">
    <operator ns="fn" name="string-length" tip="{http://www.w3.org/2004/07/xpath-functions}string-length">
    <variable name="__fparam0" kind="EXTERNAL">
    </variable>
    </operator>
    <constant>
    <![CDATA[[integer 0]]]>
    </constant>
    </EQ>
    <EQ tip="{http://www.bea.com/xquery/xquery-operators}string-equal">
    <variable name="__fparam0" kind="EXTERNAL">
    </variable>
    <variable name="(2)" from="$f7815" kind="extracted">
    </variable>
    </EQ>
    </operator>
    </where>
    <for name="$f7815">
    <source ns="fn-bea" name="UsrProfDataSource" sqlwarning="Generated SQL query does not have a WHERE clause. This may cause the query to take longer to finish and use excessive memory resources." kind="relational" tip="UsrProfDataSource">
    <![CDATA[SELECT UPPER(t1."USER_ID") AS c1, t1."GRP_ID" AS c2, t1."USER_ID" AS c3
    FROM "USRPROF"."USER_GRP" t1]]>
    </source>
    </for>
    </FLWOR>

    We have found that in ODSI 10gR3, the code pattern below is not pushed down if $logicalExpression is an expression that compares two atomic values and one of the values is a constant (used to work in ALDSP 2.5):
    where $logicalExpression or $table/column = $input
    Sample code that is not pushed down as expected:
    where fn:string-length($accountNumber) _<= 0_ or $account/ACCT_NUM = $accountNumber
    where fn:empty($accountNumber) or $accountNumber _= ''_ or $account/ACCT_NUM = $accountNumber
    where fn:empty($clientId) or $clientId _= 0_ or $account/CLIENT_ID = $clientId
    where fn:empty($effectiveDate) or $effectiveDate _= xs:date('0001-01-01')_ or $account/ACCT_EFF_DT = $effectiveDate
    We have also found that a workaround is to tweak the code and replace $logicalExpression with something that can be pushed down and functionally equivalent (using fn:not, fn-bea:fence, fn:exactly-one, etc.).
    Code that works:
    where fn:not(fn:string-length($accountNumber) > 0) or $account/ACCT_NUM = $accountNumber
    where fn-bea:fence(fn:string-length($accountNumber) <= 0) or $account/ACCT_NUM = $accountNumber
    where fn:exactly-one(fn:string-length($accountNumber) <= 0) or $account/ACCT_NUM = $accountNumber
    After examining the query plans, it appears to me (please correct me if any of these is not true):
    - Comparators for atomic types ({http://www.bea.com/xquery/xquery-operators} integer-less-than-or-equal, string-equal, date-equal, etc.) are not pushed down if they are used to compare anything with a constant
    - An "or" operation ({http://www.w3.org/2004/07/xpath-operators} boolean-or) is not pushed down if any of its operands cannot be pushed down
    - fn:not, fn-bea:fence, and fn:exactly-one can be pushed down even if their operand cannot be pushed down
    So the question is, why comparators are not pushed down when constants are involved? Is this a bug?
    Thanks!
    -r.

  • Formula Aggregation not pushed down to HANA DB

    Hi SAP Experts,
    We are creating a query in Query Designer. The query contains a formula with exception aggregate on material. See attachment 1 for details.
    When I execute and explain the query in RSRT, it runs for more than 1 min and the explain also says it has not been pushed down to HANA DB
    In RSRT query properties, we've tried each 'Operation in BWA/HANA' parameters, but the result is same.
    We are on BW7.4 SP7. HANA DB version is 1.00.70.00.386119
    According to SAP document, formula exception aggregate should be pushed down to HANA DB.
    Can any SAP expert advise if there's any specific setting you need to make to enable this? Thanks.
    Regards,
    Aaron

    Also would want to know if there are issues with the latest rev. SP7 w.r.t alerts and hdbstatisticsserver service under Landscape?
    I have observed the hdbstatisticsserver (and daemon.ini) doesnt come up on its own after db instance is restarted.
    FYI: I have HANA Instance on Linux VM (sandbox). 

  • Where clause one query not being pushed down

    I am having a problem where I cannot get a certain "optional" parameter to be pushed down to a query. The parameter gets applied in memory after the result set is returned but not pushed down to the DB. The function is as follows:
    declare function getFoo($key as xs:string, $optinalInput as xs:string*) as element(b:bar)*
    for $foo in f:getFoo()
    where $key = $foo/key
    where not(exists($optinalInput)) or $foo/optional = $optinalInput<- does not get pushed down to the query
    return $foo
    If I make optinalInput an xs:string instead of xs:string * and the optional parameter will get pushed to the query. The problem is for this optional parameter I could get anywhere from 0-50 in the sequence. Seems like when the parameter is a sequence it doesn't get applied to the query. Is there any way around this?

    Mike,
    I understand the difference between * and ? and I was one of the people working on the "string-length not getting pushed" problem so I am very familiar with it. I tried you solution that you mentioned below and it still did not push the where clause to the query. I know I could achieve this with an ad-hoc query but I wanted to do a pure xquery implementation of this component because of the benefits it could have when interacting with other components in our ODSI project...such as SQL joining and potentially pushing additional where clause down from components that call this component. The only way I did get this to kind of work is to do this:
    return
    for $o in $optinalInput
    for $foo in f:getFoo()
    where $key = $foo/key
    where $o = $foo/optional
    return
    $foo
    for $count in 1
    where not(exists($optinalInput))
    for $foo in f:getFoo()
    where $key = $foo/key
    return
    $foo
    By putting the optional parameter into a FOR statement above the table call it guarantees that at least one will exists and that's why the optional parameter gets pushed properly to the DB with a parameterized query. The problem with this is that even though a parameterized query gets pushed it will call the SQL statement multiple times!...not good.
    Another solution that was suggested to me would be to create the number of sequences for each item in the sequence and treat each item as it's own. For example if you know that the schema limits the sequence from 0..50 then you could make 50 items and 50 where clauses....probably not an optimal solution either but it would achieve properly pushing the where clause tot he DB.
    For now I am satisfied with this optional parameter not being pushed to the DB because the performance was still good but it would be nice if there was a maintainable pure xquery solution to this problem.
    Thanks for the help it's always appreciated!
    Mike

Maybe you are looking for

  • Is there any way to close just the "current tab" in firefox rather than all 3 or 4 that may be open and lose the entire web page?

    If I am on a website and open a few different pages, and then decide to go back to an earlier page, or close that particular page, I get a message that says you are about to close 3 tabs or 4 tabs etc. If I only want to close the "current tab" I am o

  • How do I use landscape in numbers?

    I just spent 20 dollars to get these apps for school. But when I opened the app it remained in portrait. Which is ver uncomfortable to use at all. Is there a setting I'm supposed to hunt down and tap? Please let me know, and I hope I did not waste my

  • Arrays touching on front panel slows down VI.

    I have written a VI which downloads and displays 2 Arrays of Spacecraft Telemetry packets. If I arrange the arrays on the front panel so that they are touching (to look neater), the VI slows to a fraction of its original speed. Why is this? I wasted

  • Ultiboard - connecting pins to each other on footprint

    I have a shielded connector with two mounting screws.  Both screws are connected to the shield, so if I want to ground it I only have to connect my GND net to one of the hole pads.  It doesn't matter which one, because they are common to the shield.

  • Problems downloading Code

    Hi guys! I have downloaded the Sap netweaer version for training, I downloaded from the sdn web page, but every time that I want to download the code and I want to see it, I see the code in one line, or like a mess, do you know what can be happening