PeopleCode :: Query API :: Query Expression collection problems

Hi all,
I'm trying to use the Query API in PeopleCode to tack on an expression to the end of an existing query. Thus far I have been successful doing just a QueryField without any problems. Here is some example code of what I have done with the Query Expression collection and where I am stuck:
&Criteria = &MainQrySel.AddCriteria("criteria1");
&Criteria.Logical = %Query_CombAnd;
&Criteria.Expr1Type = %Query_Expression;
&crit = &Criteria.AddExpr1Expression();
&Criteria.Expr1Expression = &crit;
&crit.Text = -some expression-;
&Criteria.Operator = %Query_CondEqual;
&Criteria.Expr2Type = %Query_ExprConstant;
&crit = &Criteria.AddExpr2Expression();
&Criteria.Expr2Expression1 = &crit;
&crit.Text = -some criteria-;
So what's happening is that the left hand part of the expression is added to the entire statement along with the operator (the equals sign). The odd part is that the right hand part of the expression is not (basically the -some criteria- part).
If anyone has any ideas on how to solve this mystery, please let me know...I'm rather confuzzled!
Thanks in advance!

Well, I finally discovered he solution on my own, by reverse-engineering Oracle's own search.jsp (which does not use Oracle's custom tag library, btw) (probably because same doesn't really work, or at least it doesn't what's in the documentation doesn't work) (which isn't surprising).
You have to do the "From" part of the query as an "attribute filter".
oracle.ultrasearch.query.Query searchQuery=
new oracle.ultrasearch.query.Contains(searchString, metadata);
oracle.ultrasearch.query.Query attrQuery=
new oracle.ultrasearch.query.From(metadata.getGroup(groupToSearch));
oracle.ultrasearch.query.Request searchRequest=new oracle.ultrasearch.query.Request();
searchRequest.setQuery(searchQuery);
searchRequest.setFilter (attrQuery);
Maybe that will do somebody some good somewhere...
Troy

Similar Messages

  • UCS XML API Query Problem

    Currently I am attempting to power up and down a blade that is un-attached to a profile using a UCS XML API Query.
    Current progress:
    I have come up with this query that will power down a blade from a call from an attached profile...
    <configConfMo cookie="<SomeCookie>" inHierarchical="false">
    <inConfig>
    <lsPower dn="org-root/ls-profile1/power" state="down" status="modified"/>
    </inConfig>
    </configConfMo>
    This works for a server that is attached to a profile <profile1>, but I want to power down a server that is un-attached. I am currently using  UCS emulator 2.2 for testing these querys.

    There are a few options here that occur to me:
    Go to either the web interface of one of your UCSMs or the emulator with something like:
       http:///visore.html  or https:///visore.html
    traverse the objects or search for what you want and follow the '?' link to the right of the Class name.
    You could also try to find what you need here: http://www.cisco.com/en/US/docs/unified_computing/ucs/sw/api/VScgIX.html

  • In the report builder 6i when I choose the query  type as Express Query .....

    In the report builder 6i when I choose the query type as Express Query and go to next step where on pressing the connect button I am getting the following error.
    REP-6029 : Express error.
    How can I solve this problem ?
    Thanks
    Nanda Kishore

    DiId you download Oracle Reports Developer/Server Release 6i for Express, Files for Oracle8i for Windows NT from OTN?
    If so, could you provide me wih more information?
    Thanks
    Elaine

  • Query vs Toplink managed collection and cascade persist

    A fairly simple situation: I have a 1-N relation which is managed by Toplink: 1 relation can have N calendars (I know, badly chosen class name, but alas).
    If I access the collection through the Toplink managed collection, make a change to one of the calendars and then merge the relation, the change in the calendar instance automatically is detected and also persisted.
    However, if I use a query (because I do not need all calendars) to find the same instance and make the same change, then it is not persisted. Appearantly the "cascade persist" is not done here.
    There are a few ways around this:
    1. fetch the original collection and by compare-and-remove emulate the query
    2. do a setRelation(null) and then setRelation(xxx) of the relation
    3. do a merge inside the transaction (a merge outside does not work)
    The funny thing is, workaround #2 really sets the same relation again!
    Is there a way to have the result of a query also cascade persist?

    Well, I do not want to do it in a transaction, because then the changes are written to the database immediately and that will result in all kind of locking problems (this is a fat client situation). What want is fairly simple: the user modifies entities in an object graph in memory and at the end of his work either presses "cancel" and clears all changes, or presses "save" and stores all changes. When he presses "save" I expect the EM to persist every changed entity.
    This approach works ok for all scenario's I have implemented up until now. The current one is different in that I get related entities not by traveling the object graph (so via Cascade.PERSIST collections), but via a query. There is one major difference between these two: the entities from the collections are automatically persisted, the ones from a query are not.. BUT they are -for all means and purposes- identical. Specifically: the collection gives me ALL calendars associated with the relation, the query only those from a timespan but still associated with the relation.
    For some reason I expected the entities to also auto-persist, BECAUSE they also are present in the collection.
    Ok then, so I understand that entities fetched through a query are unrelated to any other entity, even though they also exist in a Cascade.PERSIST collection. (I still have to test what happens if I, after the query, also access the collection: will the same object be present?)
    That being as it as, I need to merge each queries entity separate and thus I expect the EM to remember any entities merged outside a transaction, but it does not. That I do not understand.
    Now, I already have a patched / extended EM because of a strange behavior in the remove vs clear dynamics, so this was a minor add-on and works perfectly (so far ;-). But if you have a better idea how to remember changes to entities, which are to be merged upon transaction start... Please!

  • Howto handle persistence API query result list

    Hello.
    I need some advice on how to handle a persistence API query result List since the Object variable returned by the "list.get(i)" method cannot be cast to an EntityClass declared by the EntityClassManager.
    The piece of code below might help you understand my exact problem.
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("SporTakipPU");
    EntityManager em = (EntityManager) emf.createEntityManager();
    Query q1 = em.createQuery( "SELECT d.id, d.date, c.name, c.sirname FROM Log d, Kisi c WHERE d.id = :id AND c.id = :id" );
    q1.setParameter( "id", argument );
    List logList = q1.getResultList();
    Log log = (Log) logList.get(1);
    In this code i cannot cast Object to Log in the last line. Apparently this has something to do with the query.
    Trying to solve this problem i declared two private string variables name and sirname and their set and get methods but this didn't help.
    Thanks...

    Entity Class : ReportView
    ===================
    @Entity
    @Table(name = "dummy")
    public class ReportView implements Serializable {
    @Id
    @Column(name = "id", nullable = false)
    private Integer id;
    // getter , setter
    SessionBean : ReportSessionBean
    ==========================
    public List<ReportView> getReports() {
    Query q = em.createNativeQuery("SELECT ID FROM REPORT", ReportView.class);
    List<ReportView> r=(List<ReportView>)q.getResultList();
    return r;
    JSF / Back Bean : ReportBackBean
    ==========================
    public class ReportBackBean {
    @EJB
    private ReportSessionRemote reportSessionBean;
    /** Creates a new instance of ReportBackBean */
    public ReportBackBean() {
    public List<ReportView> getReports() {
    return reportSessionBean.getReports();
    JSF
    ===
    <f:view>
    <h:dataTable value="#{ReportBackBean.reports}" var="report" border="1">
    <h:column>
    <h:outputText value="#{report.id}"/>
    </h:column>
    </h:dataTable>
    </f:view>
    Regards,
    Telman
    ..

  • Query Builder Admin Tool collections

    Hello,
    We would like to ask a BOE XI 3.1 SP3 CMS Repository (ORACLE 11.2) for Users that only have one alias and that alias is Enterprise.
    Firts we would like to do that using the web admin tool Query Builder, but we have problems with SI_ALIASES property because it is a collection of objects with their own properties and we don't know how to filter for that properties in a SQL Query.
    How can we peform these kind of queries?. Those queries that filter for the SI_ALIASES object properties. For example... si_name (alias name)
    We supposed that it could be solve with a little java program using java sdk also.
    There is not much information about these issues.
    Does anyone have the same problem?. How do you solve it?
    Thanks in advance,
    Carlos Castrilló

    QUERY BUILDER BOBJ
    Get All Webi reports
    Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Webi' And SI_INSTANCE=0
    Get Full Client Reports
    SELECT SI_ID, SI_NAME,SI_FILES FROM CI_INFOOBJECTS WHERE SI_KIND in( 'webi' ,'FullClient')
    Get All reports
    Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report' And SI_INSTANCE=0
    Get All universes
    Select SI_ID, SI_NAME, SI_WEBI, SI_KIND From CI_APPOBJECTS where SI_KIND ='Universe'
    Get All Users
    SELECT SI_ID, SI_NAME FROM CI_SYSTEMOBJECTS WHERE SI_PROGID='CrystalEnterprise.USER'
    Get all groups
    Select * from CI_SYSTEMOBJECTS Where SI_KIND='UserGroup'
    get all folders
    Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Folder'
    get all categories
    SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_KIND='Category'
    get all personal categories
    Select SI_ID, SI_NAME From CI_INFOOBJECTS Where SI_KIND='PersonalCategory'

  • Top N query with INLIST Iterator performance problem

    I have a top N query that is giving me problems on Oracle 11.2.0.3.
    First of all, I have a query like the following (simplified from the real query, but produces the same problem):
        select /*+ gather_plan_statistics */ * from
          select rowid
          from payer_subscription ps
          where  ps.subscription_status = :i_subscription_status
          and ps.merchant_id           = :merchant_id2
          order by transaction_date desc
        ) where rownum <= :i_rowcount; This query works well. It can very efficiently find me the top 10 rows for a massive data set, using an index on merchant_id, subscription_status, transaction_date.
        | Id  | Operation                     | Name        | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
        |   0 | SELECT STATEMENT              |             |      1 |        |     10 |00:00:00.01 |       4 |
        |*  1 |  COUNT STOPKEY                |             |      1 |        |     10 |00:00:00.01 |       4 |
        |   2 |   VIEW                        |             |      1 |     11 |     10 |00:00:00.01 |       4 |
        |*  3 |    INDEX RANGE SCAN DESCENDING| SODTEST2_IX |      1 |    100 |     10 |00:00:00.01 |       4 |
        -------------------------------------------------------------------------------------------------------As you can see the estimated actual rows at each stage are 10, which is correct.
    Now, I have a requirement to get the top N records for a set of merchant_Ids, so if I change the query to include two merchant_ids, the performance tanks:
        select /*+ gather_plan_statistics */ * from
          select  rowid
          from payer_subscription ps
          where  ps.subscription_status = :i_subscription_status
              and (ps.merchant_id = :merchant_id or
                   ps.merchant_id = :merchant_id2 )
          order by transaction_date desc
        ) where rownum <= :i_rowcount;
        | Id  | Operation               | Name        | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
        |   0 | SELECT STATEMENT        |             |      1 |        |     10 |00:00:00.17 |     178 |       |       |          |
        |*  1 |  COUNT STOPKEY          |             |      1 |        |     10 |00:00:00.17 |     178 |       |       |          |
        |   2 |   VIEW                  |             |      1 |    200 |     10 |00:00:00.17 |     178 |       |       |          |
        |*  3 |    SORT ORDER BY STOPKEY|             |      1 |    200 |     10 |00:00:00.17 |     178 |  2048 |  2048 | 2048  (0)|
        |   4 |     INLIST ITERATOR     |             |      1 |        |  42385 |00:00:00.10 |     178 |       |       |          |
        |*  5 |      INDEX RANGE SCAN   | SODTEST2_IX |      2 |    200 |  42385 |00:00:00.06 |     178 |       |       |          |Notice now that there are 42K rows coming out of the two index range scans - Oracle is no longer aborting the index range scan when it reaches 10 rows. What I thought would happen, is that Oracle would get at most 10 rows for each merchant_id, knowing that at most 10 rows are to be returned by the query. Then it would sort that 10 + 10 rows and output the top 10 based on the transaction date, but it refuses to do that.
    Does anyone know how I can get the performance of the first query, when I need to pass a list of merchants into the query? I could probably get the performance using a union all, but the list of merchants is variable, and could be anywhere between 1 or 2 to several 100, so that makes that a bit unworkable.

    Across the two merchants_id's there are about 42K rows (this is in test, on Prod there could be several million). In the first query example, Oracle can answer the query in about 4 logical IOs and without even doing a sort as it uses the index to scan and get the relevant rows in Oracle.
    In the second case, I hoped it would pull 10 rows for each merchant_id and then sort the resulting 20 rows to find the top 10 ordered by transaction_date, but instead it is scanning far more rows than it needs to.
    In my example, it takes 4 logical IOs to answer the first query, but ~ 170 to answer the second, while I think it is achievable in 8 or so. For example, this query does what I want, but it is not a feasible option due to how many merchant_id's I may have to deal with:
    select /*+ gather_plan_statistics */ *
    from
      select *
      from 
        select * from
          select  merchant_id, transaction_date
          from payer_subscription ps
          where  ps.subscription_status = :i_subscription_status
          and ps.merchant_id = :merchant_id
          order by transaction_date desc
        ) where rownum <= :i_rowcount
        union all
        select * from  
          select  merchant_id, transaction_date
          from payer_subscription ps
          where  ps.subscription_status = :i_subscription_status
          and ps.merchant_id = :merchant_id2
          order by transaction_date desc
        ) where rownum <= :i_rowcount
      ) order by transaction_date desc
    ) where rownum <= :i_rowcount;
    | Id  | Operation                          | Name        | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    |   0 | SELECT STATEMENT                   |             |      1 |        |     10 |00:00:00.01 |    6 |          |       |          |
    |*  1 |  COUNT STOPKEY                     |             |      1 |        |     10 |00:00:00.01 |    6 |          |       |          |
    |   2 |   VIEW                             |             |      1 |     20 |     10 |00:00:00.01 |    6 |          |       |          |
    |*  3 |    SORT ORDER BY STOPKEY           |             |      1 |     20 |     10 |00:00:00.01 |    6 |  2048 |  2048 | 2048  (0)|
    |   4 |     VIEW                           |             |      1 |     20 |     20 |00:00:00.01 |    6 |          |       |          |
    |   5 |      UNION-ALL                     |             |      1 |        |     20 |00:00:00.01 |    6 |          |       |          |
    |*  6 |       COUNT STOPKEY                |             |      1 |        |     10 |00:00:00.01 |    3 |          |       |          |
    |   7 |        VIEW                        |             |      1 |    100 |     10 |00:00:00.01 |    3 |          |       |          |
    |*  8 |         INDEX RANGE SCAN DESCENDING| SODTEST2_IX |      1 |    100 |     10 |00:00:00.01 |    3 |          |       |          |
    |*  9 |       COUNT STOPKEY                |             |      1 |        |     10 |00:00:00.01 |    3 |          |       |          |
    |  10 |        VIEW                        |             |      1 |     11 |     10 |00:00:00.01 |    3 |          |       |          |
    |* 11 |         INDEX RANGE SCAN DESCENDING| SODTEST2_IX |      1 |    100 |     10 |00:00:00.01 |    3 |          |       |          |
    ---------------------------------------------------------------------------------------------------------------------------------------This UNION ALL query completes in 6 logical IOs - the original query I posted with 2 IDs takes 178 to return the same results.

  • Query has exceeded 300 rows problem

    I just realized I posted in the wrong forum, sorry.
    Query has exceeded 300 rows. Potentially more rows exist, please restrict your query.
    I see in the diagnostics log on screen.
    ERROR:[fnd.common.Message.auto_log]:FND�FND_POTENTIALLY_MORE_DATA�N�VO_NAME�RecusalTransientVO1�N�MAX_FETCH_SIZE�300�
    But when I execute the query from the "About this Page" link of the RecusalTransientVO1 using toad, I only get one row.
    Please help shed light on this.
    Edited by: thedatawarehouse on Jul 6, 2011 12:35 PM

    Duplicate post -- Query has exceeded 300 rows problem.

  • Sap api query

    Hi everybody,
    Can anyone explain me what is  sap api query?
    Please help.
    Thanks
    Sonali

    Hi,
    I dont think there is any thing specific like "SAP API Query" but there are some Java APIs (Application Programming Interfaces) from SAP that will be used in SAP-PI while working with Java mappings,Dynamic configurations,Adapter module developments.Etc.,please me lwt me know if i understood your query wrong.
    for those APIs refer the following thread.
    http://help.sap.com/javadocs/NW04S/current/pi/index.html
    Thanks,
    Ram.

  • Please convert decode query to case expression

    Please convert decode query to case expression
    Decode(Sign(id), 1, id, null) positive, Decode(Sign(id), -1, id, null) negative from dual;

    this is a serious forums that help people, if you want that we do your "homeworks" i must told you that you should pay us for that.
    Edited by: Fran on 05-jun-2013 23:41
    1002966     
    Handle:      1002966 
    Status Level:      Newbie
    Registered:      Apr 28, 2013
    Total Posts:      20
    Total Questions:      12 (12 unresolved)

  • REST API Query for file Versions - current version

    Hi,
    I have referred to the list of API query options from this link:
    https://msdn.microsoft.com/en-us/library/office/dn450841.aspx .
    As described in the post, the query  goes as below
    url: "<app web url>/_api/SP.AppContextSite(@target)/web
        /getfilebyserverrelativeurl('/Shared Documents/filename.docx')/versions
        ?@target='<host web url>'",
    This does not return the current file version details. Is there a way to get those details in the same query or should we place another query to get the current version file details as below
    url: "<app web url>/_api/SP.AppContextSite(@target)/web
        /getfilebyserverrelativeurl('/Shared Documents/filename.docx')
    Thanks,
    Meena

    Hi Meena,
    In FileVersion endpoint, it will only return the old versions of a file.
    If you want to retrieve all versions(including) of a file, there will be a need to run another request for the current version only, though which might cause extra workload.
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Query For Series wise Collection

    Hi
    Please anyone provide  query for series-wise collection

    Satish Doke,
    Im using this query as "Series Wise Outstanding" I want to create another  query for "series wise collection".How can  i do this.Im not into SAP accounting.Please help.
    DECLARE @Date AS DATETIME
    DECLARE @Series AS varchar(30)
    DECLARE @Branch AS varchar(30)
    DECLARE @Exec AS varchar(30)
    /* SELECT FROM [dbo].[OINV] S0 WHERE */ SET  @Date = /* S0.DocDate*/ '[%0]'
    /* SELECT FROM [dbo].[NNM1] S2 WHERE */ SET  @Series = /* S2.SeriesName*/ '[%2]'
    /* SELECT FROM [dbo].[OLCT] S3 WHERE */ SET  @Branch = /* S3.Location*/ '[%3]'
    /* SELECT FROM [dbo].[OSLP] S4 WHERE */ SET  @Exec = /* S4.SlpName*/ '[%4]'
    if( @Exec ='') set @Exec ='%'
    if( @Series ='') set @Series ='%'
    if( @Branch ='') set @Branch ='%'
    if( @Date ='') set @Date =GETDATE()
    Select distinct OINV.CardName [Customer Name], ISNULL(NNM1.SeriesName ,'-')+'/'+ CAST(OINV.DocNum as varchar) [Bill No.],
    OINV.DocDate [Bill Date],INV1.Dscription,INV1.Quantity,
    OINV.DocTotal - OINV.PaidToDate [Out Standing Amount],
    DATEDIFF(dd,OINV.DocDate,@Date)[No of Days]  from OINV
    inner join INV1 on OINV.DocEntry = INV1.DocEntry
    inner join OLCT on INV1.LocCode = OLCT.Code
    inner join NNM1 on OINV.Series = NNM1.Series
    inner join OSLP on OINV.SlpCode = OSLP.SlpCode 
    where OINV.DocType ='I' and (OINV.DocTotal - OINV.PaidToDate)>0
    and NNM1.SeriesName like @Series and OINV.DocDate<= @Date
    and OLCT.Location like @Branch and OSLP.SlpName like @Exec

  • On Hand Query API - LPN ATR

    Hi All,
    I am using the On Hand Query API inv_quantity_tree_pub.query_quantities in our custom code, to get the ATR (Available to Reserve) Quantities. It is working fine to get the ATR Quantities specific to Item, Lot, Sub Inventory, Locator.
    But If I go one level below to LPN, it is not returning the ATR specific to the LPN (eventhough I pass P_LPN_ID). Suppose if there are 3 LPNs for 1 Lot, if I call the API by giving all the details including the LPN (IN parameter P_LPN_ID), it is returning the ATR (OUT parameter X_ATR) for the whole Lot (i.e same value for all the 3 LPNs), not specific to the LPN. Below is the API call, I am using in our code.
    I am expecting the same ATR value, as I could see in the On Hand Availability Form. Please let me know, if I am missing any thing on this.
    inv_quantity_tree_grp.clear_quantity_cache;
    inv_quantity_tree_pub.query_quantities
    p_api_version_number => 1.0
    ,p_init_msg_lst => apps.fnd_api.g_false
    ,x_return_status => l_api_ret_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data
    ,p_organization_id => p_organization_id
    ,p_inventory_item_id => p_inventory_item_id
    ,p_tree_mode => 2--inv_quantity_tree_pub.g_transaction_mode
    ,p_onhand_source => 3--inv_quantity_tree_pvt.g_all_subs
    ,p_is_revision_control => FALSE
    ,p_is_lot_control => TRUE
    ,p_is_serial_control => FALSE
    ,p_revision => NULL
    ,p_lot_number => p_lot_number
    ,p_lot_expiration_date => SYSDATE
    ,p_lpn_id => p_lpn_id
    ,p_subinventory_code => p_subinventory
    ,p_locator_id => p_locator_id
    ,p_grade_code => NULL
    ,x_qoh => l_qty_oh
    ,x_rqoh => l_qty_res_oh
    ,x_qr => l_qty_res
    ,x_qs => l_qty_sug
    ,x_att => l_qty_att
    ,x_atr => l_qty_atr
    ,x_sqoh => l_sqty_oh
    ,x_srqoh => l_sqty_res_oh
    ,x_sqr => l_sqty_res
    ,x_sqs => l_sqty_sug
    ,x_satt => l_sqty_att
    ,x_satr => l_sqty_atr
    Appreciate your help on this.
    Thanks,
    Gowri.

    Hi
    you cannot associate a lot number to an LPN unless this LPN is a Container Item.
    You can generate the using GENERATE_LPN API, this will populate WMS_LICENSE_PLATE_NUMBERS. then you will have to insert a record with Item and Lot to WMS_LPN_CONTENTS
    with reference WMS_LPN_CONTENTS.PARENT_LPN_ID to WMS_LICENSE_PLATE_NUMBERS.LPN_ID
    Hareesh

  • Concat expression Collection T

    Hi all,
    I have a mapping in my entity, one to many mapping, example relationship "1 question -> many answers"
    so, in Question class, i can access a collection of "Answers"; But in my criteria query, i need to concat all "Answers' summary" for sorting purpose. ("summary" is a field in Answer class)
    I can get:
      Expression<Collection<T>> e = root.get("answers") but i don't know how to create sorting criteria for concatenation of all summary that an answer has.
    I have googled around, but i haven't found a way to do it.
    thank you for your help
    regards,
    -Hoang Long
    Edited by: CardM on Aug 7, 2012 7:34 PM

    Hi all,
    I have a mapping in my entity, one to many mapping, example relationship "1 question -> many answers"
    so, in Question class, i can access a collection of "Answers"; But in my criteria query, i need to concat all "Answers' summary" for sorting purpose. ("summary" is a field in Answer class)
    I can get:
      Expression<Collection<T>> e = root.get("answers") but i don't know how to create sorting criteria for concatenation of all summary that an answer has.
    I have googled around, but i haven't found a way to do it.
    thank you for your help
    regards,
    -Hoang Long
    Edited by: CardM on Aug 7, 2012 7:34 PM

  • Query of Query Case Sensative

    Hello all
    Got a simple problem, I run a main query:
    <CFQUERY name="getprice" datasource="adatabase">
    SELECT RTRIM(plpart) AS plpart, MIN(plunitprice) AS
    plunitprice
    FROM pricelist
    GROUP BY plpart
    </CFQUERY>
    now in the table pricelist some parts are entered in
    lowercase i.e the results could look like below:
    Part____Price
    ABc, 10
    DeF, 11
    ghi, 12
    JKL, 10
    If I query the datasource direct there is no problem with the
    case being upper or lower, but when I query of query like below it
    only returns a result if the LIKE '#variable#' is the correct case,
    how do I get around this?
    <CFquery dbtype="query" name="qoq_price">
    SELECT plunitprice
    From getprice
    WHERE plpart LIKE '#variable#'
    </CFquery>
    for example
    if variable was 'ABc' the QOQ returns the correct price of 10
    but
    if variable was 'ABC' the QOQ does not return a result
    Trouble is my variables come from one table where they are
    all in Upper case but in my price table people have entered them in
    both cases and sometimes mixed.
    Kind Regards Guy

    The bold bit throws an error
    Query Of Queries syntax error.
    Encountered "( plpart ) LIKE" at line 4, column 12. Incorrect
    conditional expression, Expected one of
    [like|null|between|in|comparison] condition, Unrecognized
    comparison operator,
    WHERE
    UCase(plpart) LIKE '#UCase(Variable)#'
    This works
    WHERE plpart LIKE '#UCase(Variable)#'
    But then im turning the wrong side into upper case.
    I need a kind of no case or ignore case format so in PSUDO it
    would be somthing like
    WHERE plpart LIKE #ignorecase(#variable#)#
    if you see what i mean.
    Regards Guy

Maybe you are looking for

  • Copy a cd or dvd

    Can anyone tell me how I can make a copy of a cd or dvd? I have the super drive.

  • Detect frequency of an analog signal coming in through myRIo AudioIn analog port

    I am working on a fire-fighting robot that runs using myRio. I have a small mic plugged into the 'AudioIn' port of the myRIO and the robot has to detect a certain frequency(2.8 or 3.5 KHz) to start navigation. The AnalogIn express VI gives me raw vol

  • Selective Deletion using 0REQUID & Date fields in combination

    We are running SAP NetWeaver 2004s patch 15 I have tried to run a selective deletion with request ID and date fields but we are getting an SQL error.  The cube is compressed but the requests I am after have not been compressed.  Is this an activity I

  • IPhone back up via WIFI

    I need to back up my iPhone via the wifi but dont know how much memory is going to use and our internet isnt the greatest package. Does it back up the full memory of the iphone? so if its a 16gb, 32gb etc does it back up to the memory.

  • OBIEE - Pivot view

    Hi experts, I am getting the following error when I drill into lower hierarchial levels in a pivot view Governor limit exceeded in cube generation (Maximum data records exceeded.) Error Details Error Codes: QBVC92JY Currently I have the following par