Lucene query syntax

I'm trying to create a lucene query for a jasper report that mirrors sql
implicit join syntax. The lucene documentation is pretty light and I'm
not sure if what I'm trying to do is possible and if so, what the syntax
is.
So what I want to do is something like this:
SELECT
start.dt AS eventstarttime,
last.dt AS eventfinishtime
WHERE
start.evt:"Workflow Started" AND last.evt:"Workflow Ended" AND
start.pn:"Novell Identity Manager" AND start.rv51:Workflow AND
start.evtgrpid = last.evtgrpid
Is it possible to extract information from two entries like this?
nate_spears
nate_spears's Profile: http://forums.novell.com/member.php?userid=7564
View this thread: http://forums.novell.com/showthread.php?t=439799

Well, so within the report you can declare sorting and grouping based on
specific fields within the returned data. That may be sufficient to get
you to where you want to be. Beyond that you can do all sorts of things
since Jasper can basically include arbitrary Java code to do whatever
you need to do. Most of the features I'm talking about, however, are
really Jasper/iReport features and not so much anything special about
our SDK - as a result you may be able to find Jasper/iReport
documentation/forums etc that have examples of this sort of thing (you
can, of course, look at our existing reports if they have structures you
are interested in replicating).
DCorlette
DCorlette's Profile: http://forums.novell.com/member.php?userid=4437
View this thread: http://forums.novell.com/showthread.php?t=439799

Similar Messages

  • Ora-01704 string literal too long error  on long query syntax

    I have a query with more than 4000 characters. I can't seem to get ociparse to accept it. The bind variables are not an issue as I am not concatenating any strings to the query syntax. It is just that my query will all the columns and unions etc exceeds 4000 characters. Any way around this short of hiding it in a view ( which I have already done for other long queries ).
    System:
    PHP 4.3.10
    OCI driver
    Oracle 9i Release 2
    Thanks,
    Bryan

    Misread your post, sorry. Oracle limits literal strings to 4,000 chars. According to the documentation it's required that you use bind variables where possible to shorten literal strings below 4,000. You could also try a pl/sql block.
    The error you're getting is being returned by Oracle, not PHP. I've seen it pop up on bugtraq a couple of times for PHP, but the answer is always the same. I'm more of a programmer than a database expert, so forgive me for not having a better answer. You may want to try posting this to one of the more specific oracle forums where someone will probably have a better answer for you.
    http://www.stanford.edu/dept/itss/docs/oracle/9i/server.920/a96525/toc.htm

  • XPATH Database Query Syntax in an Assign

    Trying to get an XPATH Database query to work by assigning the Input variable value in a simple BPEL Process to my query condition. I keep getting invalid XPATH errors. I cannot seem to figure out how get write it out.
    Here is what I have:
    <from expression="orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')"/>
    Here is my error:
    Error(30): [Error ORABPEL-10039]: invalid xpath expression [Description]: in line 30 of "C:\OraBPELPM_1\integration\jdev\jdev\mywork\BPELws\ReadDB\ReadDB.bpel", xpath expression "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')" specified in <from> is not valid, because XPath query syntax error. Syntax error while parsing xpath expression "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')", at position "80" the exception is Expected: ). Please verify the xpath query "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')" which is defined in BPEL process. . [Potential fix]: Please make sure the expression is valid.
    Any help?
    Thanks!!!

    Ok. I have figured out how to place the condition (variable value) inside a concatentated string. So my final result is the actual XPATH Query-Database statement. But the problem is it is being returned as a String. How can I turn that final string into the XPATH expression I need? I suspect another <COPY> block could pull this off but I am not sure how to do it.
    Here is my code:
    <process name="QueryBuild" targetNamespace="http://xmlns.oracle.com/QueryBuild" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:client="http://xmlns.oracle.com/QueryBuild" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <partnerLinks>
    <partnerLink name="client" partnerLinkType="client:QueryBuild" myRole="QueryBuildProvider"/>
    </partnerLinks>
    <variables>
    <variable name="inputVariable" messageType="client:QueryBuildRequestMessage"/>
    <variable name="outputVariable" messageType="client:QueryBuildResponseMessage"/>
    <variable name="QueryText" type="ns1:string"/>
    </variables>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="client" portType="client:QueryBuild" operation="process" variable="inputVariable" createInstance="yes"/><!-- Generate reply to synchronous request -->
    <assign name="Assign_1">
    <copy>
    <from expression="concat(&quot;orcl:query-database('select ename from emp where empno = &quot;, bpws:getVariableData('inputVariable','payload','/client:QueryBuildProcessRequest/client:input'), &quot;,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL)'&quot;)"/>
    <to variable="QueryText"/>
    </copy>
    <copy>
    <from variable="QueryText"/>
    <to variable="outputVariable" part="payload" query="/client:QueryBuildProcessResponse/client:result"/>
    </copy>
    </assign>
    <reply name="replyOutput" partnerLink="client" portType="client:QueryBuild" operation="process" variable="outputVariable"/>
    </sequence>
    </process>

  • Sentinel 7 Lucene Query

    We are having our own product which is used to get the data from
    database of Sentinel-RD, Now because of our sudden change of Sentinel
    version in our product integration. I had to write Lucene Queries to get
    the data. Since i am very new to lucene queries, i am facing difficulty
    to write appropriate queries in Lucene.
    I will be using Sentinel 7 API to get the data from Sentinel 7 to our
    product.
    Below mention is the query which i had written in Sentinel RD , will
    any buddy convert this query in Lucene or will any buddy will give
    pointers to use of Sentinel 7 API.
    SELECT /*+ FIRST_ROWS(1000)*/
    case when event.RV45 is not NULL and event.dun is not NULL then
    event.DUN ||'@'||event.RV45
    when event.DUN is not NULL then event.DUN
    when event.dhn is not NULL then event.dhn
    when event.dip != -1 or event.dip is not NULL then
    esec_utl.to_ip_char(event.dip) end as target,
    case when xdas_tax.xdas_txnmy_name is not NULL then
    xdas_tax.xdas_txnmy_name||'-'||xdas_tax.XDAS_OUTCOME_NAME
    else tax.txnmy_lvl_1||'-'||tax.txnmy_lvl_2||'-'||tax.txnmy_lvl_3 end
    as taxonomy,
    case when event.evt is not NULL then event.evt else event.RV40 end as
    Event_sub_type,
    count(distinct(case when event.shn is not NULL then event.shn
    when event.sip != -1 or event.sip is not NULL then
    esec_utl.to_ip_char(event.sip)
    else event.SUN end)) as sources,
    count(case when event.sev in (5) then event.sev end) as critical,
    count(case when event.sev in (4) then event.sev end) as high,
    count(case when event.sev in (3) then event.sev end) as medium,
    count(case when event.sev in (2) then event.sev end) as low,
    count(case when event.sev in (0,1) then event.sev end) as
    Information,
    count(event.evt_id) as Event_Count
    FROM
    EVENTS event,
    EVT_TXNMY tax,
    EVT_XDAS_TXNMY xdas_tax
    WHERE
    event.cust_id = '$custId'
    AND event.evt_time >= TO_DATE('$startDate', '$dbDateFormat')
    AND event.evt_time <= TO_DATE('$endDate', '$dbDateFormat')
    AND (event.RID02 in ($RecconSumm.XDAS) OR tax.txnmy_id in
    ($RecconSumm.LEGACY))
    AND event.RID02 = xdas_tax.xdas_txnmy_id
    AND event.txnmy_id = tax.txnmy_id
    GROUP BY
    case when event.RV45 is not NULL and event.dun is not NULL then
    event.DUN ||'@'||event.RV45
    when event.DUN is not NULL then event.DUN
    when event.dhn is not NULL then event.dhn
    when event.dip != -1 or event.dip is not NULL then
    esec_utl.to_ip_char(event.dip) end,
    case when xdas_tax.xdas_txnmy_name is not NULL then
    xdas_tax.xdas_txnmy_name||'-'||xdas_tax.XDAS_OUTCOME_NAME
    else tax.txnmy_lvl_1||'-'||tax.txnmy_lvl_2||'-'||tax.txnmy_lvl_3
    end,
    case when event.evt is not NULL then event.evt else event.RV40 end
    ORDER BY critical DESC, high DESC, medium DESC, sources DESC, taxonomy
    DESC
    agupte
    agupte's Profile: http://forums.novell.com/member.php?userid=97998
    View this thread: http://forums.novell.com/showthread.php?t=448226

    Hello agupte,
    I'd be happy to help.
    First, some knowledge:
    - The Sentinel 7 APIs are fully documented through the Help menu
    directly in the product itself.
    - The Sentinel 7 Event Schema (fields) is also fully documented there,
    so you can construct the right query.
    Now, to do what you describe here you actually have two choices:
    1) Use a Lucene query
    2) Use a Data Sync policy to extract the events of interest to a
    database, and then use your existing SQL query.
    Your decision about using a data sync policy or not will basically come
    down to the volume of data you'll need to extract - if you'll
    essentially end up extracting all of the event data into a table, that's
    probably not such a great approach. If, however, you're only interested
    in a small subset of events (login events, perhaps, or just a count of a
    certain type of event), then the data sync/table stuff should perform
    reasonably well.
    OK, so now for Lucene vs. SQL:
    1) Lucene doesn't have a concept of selecting columns. So basically you
    say "give me the events that have these properties" (the SQL WHERE
    clause) and you get those events - not specific fields from those
    events, but the whole enchilada.
    2) You can't use any of the CASE/COUNT/etc business in Lucene either.
    You'll have to do that sort of processing on the backend.
    3) The Lucene data won't include any of the "mapped" data; it will
    (typically) include GUIDs and integers and whatnot, and you may have to
    map in the other data (like taxonomy) that you are currently JOINing.
    I suspect that we'd be better able to help you if you could actually
    explain your use case - what business objective you are trying to
    achieve - since it's not entirely clear from your SQL query alone.
    DCorlette
    DCorlette's Profile: http://forums.novell.com/member.php?userid=4437
    View this thread: http://forums.novell.com/showthread.php?t=448226

  • Question about WebLogic query syntax

    Hello,
    I am using WebLogic Server 6.0, which came as part of the WebGain
    Studio SE 4.5 development kit. My question regards the Web Logic query
    syntax, which I have not yet mastered.
    I am trying to create a finder method that takes a single argument
    of type "char" and finds all matching fields of the column "keyword" in
    which the argument is the first letter of keyword. That is, if I were
    only looking for fields beginning with the letter "M", I'd use:
    (like keyword 'M%')
    However, I'm looking for all fields beginning with the first letter
    defined by the first argument. Sadly, this syntax:
    (like keyword '$0%')
    doesn't seem to be working. Any suggestions on the correct syntax?
    If this is not the right forum for this question, could someone
    suggest an appropriate newsgroup?
    Thanks, Dave

    962466 wrote:
    Hi all,
    I have an issue I need help with. I have created a script for an automated partition create on a monthly basis. It creates a monthly partition containing all dates within the respective month. The script is essentially this:
    ALTER TABLE SCHEMA.TABLE
    ADD PARTITION &&1
    VALUES LESS THAN (to_number(to_char(to_date('&&2', 'DD-MON-YY'), 'YYYYMMDD')))
    TABLESPACE LARGE_DATA94 COMPRESS;
    I continually get this error message "ORA-14019: partition bound element must be one of: string, datetime or interval literal, number, or MAXVALUE"
    The variable &&2 is passing in character data for the first of the month (E.G. '01-SEP-12'). &&1 passes character data for the month in MONYY (AUG12) I can run this query:
    select
    (to_number(to_char(to_date('&&2', 'DD-MON-YY'), 'YYYYMMDD')))
    from dual;
    With the output of 20120801. I cannot understand why I am able to run this partition create statement by hardcoding 20120901 but passing it in as a variable I receive the error. Note that I am not having problems with the &&1 variable. If anyone has any ideas please let me know. Thanks!I don't understand why you are taking a string, converting it to a date, then converting the date BACK TO a string ... then trying to convert that string to a number.
    What is the data type of the partitioning key? It appears that it is a NUMBER, but actually represents a DATE. If so, that is a fundamentally flawed design.

  • Select-options in SELECT query - syntax error

    Hi all,
      I get the error below when I try to use the select options in a SELECT query . Please help me.
    "The IN operator with "SO_AWART" is followed neither by an internal
    table nor by a value list."
    The code i have used(Logical database  PNP is used):
    TABLES: pernr,
            catsdb.
    INCLUDE ztime_cwtr_top.    " global Data
    INCLUDE ztime_cwtr_f01.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
    PARAMETERS P_THRES TYPE I.
    SELECTION-SCREEN END OF BLOCK B1.
    Get data from CATSDB table. Workdates within the date interval are considered.
      SELECT pernr workdate awart catsquantity beguz enduz status
      FROM catsdb
      INTO TABLE it_catsdb
      WHERE pernr  = pernr-pernr    AND
           workdate GE pn-begda     AND
           workdate LE pn-endda     AND
           status   IN ('20', '30') AND
           awart    IN  so_awart .
          awart    IN ('1100', '1137', '1138', '1139', '1140',
                      '1147', '1148', '1149', '1157', '2003' ).
    when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
    I have tried different options like using only the select-options in the where condition.
    Thanks in advance.....
    Madhu

    Solved.
    Code with syntax error:
    include z...top .
    include z...fo1.
    select-options: xxxxxxx
    Code  with no syntax error:
    select-options: xxxxxxx
    include z...top .
    include z...fo1.
    Thanks for all your help,
    Madhu

  • InfoSet Query: Syntax Error while generating the program.

    Dear All,
    I have a Query in CRM system which contains an Infoset based on LDB.
    The InfoSet Query throws up a Syntax error while generating the program.
    So, we are not able to change the Infoset using the Infoset Query through SQ01.
    The error is as follows:-
    Syntax error in program "AQZZ==/SAPQUERY/CRM_ACTMON1 ".
    Error in the ABAP Application Program
    The current ABAP program "CL_QUERY_OUTPUT_DEFINITION====CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program "AQZZ==/SAPQUERY/CRM_ACTMON1 "
    in include "AQZZ==/SAPQUERY/CRM_ACTMON1 " in
    line 28:
    ""CRMT_REPORT_LOCATORLIST" must be a flat structure. You cannot use int"
    "ernal tables, strings, references, or structures as components. -"
    Please help me arrive at an solution, so that we are able to change the Infoset through the InfoSet Query.
    Awaiting your reply as soon as possible.
    Thanks and Regards,
    Pankaj.

    There is an error in your query, specifically in the definition of CRMT_REPORT_LOCATORLIST. In the short dump (transaction ST22) you will see more details and the exact location of an error if you just scroll down.
    I can't tell more because this problem is specific to your system, to which I have no access. Read the whole dump and look at all the objects mentioned there.

  • Query syntax error after multiprovider change

    Hi everyone,
    I removed key figures from a multicube, changed a query on top afterwards and saved it. The key figures are no longer in the key figure list of the query in the Query designer, and are no longer used in any place within the query.
    Now, I'm getting a syntax error on query execution, since the compiled query still contains a reference to the old key figures. Regeneration via RSRT or saving under a new name doesn't work, and to delete the generated report I need a developer key.
    Any ideas?
    Regards,
    Tilman

    Hi Shashank,
    thanks for your response.
    I did try the "check query" button, it didn't return an error. When executing the query via rsrt, I get a dump due to "Syntax error in program GP48VM7K0MSF08DRO2382A2PSTI ". The program still contains data type references to the removed infoobjects. When checking the program via SE38, you get just that syntax error.
    I'm looking for a way to clean these things up. Even when creating a new query on the aggregation level (I was talking about a multiprovider earlier, which is located underneath), the error pops up. I activated all the objects along the way, with no effect.
    Regards,
    Tilman

  • Query syntax error

    Hi,
    I've a query for a report as below. I want distinct donor code whereas i have 2 or more customers with same name and i want to retrieve data of customers between specific donor codes.I've a syntax error where i give 'between' for the following syntax in the code
    DONOR_TAB.DONOR_CODE BETWEEN DONOR_TAB.DONOR_CODE=:p_code AND DONOR_TAB.DONOR_CODE=:p_code
    The following is the query:
    SELECT ALL INITCAP(TITLE_TAB.TITLE_NAME||' '||DONOR_TAB.FIRST_NAME||' '||DONOR_TAB.MIDDLE_NAME||' '||DONOR_TAB.LAST_NAME) donor_name,
    RTRIM(INITCAP(RPAD(DONOR_TAB.ADDRESS1, 35, ' ')||RPAD(DONOR_TAB.ADDRESS2, 35, ' ')||RPAD(DONOR_TAB.STREET, 30, ' '))) DISPLAY_COL2,
    INITCAP(CITY_MASTER_TAB.CITY_NAME||' - '||DONOR_TAB.PIN) DISPLAY_COL3,
    INITCAP(CITY_MASTER_TAB.STATE_NAME||', '||CITY_MASTER_TAB.COUNTRY_NAME) DISPLAY_COL4,
    UPPER('DONOR CODE'||' - '||CITY_MASTER_TAB.CITY_NAME||'/'||DONOR_TAB.DONOR_CODE) DISPLAY_COL5
    FROM DONOR_TAB, CITY_MASTER_TAB, TITLE_TAB, DONOR_PROG_TAB
    WHERE donor_tab.donor_code = donor_prog_tab.donor_code AND DONOR_TAB.CITY_CODE = CITY_MASTER_TAB.CITY_CODE
    AND DONOR_TAB.TITLE_CODE = TITLE_TAB.TITLE_CODE
    OR DONOR_TAB.DONOR_CODE = :p_code
    OR DONOR_TAB.DONOR_CODE BETWEEN DONOR_TAB.DONOR_CODE=:p_code AND DONOR_TAB.DONOR_CODE=:p_code
    OR DONOR_TAB.LANG = :P_LANG
    OR DONOR_TAB.REMINDER = :P_REMINDER
    ORDER BY DONOR_TAB.DONOR_CODE
    Can you help me as to how i rectify this error
    Thanks

    Syntax is like this
    DONOR_TAB.DONOR_CODE BETWEEN :p_code AND :p_code
    Note:
    You hav given initial and final values as same(p_code)

  • SSRS multi value parameter expansion invalidates query syntax

    These results from from running a demo solution and profiling the server.
    --- here is the text of the query saved in the report's design ---
    select *
    from test_ssl
    where [who] in(case when @P1 = 'all' then [who] else @P1 end)
        and [recid] in(case when @P2 = 'all' then [recid] else @P2 end)
    Executing the report works when @P1 = ‘all’, @P2 = ‘all’
    ---------------------------------------- as executed at the server ---------------------------
    (@P1 nvarchar(3),@P2 nvarchar(3))
    select *
    from test_ssl
    where [who] in(case when @P1 = 'all' then [who] else @P1 end)
        and [recid] in(case when @P2 = 'all' then [recid] else @P2 end)
    Executing the report fails when @P1 = (‘kid’,’adult’) & @P2 = ‘all’
        An error has occurred during report processing. (rsProcessingAborted)
        Query execution failed for dataset 'DataSet1'. (rsErrorExecutingCommand)
        For more information about this error navigate to the report server on the local server machine, or enable remote errors
    ---------------------------------------- as executed at the server ---------------------------
    exec sp_executesql
    N'select *
    from test_ssl
    where [who] in(case when N''kid'',N''adult'' = ''all'' then [who] else
    N''kid'',N''adult'' end)
        and [recid] in(case when @P2 = ''all'' then [recid] else @P2 end)
    ', N'@P2 nvarchar(3)', @P2=N'all'
    SSRS expanded @P1 into its values then substituted @P1 with 'kid','adult' in the query's text, then sent the text to SQL server using sp_executesql().
    This substitution invalidates the SQL syntax.  The report fails.
    For me to implement this simple example with only 2 parameters in separate queries in the report where @P1 &/ @P2 can each separately be {= 'all', or 1 value, or more than 1 value} will take 4 separate queries.
    Query1: IF @P1 = all, @P2 = all BEGIN ... query text 1 ... END
    Query2: IF @P1 != all, @P2 = all BEGIN ... query text 2 ... END
    Query3: IF @P1 = all, @P2 != all BEGIN ... query text 3 ... END
    and
    Query4: IF @P1 != all, @P2 != all BEGIN ... query text 3 ... END
    Each query will have to have a unique WHERE clause.
    In my actual work problem some reports take 8 parameters that will be either 'all', 1 value, or multiple values.
    This means that the report will have to have 64 queries each with its own unique WHERE clause and each query wrapped with its own IF @P..... = 'all' BEGIN ... query text ... END
    Who knows what to do about this issue?
    Hello!

    Hi Stevesl,
    I have tested on my local environment and the query is invalid.
    As
    Jan Pieter Posthuma mentioned that you can just add filter as below in the query, when you set the "Allow multiple values" in the parameter, you will got the "Select All" in the dropdown list, so there is no need to add "all"
    again.
    select * from test_ssl
    where [who] in(@P1) and [recid] in(@P2)
    You can also add filter in the dataset, details information below for your reference:
    By default we can add many filters and the default logic between these filter is "And" and if you want to add some "Or" filters you can reference to the blog below:
    FAQ: How do I implement OR logic or complicated logics for filters in a SSRS report?
    Details information about filter in SSRS :
    Add a Filter to a Dataset (Report Builder and SSRS)
    Because you have a lot of parameters and you can consider add the cascading parameters:
    Add Cascading Parameters to a Report (Report Builder and SSRS)
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Using path:// query syntax - unexpected error

    Hi,
    I'm trying to use the path://InfoObjects/Root Folder/ syntax. I've followed the User Guide (XI 3.1) and I have the following code:
    PagingQueryOptions poptions = new PagingQueryOptions(0);
    String pathqry = "path://InfoObjects/Root Folder/Feature Samples/**/[SI_INSTANCE=1]";
    IPageResult ips = iStore.getPagingQuery(pathqry, poptions);
    Iterator pageResultIter = ips.iterator();
    IStatelessPageInfo pageInfo = null;
    while(pageResultIter.hasNext()) {
            IStatelessPageInfo    pageInfo = (IStatelessPageInfo) pageResultIter.next();
    String pageQuery = pageInfo.getPageSQL();
    colInstances = iStore.query(pageQuery);
    When I run this I get an Exception at the line:
    IStatelessPageInfo    pageInfo = (IStatelessPageInfo) pageResultIter.next();
    All the exception says is: java.lang.String.
    It's a Casting Exception but it doesn't make sense to me, it should work should it?
    Does anyone have any ideas or examples they have using this path:// functionality?
    Thanks

    Thanks Ted. Your example worked. It uses a slighly different method and is actually a lot simpler than the User Guide sample.
    Instead of doing the whole itereator thing you simply have:
    sqlStmt = iStore.getStatelessPageInfo("path://Root Folder/", new PagingQueryOptions()).getPageSQL();
    which returns the standard Enterprise SQL statement and then off you go as normal using this to query the iStore.
    colReports = iStore.query(sqlStmt);
    Edited by: SL on Jul 31, 2009 2:21 AM

  • MySQL InnerJoin query syntax error?

    I can't seem to locate the syntax error in this MySQL query.  Coldfusion says there an error in my sql syntax.  Here is the query.  Anyone have any clues on this?
    <cfquery name="queryItem" datasource="bonus">
    select
    p.productid,
    p.modelnumber,
    p.modeldescription,
    sp.sp_bonusamount as Amount
    from
    products i join bonusproducts sp on i productid = sp.sp_productid
    inner join program p on sp.sp_programid = p.programid
    where
    p.CompanyOrgLevelID in (#getParentCompanyOrgLevelIDList(session.CompanyOrgLevelID)#)
    and p.ProgramID = #programID#
    <cfif categoryID gt 0>
    and CategoryID in (#getSubcategoryIDList(categoryID)#)
    </cfif>
    order by
    #sortColumn# #sortDirection#
    </cfquery>

    To troubleshoot, run this:
    select
    p.productid,
    p.modelnumber,
    p.modeldescription,
    sp.sp_bonusamount as Amount
    from
    products i join bonusproducts sp on i productid = sp.sp_productid
    inner join program p on sp.sp_programid = p.programid
    where 1 = 2
    If it runs successfully, keep adding bits and pieces until it crashes.  Then you'll know what made it crash.
    Also enable debugging so you can see the sql that gets generated from your code.   That's often useful.

  • JDQL named query syntax error

    Hi,
    we have a syntax error in our JDOQL-namedQuery. We want to do a join over
    two tables "TestOrder" and "TestOrderPosition" and get this error:
    (we use Kodo 4.0)
    <?xml version="1.0"?>
    <jdoquery>
    <package name="salt.domain.orderservice.entity">
    <class name = "TestOrder">
         <query name="findByOrderId">select where
    testOrderPositions.contains(testOrderPosition) and
    testOrderPosition.description==:t variables
    salt.domain.orderservice.entity.TestOrderPosition testOrderPosition</query>
    </class>
    </package>
    </jdoquery>
    <4|false|4.0.0EA3> kodo.jdo.UserException: An error occurred while parsing the
    query filter "testOrderPositions.contains(testOrderPosition) and
    testOrderPosition.description==:t". Error message: The JDOQL string is not
    valid. Make sure all parentheses are matched and that you use proper Java
    syntax.
         kodo.query.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:92)
         kodo.query.jdoql.JDOQLExpressionBuilder.evalExpression(JDOQLExpressionBuilder.java:508)
         kodo.query.jdoql.JDOQLExpressionBuilder.eval(JDOQLExpressionBuilder.java:265)
         kodo.query.jdoql.JDOQLParser.eval(JDOQLParser.java:98)
         kodo.query.ExpressionStoreQuery$DataStoreExecutor.<init>(ExpressionStoreQuery.java:542)
         kodo.query.ExpressionStoreQuery.newDataStoreExecutor(ExpressionStoreQuery.java:154)
         kodo.query.QueryImpl.createExecutor(QueryImpl.java:807)
         kodo.query.QueryImpl.compileForDataStore(QueryImpl.java:741)
         kodo.query.QueryImpl.compileForExecutor(QueryImpl.java:721)
         kodo.query.QueryImpl.compile(QueryImpl.java:635)
         kodo.kernel.BrokerImpl.namedQuery(BrokerImpl.java:3681)
         kodo.kernel.DelegatingBroker.namedQuery(DelegatingBroker.java:1587)
         kodo.jdo.PersistenceManagerImpl.newNamedQuery(PersistenceManagerImpl.java:1028)
         salt.domain.orderservice.dao.jdo.JDOOrderRepositoryImpl.findOrderWithPositionById(JDOOrderRepositoryImpl.java:85)
         salt.domain.orderservice.OrderRepositoryImpl.findOrderWithPositions(OrderRepositoryImpl.java:91)
         salt.domain.orderservice.OrderServiceImpl.getOrderWithPosition(OrderServiceImpl.java:15)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         java.lang.reflect.Method.invoke(Unknown Source)
         org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
         org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
         org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
         org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
         org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
         org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
         $Proxy0.getOrderWithPosition(Unknown Source)
         salt.application.DddTestController.handleRequest(DddTestController.java:40)
         org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
         org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:717)
         org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:658)
         org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
         org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Does anyone have an idea?
    Thanks,
    Ingo Schneider

    Thanks for your help! It works now!
    I have another problem with a very simple query:
    I always get a ClassCastException with the follwoing query. If I left the
    result parameter out the query works. Parameter "t" is an integer, but
    there shouldn't be any cast problems between integer and long.
    <?xml version="1.0"?>
    <jdoquery>
         <package name="salt.domain.orderservice.entity">
              <class name="TestOrder">
         <query name="findByOrderIdPosition">select idOrder where
    idOrder==:t</query>
    </class>
    </package>
    </jdoquery>
    public class TestOrder implements Serializable{
         private String description;
         private long idOrder;
         private Set testOrderPositions = new HashSet();
    getters & setters...
    java.lang.ClassCastException: java.lang.Long
         salt.domain.orderservice.dao.jdo.JDOOrderRepositoryImpl.findOrderWithPositionById(JDOOrderRepositoryImpl.java:99)
         salt.domain.orderservice.OrderRepositoryImpl.findOrderWithPositions(OrderRepositoryImpl.java:91)
         salt.domain.orderservice.OrderServiceImpl.getOrderWithPosition(OrderServiceImpl.java:15)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         java.lang.reflect.Method.invoke(Unknown Source)
         org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
         org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
         org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
         org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
         org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
         org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
         $Proxy0.getOrderWithPosition(Unknown Source)
         salt.application.DddTestController.handleRequest(DddTestController.java:40)
         org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
         org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:717)
         org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:658)
         org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
         org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Thanks,
    Ingo Schneider

  • SQL query syntax error .......

    I am using following query
    SELECT PERNR VORNA NACHN GBDAT FROM PA0002
        INTO CORRESPONDING FIELDS OF TABLE ITAB
        WHERE UPPER( VORNA )  = UPPER( STRU_USERIP-VORNA )
        AND   ENDDA >= SY-DATUM
        AND   BEGDA <= SY-DATUM .
    and I am geting syntax error as --
    vorna is   not valid comparison operator .
    can anyone plz suggest me solution over this problem .

    Logic must be written,
    The below logic is incomplete
    Break your head and modify it
    TABLES:pa0002.
    DATA:itab TYPE TABLE OF pa0002.
    DATA:wa TYPE pa0002.
    DATA:lv_vorna TYPE pa0002-vorna.
    DATA:ra_vorna TYPE RANGE OF pa0002-vorna.
    DATA:wa_vorna LIKE LINE OF ra_vorna .
    DATA:lv_index TYPE i.
    DATA:offset TYPE i.
    DATA:pa_vorna TYPE pa0002-vorna VALUE 'Frank'.
    DATA:len TYPE i.
    len = STRLEN( pa_vorna ).
    MOVE pa_vorna TO lv_vorna.
    TRANSLATE lv_vorna TO LOWER CASE.
    wa_vorna-low = lv_vorna.
    APPEND wa_vorna TO ra_vorna.
    MOVE pa_vorna TO lv_vorna.
    TRANSLATE lv_vorna TO UPPER CASE.
    wa_vorna-low = lv_vorna.
    APPEND wa_vorna TO ra_vorna.
    wa_vorna-low = PA_VORNA.
    APPEND wa_vorna TO ra_vorna.
    TRANSLATE PA_VORNA TO LOWER CASE.
    DO len TIMES.
      lv_index = sy-index - 1.
      offset = lv_index + 1.
      DO len TIMES.
        MOVE pa_vorna TO lv_vorna.
        TRANSLATE lv_vorna+lv_index(offset) TO UPPER CASE.
        wa_vorna-low = lv_vorna.
        APPEND wa_vorna TO ra_vorna.
        ADD 1 TO lv_index.
      ENDDO.
    ENDDO.

  • MDX query : Syntax error at token 'NONEMPTYMEMBER'

    Syntax error when executing this very simplified MDX query :
    WITH
    MEMBER [ANNEE].[YEAR1] AS
    NONEMPTYMEMBER FY10
    [FY10]
    MEMBER [ANNEE].[YEAR2] AS
    NONEMPTYMEMBER [FY10]
    [FY10]
    SELECT
    {[YEAR1],[YEAR2]} ON COLUMNS
    FROM [MICOPIGE.COM_MBU]
    Syntax error in input MDX query on line 9 at token 'NONEMPTYMEMBER'
    Note that line 9 "NONEMPTYMEMBER FY10" is a copy of line 4
    No error if I delete line 4
    Any help to understand and fix this error would be greatly appreciated.

    Precision : My goal is to reduce the 30mn duration of a complex MDX query with many calculated members, using the NONEMPTYMEMBER token.

Maybe you are looking for

  • How do I get std out to log to myserver.log

    Using WL6.1 sp2, my Std Out messages go to the dos window (Win NT). How do I get them to also go to myserver.log. I have looked at the Console options and all logging is on. Info level etc. I also tried Right Clicking MyServer and choosing 'Get StdEr

  • Can't hear the microphone

    Hi, I purchased a Speed Link USB microphone (http://www.play.com/PC/PCs/-/676/883/-/5983672/SPEEDLINK-SL-8709-Pure-Voice-Micr ophone-II-USB/Product.html?searchtype=genre). In the system properties, the device is recognised and when I speak into it, t

  • SRM MDM Catalog - Data import

    Hi all, I am using srm mdm catalog 3.0 . Please let me know, how can i map the below fields fron Catalog.xsl file with SRM MDM pre-defined repository: 1-Image 2.Hypelinks 3.Catalog Name , Catalog ID [the client is asking whether , it's mandatory to m

  • Questions about going from Trial Version to Academic Version?

    1.) I'm using a trial version of LR and adding keywords through it. I'm planning to purchase the Academic version with the next few weeks. I'm assuming that everything I do with the trial version will also open up in the Academic version? All my keyw

  • LifeLine 4.0: TRIM support for SSD?

    I'm using SSDs as data volume and cache in px6-300d if this matters.