Question on query expression

I read through the ondemand webservices guide but didn't fiind the answer I was looking for.
I have a requirement to query Opportunities by setting a multiple search criteria on a single field. For ex, OpportunityConcatField Not equal to VALUE1, VALUE 2 etc.
If I set only one value in the expression the query works fine. The moment I set more than one value the query bombs out. I read in the forum somewhere that, if I need to set multiple criteria I need to create multiple objects (each with a single criteria) and add them to the list of the input. I would like to avoid it if I can as my criteria is dynamic and is specified in a config file.
Is there any other alternative ?.
Thanks

If i understand your problem correctly, you want to query the records where OpportunityConcatField not equal to VAL1, VAL2,VAL3 etc...
why don't you use AND operation
((<>'VAL1') AND (<>'VAL2)) AND (<>'VAL3') like this.
Dinesh

Similar Messages

  • Missing operator in query expression

    Greetings,
    I'm attempting to access a MS Acess database, but getting the following error.
    Syntax error (missing operator) in query expression 'Org Name'.
    The error occurs between the following two lines.
    String SQL = "SELECT Org Name FROM OrganizationTable";
    ResultSet resultset = statement.executeQuery(SQL);Where Org Name is the data set I'm trying to access and OrganizationTable is the database table.
    Any help would be appreciated.

    What is happening is that the interpreter is seeing
    "Org Name" as two different columns and/or values and
    is expecting an operator. Somehow you need to
    indicate that it should be interpreted as a single
    column.
    Try one of these (I'm not sure if one will work since
    I don't work with access much, but I'm guessing that
    it would work similar to other dbs I've used):
    String SQL = "SELECT [Org Name] FROM
    OrganizationTable";
    or
    String SQL = "SELECT 'Org Name' FROM
    OrganizationTable";
    Thanks boss,
    I started to get it figured as I was able to open a result set that didn't have any whitespace in the name in the same table.
    FYI, [Org Name], did the trick. Single quotes do not work.
    Thanks again :)

  • Syntax error (missing operator) in query expression works in sql

    Hi guys,
    I am having a problem with this query in Access 2007, it runs
    fine in MSSQL.
    I get this error when I run it.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator) in query expression
    'tbl_skuoption_rel.optn_rel_Option_ID = tbl_skuoptions.option_ID
    INNER JOIN tbl_skus ON tbl_skuoption_rel.optn_rel_SKU_ID =
    tbl_skus.SKU_ID INNER JOIN tbl_products AS p ON
    tbl_skus.SKU_ProductID = p.product_ID'.

    Access may require parenthesis ( ) around the JOINs when
    joining more than two tables

  • Syntax error in query expression

    I am receiving the following error message:
    Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator) in query expression 'customerid_cus='.
    for the following code:
    If IsEmpty(Request.Form("company_cus")) Then
    rs_company.Source = "SELECT customerid_cus, company_cus FROM
    customers_cus WHERE customerid_cus= "&
    Request.QueryString("customerid") &" "
    Else
    rs_company.Source = "SELECT customerid_cus, company_cus FROM
    customers_cus WHERE company_cus = '"&
    Request.Form("company_cus") &"' "
    End If
    What could the problem be?

    Are you sure that you are passing the querystring customerid
    when the form
    company_cus is empty.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "aonefun" <[email protected]> wrote in
    message
    news:epmf3n$f3u$[email protected]..
    >I am receiving the following error message:
    >
    > Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator)
    > in
    > query expression 'customerid_cus='.
    >
    > for the following code:
    >
    > If IsEmpty(Request.Form("company_cus")) Then
    >
    > rs_company.Source = "SELECT customerid_cus, company_cus
    FROM
    > customers_cus
    > WHERE customerid_cus= "&
    Request.QueryString("customerid") &" "
    >
    > Else
    >
    > rs_company.Source = "SELECT customerid_cus, company_cus
    FROM
    > customers_cus
    > WHERE company_cus = '"& Request.Form("company_cus")
    >
    > End If
    >
    > What could the problem be?
    >

  • Syntax error (missing operator) in query expression

    Hi all
    I am creating a couple of pages where a dynamic list is created from an access database and then products from that list are displayed, the user then has the option of clicking more details, this then should pass the KITID over to the details page, However when i click on the details page i get the following error
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'KitID = Kit 01'.
    /classicclocks/Kieninger_gallery.asp, line 21
    Here is the code from the page i am building, can anybody see anything obvious here
    strKitID = Request.QueryString("KitID")
    ' If KitID does not exist then redirect to Gallery page
    If strKitID = False Then
      Response.Redirect("kit_gallerytest.asp")
    End If
    ' SQL Query for specific KitID details only
    Dim objRS
    Set objRS = Server.CreateObject ("ADODB.Recordset")
    ' Open new objRS
      strSQL = "SELECT KitID,ImgKitCatalogue,KitDescriptionShort FROM tblMovements WHERE KitID = " & strKitID & " ORDER BY KitID"
      objRS.Open strSQL, MM_dbConn_STRING,,,adCmdTable
      ' Get all rows from table and asign values to array for use in form
      Do While Not(objRS.EOF)
      Images = True
      fsImagesArray = objRS.GetRows()
        Const arrKitID = 0
        Const arrImgKitCatalogue = 1
        Const arrKitDescriptionShort = 2
      Loop
    ' Close objConn and objRS
    objRS.Close
    strSQL = "SELECT * From tblMovements WHERE KitID = " & strKitID
    objRS.Open strSQL, MM_dbConn_STRING
    thanks
    John

    String values in a SQL where clause must be wrapped in quotes. Try this:
    strSQL = "SELECT KitID,ImgKitCatalogue,KitDescriptionShort FROM tblMovements WHERE KitID = '" & strKitID & "' ORDER BY KitID"

  • Named Query Expression in Toplink workbench

    Hi! All,
    I have a problem which I am not sure how to solve and would appreciate any help on this.
    I have Tables
    Company, Employee, EmployeeTaxType , TaxTypeVal
    Each is mapped to a java class with the same name
    I would like to find all Employee Objects for a company where (taxTypeVal.year=2005 and taxType.quarter=2)
    I cant seem to be able to build a Named Query expression which would produce the same result.
    It always returns All employees who belong to a company and have liabilities in either year =2005 OR quarter=2
    The expression that I wrote was
    AND
    1.companyBO.companyID EQUAL COMPANY_ID
    2.AND
    2.1.employeeTaxTypeBOs.taxTypeValBOs.quarter EQUAL QUARTER
    2.2.employeeTaxTypeBOs.taxTypeValBOs.year EQUAL YEAR

    Please post the SQL that is generated from TopLink, and the xml where you define the NamedQuery. What version of the MappingWorkbench and TopLink runtime are you using?
    Deepak

  • Malformed GUID. in query expression

    Hello I have a script that was developed a long time ago. I
    wish to use it now, However i'm receiving the following errors. Is
    this because it was developed with an older version of CF? Can
    anyone spot out what I can change to make this work. Im running
    CFmx7. Any help is much appreciated.
    Thanks,
    Brian
    Error Executing Database Query.
    Malformed GUID. in query expression 'EVENT.Inactive = 0 AND
    EventPrivate = 0 AND Event.TaskID = 0 and { fn MONTH(EventDate)} =
    { fn MONTH( #2007-11-29 10:38:13# )} AND { fn YEAR(EventDate)} = {
    fn YEAR( #2007-11-29 10:38:13# )}'.
    <CFQUERY NAME="GetEvents"
    DATASOURCE="#application.datasource#">
    SELECT
    EventCategory.EventCategory,EventPrivate,EVENT.EventCatID,EventDate,EventDateEnd,EventNoT ime,EventDescr,EventID,EventName,EventDate
    FROM EVENT left join EventCategory on EVENT.EventCatID =
    EventCategory.EventCatID
    WHERE EVENT.Inactive = 0 AND EventPrivate = 0 AND
    <cfif session.userid is "">
    Event.TaskID = 0 and
    <cfelse>
    <cfif #session.userTasks# neq 0> (Event.TaskID IN
    (#session.userTasks#) or (Event.TaskID = 0 )) and </cfif>
    <cfif #session.SrchTaskid# neq 0> Event.TaskID =
    #session.SrchTaskid# and </cfif>
    </cfif>
    {fn MONTH(EventDate)}={fn MONTH(#ThisDate#)} AND
    {fn YEAR(EventDate)}={fn YEAR(#ThisDate#)}
    <cfif CatIDs neq 0>
    AND EVENT.EventCatID in (#PreserveSingleQuotes(CatIDs)#)
    </cfif>
    </CFQUERY>

    You might be missing an AND keyword with all that if/else
    logic in your your sql
    I'm assuming that this:
    {fn YEAR(EventDate)}={fn YEAR(#ThisDate#)}
    is the way you call functions when using something other than
    cold fusion. Try changing it to
    YEAR(EventDate) = YEAR(#ThisDate#)

  • 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

  • He query expression 'new f__AnonymousType1 is not supported.

    he query expression 'new <>f__AnonymousType1`1(PercentComplete = s.PercentComplete)' is not supported.
    error message in project server 2013 using object model.
    vijay

    he query expression 'new <>f__AnonymousType1`1(PercentComplete = s.PercentComplete)' is not supported.
    error message in project server 2013 using object model.
    vijay

  • Expression too complex in query expression

    Page code creates a string of all ManufacturerPartNumbers
    that share a common ProductFamilyID based on a
    ManufacturerPartNumber form selection. This string is then included
    in the recordset query.
    The following error message only occurs when the
    ManufacturerPartNumber string has numerous listings. When the
    string contains only 3 listings of ManufacturerPartNumbers, this
    error message does not appear.
    [Microsoft][ODBC Microsoft Access Driver] Expression too
    complex in query expression 'LATITUDE &amp;lt;=
    40.8210861895984 AND latitude &amp;gt;= 40.3865898104016 AND
    longitude &amp;gt;= -74.2737786508004 AND longitude
    &amp;lt;= -73.7014913491996 AND
    (((((((((((((((((((((((((((((ManufacturerPartNumber = '3408H')) OR
    ((ManufacturerPartNumber = '4608H'))) OR ((Manufacture'.
    /customer_locator/testprocessform2.asp, line 233
    Is there a size limit to a recordset query that is causing
    this error or is there a possible syntax issue with my query
    code?

    That doesn't sound like an error that would normally occur on a lot of pages... Do you have AdBlock (Plus), or any Greasemonkey userscripts, or any similar add-ons that customize sites? I wonder whether one of those might have some faulty logic.

  • Mapping Access 2010 Query Expressions In Crystal Reports

    Hello,
    I am new to Crystal Reports.
    When I change the datasource of a Crystal report to an Access 2010 query that has an expression in it, it is not able to map that calculated field. The expression in question is a simple iif statement that yields a yes or no, given the condition that's met. It works fine in Access and is very basic.
    But I can't get it to map in Crystal - so I tested it by changing the expression in Access to defect:"x" - even simpler. It still shows up in Crystal as unmapped when I point to the query and hit the Crystal update button.
    Can Crystal map expressions in an Access 2010 query, or does it just handle straight table fields that occur in a table or query?
    Regards,
    Dan

    Hello Dan,
    When pointing your report from one data source, to another one, the reason it does not initially map the field, it is because they are seen as defined with different data type. One is defined with 255 characters, and the other one is seen as a Memo. In the "Map Fields" window, uncheck  the option "Match type", and you will then be able to map your expression field manually.
    Note that the MS Access provider, send the information to Crystal Reports regarding the data type, and the fact it is different, it is because the provider used send different information to Crystal Reports, and if a field is defined with more than 255 characters, it will be seen as a memo field.
    There is nothing that can be done in Crystal Reports to change the data type as it is provided by the database provider.
    By design, it does not list a memo field as a database field you can group by, because large string generally contains a description, comments, ... and this type of information is generally always different, so there is no reason to group by those field with that data type.
    Having said that, it is possible to group by a formula that contains the memo field to give the flexibility to bring back a portion of the characters that the memo field contains. To do so:
    1. Create a formula that uses the memo field like:
         {Database.MemoField}   
    2. Save and close the formula.
    3. Under the menu "Insert", select "Group"
    4. In the "Insert Group" window, select the formula created in the previous
    steps to group by.
    This information is available in the SAP Knowledge Base Article:
         1214731 - Unable to group on a memo field in Crystal Reports
    I hope the above information answered your questions.
    Patrick

  • Two Questions about Airport Express

    All, I am a recent convert to using a Mac so bear with me.
    I have two questions about the Airport Express.
    Question if I buy one in the USA, I will visiting this week on holiday,can I use it the UK with a UK adaptor/apple plug?
    Can the Express be used with my current wireless network, using a Netgear DG834G V4, I have read lots in the forums about putting a $ sign in front of the WPA password?
    Any help and advice gratefully received.

    Tesserax wrote:
    Hello andixbox. Welcome to the Apple Discussions!
    Question if I buy one in the USA, I will visiting this week on holiday,can I use it the UK with a UK adaptor/apple plug?
    Yes, but at least two things to consider:
    o The US version of the 802.11n AirPort Express Base Station (AXn) only supports radio channels 1-11 in the 802.11g radio mode. Channels 12-14, used in other countries outside the US will not be available.
    o The AXn supports both the 2.4 and 5 GHz radio bands for 802.11n. The 5 GHz band is restricted in certain countries (like the UK) so operating in this mode may get you unwanted attention.
    That should be okay then because the Netgear broadcasts on channels 1-11. I hadn't appreciated the 5 Ghz band, but having checked both US and UK Apple sites the techspecs both mention 2.4 Ghz and 5 Ghz.
    Can the Express be used with my current wireless network, using a Netgear DG834G V4, I have read lots in the forums about putting a $ sign in front of the WPA password?
    If your intent is to have the AXn join the Netgear as a wireless client, then yes it should work. The "$" requirement was for WEP. This shouldn't be necessary for WPA or WPA2.
    I intended to use the AXn as an range extender, but you mention wireless client, is that something different?

  • Crystal Report Question on query

    I am trying to design a report to where it lists a name of a unique person in a table and totals the amount of money they owe. Essentially it's a letter for parking tickets and it will total all the fine amounts for that individual person. I don't know how to design the report to produce this result and how to design the query to produce this result.

    Hi, I copied the question, so I would not miss anything.
    I am trying to design a report to where it lists a name of a unique person in a table and totals the amount of money they owe. Essentially it's a letter for parking tickets and it will total all the fine amounts for that individual person. I don't know how to design the report to produce this result and how to design the query to produce this result.
    First off, depending on your version of CR, some of the instructions may not be correct.  I have CRXI
    Create a group based on the persons information (I assume you would have a drivers license number, or something you could group off of.  You may also want to group off date/time or amount.
    In your details section drop in whatever fields you wish to return from the Database.
    When you run your report, you should see all the records, sorted by the persons Id and then the date.
    Now, this will be more data than you want, so you can use the select expert to limit what is returned.   For example if the ticket is paid, you do not need to send a letter.  The select statement will look something like this, if your field that indicates a ticket is paid is ticket_#              not ({Ticket_#} like "paid")    So if Paid shows up in that field, the record is suppressed.   Also, look at the example reports, they may help you get some id's

  • Date Format in PeopleSoft Query Expressions

    Hello,
    I have devloped a query where one of the field has date field. The format that's showing is 'MM/DD/YYYY'. We want the format in 'MM-DD-YYYY'. I tried to create a expression using to_char(A.fieldname,'MM-DD-YYYY'). But its not working. Is there any other way we can get the format in 'MM/DD/YYYY' from query manager.
    Thanks,
    -Sam

    Hi Sam,
    PS Query will automatically wrap date fields in the select list with TO_CHAR(...,'YYYY-MM-DD'), even in an expression. However, it only does this when the fieldname includes the alias, so in your expression you could use
    to_char(fieldname,'MM-DD-YYYY') (no A.) as long as it doesn't cause an ambiguous reference (i.e. there are no other tables in your query with "fieldname" as a column). Otherwise, you could write your expression to convert the TO_CHAR result back to a date and then use TO_CHAR again. i.e.
    TO_CHAR(TO_DATE(A.fieldname,'YYYY-MM-DD'),'MM-DD-YYYY')If you look at the resulting SQL, this will become
    TO_CHAR(TO_DATE(TO_CHAR(A.fieldname,'YYYY-MM-DD'),'YYYY-MM-DD'),'MM-DD-YYYY')which should give the desired result.
    Regards,
    Bob

  • Another question about query execution speed.

    I know I should normally start with posting the query but my question will take a little different direction, so here is the deal:
    We have an Apex application, there is a query on one of the pages that for certain users takes quite long, lets say 1min to 2 min, depending on how many records the query returns. The actual query varies depedning on some security settings and other parameters on the page - it's constructed by pl/sql function returning sql.
    By querying v$sql I get the exact sql run by the user for who the query takes long time to execute.
    Then I run that same sql statemt in Toad and it always takes 2 seconds to execute. For the user executing the same sql from Apex takes consistently 50-100 sec. My Toad is set to return up to 10,000 records and the query returns less than 500.
    Can somebody help me make some sense of this?
    George

    Hi there
    geo2 wrote:
    We have an Apex application, there is a query on one of the pages that for certain users takes quite long, lets say 1min to 2 min, depending on how many records the query returns. The actual query varies depedning on some security settings and other parameters on the page - it's constructed by pl/sql function returning sql.To render a page, Apex does much some more stuff than just run the query. For instance, depending on the type of pagination you have enabled it needs to get the total number of rows to display "x to y of z" (or to display the message "more than nnn rows found"). Have you enabled debugging in Apex to be sure that most of the waiting time is spent on that query?
    By querying v$sql I get the exact sql run by the user for who the query takes long time to execute.
    Then I run that same sql statemt in Toad and it always takes 2 seconds to execute. For the user executing the same sql from Apex takes consistently 50-100 sec. My Toad is set to return up to 10,000 records and the query returns less than 500.Does Toad takes only 2 seconds to retrieve all rows or just to get the first top rows?
    Luis

Maybe you are looking for

  • [SOLVED]Unable to boot in UEFI mode from CD

    Hello gents! Here's the problem: According to the beginner's guide I followed the instruction to test if I am in UEFI mode: In case you have a UEFI motherboard, the CD/USB will launch UEFI Shell and display a message that startup.nsh script will be l

  • Acrobat 9 PDF Portfolio - setting size of swf content area

    Hi, I added a swf file to a PDF Portfolio in Acrobat 9 Pro Extended and it works fine when the portfolio is opened in Reader 9, except that the swf content area is small. I want it to occupy the entire page. How/Where do I set this? Thanks Vijay

  • SOAP Receiver Adapter (Asynchronous Call)

    Hi All, Scenario is  Proxy to Webservice asynchronous call. Scenario configuration is done as follows. 1) Imported the WSDL and using as a asynchronous inbound interface. 2) SOAP receiver channel is configured with the target URL & soapAction as give

  • How to display a picture like instruction?

    I'm want to display a pciture like working instruction before or after the UUT serial number input dialog,how to make the step ?

  • Terminology: SOA Suite

    Gurus, I have very stupid and base level questions.. But it's been itching my mind for quite sometime now. Kindly help me get rid of the confusion: 1) When I say SOA Suite means it's a group of technologies: 1) BPEL (BPEL PM, JDev, BPEL Console ) 2)