Structure or syntax for query/filter

I need to find a 12-digit number in a column called "SequenceNumTxt", in a VERY long table.
I can query the first n lines but need to add something like "WHERE [SequenceNumTxt]="123412341234"
The above does not work, gives me a syntax error; what am I doing wrong?

Good day
Joseph_L_W,
Firstly I have to agree with all previous responses. Your question is not clear and you did not gave us any information (I use to say that you gave us stories instead of information). In order to understand the issue and to reproduce it we need you to always
post DDL+DML.
DDL = Data Definition Language. In our case that is, CREATE TABLE statements for the relevant tables
* How to get DDL: Right click on the table in Object Explorer and select script table as CREATE. Post these create table scripts here.
DML = data manipulation language is a family of queries used for manipulating the data itself like: inserting, deleting and updating data.
In our case we need some sample data in order to check the query and get result, so we need some insert query for sample data.
If you post a "create query" for the tables and "insert query" with some sample, then we could help you without Assuming/Guessing.
  Ronen Ariely
 [Personal Site]    [Blog]    [Facebook]

Similar Messages

  • Syntax for query help

    I'm in need of coming up with the correct syntax for a query that would work in Oracle.
    I would like to convert or change the syntax of my SQL statement used in SQL Server to produce the same result in Oracle.
    Select receiptDate, receiptNumber, receiptAmount
    From receipt, customer
    where customer.customerid = receipt.customerid
    and customerName = 'Joe Smith'
    and receiptDate between '01/01/2011' and '03/31/2011'
    ORDER BY receiptDate;
    Sorry if this is posted in the wrong forum.
    Thank you for any information, even if it is just a link to show where I can get more syntax structure.

    Hi,
    Welcome to the forum!
    891100 wrote:
    I'm in need of coming up with the correct syntax for a query that would work in Oracle.
    I would like to convert or change the syntax of my SQL statement used in SQL Server to produce the same result in Oracle.
    Select receiptDate, receiptNumber, receiptAmount
    From receipt, customer
    where customer.customerid = receipt.customerid
    and customerName = 'Joe Smith'
    and receiptDate between '01/01/2011' and '03/31/2011'
    ORDER BY receiptDate;Is receiptDate a DATE? If so, change the last part of the WHERE clause from
    and receiptDate between '01/01/2011' and '03/31/2011'to
    AND     receiptDate >= TO_DATE ( '01/01/2011'     -- First day to include
                                 , 'DD/MM/YYYY'
    AND      receiptDate <  TO_DATE ( '04/01/2011'     -- First day NOT to include
                                 , 'DD/MM/YYYY'
                          ) Or you can use DATE literals, like this:
    AND     receiptDate >= DATE '2011-01-01'
    AND      receiptDate <  DATE '2011-04-01'With DATE literals, you don't have any choice of format: the dates have be to given as 'YYYY-MM-DD'.
    DATEs in Oracle always include hours, minutes and seconds. If you don't specify the hours, minutes or seconds, they default to 00.
    If you said:
    AND     receiptDate BETWEEN TO_DATE ( '01/01/2011'
                                          , 'DD/MM/YYYY'
                  AND     TO_DATE ( '03/31/2011'
                                          , 'DD/MM/YYYY'
                                   ) that would not include most of the last day, March 31: it would include only the first second of that day (that is, 00:00:00). To include all of March 31, up to and including 23:59:59, you could say:
    AND     receiptDate BETWEEN TO_DATE ( '01/01/2011'
                                          , 'DD/MM/YYYY'
                  AND     TO_DATE ( '03/31/2011 23:59:59'
                                          , 'DD/MM/YYYY HH24:MI:SS'
    Sorry if this is posted in the wrong forum. No, this is the right place for this kind of question.
    Thank you for any information, even if it is just a link to show where I can get more syntax structure.

  • Use Yesterday as variable for Query Filter

    Post Author: rrburton
    CA Forum: WebIntelligence Reporting
    I want to have a query filter that refers to the previous day.  In regular SQL I would use something like "= trunc(sysdate)-1".  I don't see any option for doing it this way in web intelligence, the closest it comes is selecting object and then assigning the Beginning of Last Week item from the System Date table.  What am I missing?

    Post Author: rrburton
    CA Forum: WebIntelligence Reporting
    Nevermind - I figured it out just now.  It isn't very intuitive.  In the Objects and Variables dialog in the SystemDate table there are a bunch of items like 1 day, 2 days, etc. and you select one of those and then in the code it looks like:
    WHERE   PKG_NTD_CONV.TO_ORCL_DATE(TROUBLE_TICKET_ARCHIVE.CREATE_DATE)  =  ( sysdate )-1
    It should say something like 1 day ago, 2 days ago, etc.

  • Syntax for querying between dates with ADO

    Hello,
    I am connecting to Oracle tables using ADO in Microsoft Access. I am not familiar with Oracle Sql. I am trying to execute the following query string but am not retrieving and records:
    strSql = "SELECT COUNT(*) " _
    & "FROM CCC2.CASE_EPRP WHERE CALL_DATE >= '1/1/2002' " _
    & "AND CALL_DATE <= '2/1/2002'"
    I can retrieve a record count if I only have the first date, but if I use the date range above the query returns zero records even though there are records for that date range. Could someone explain the correct way to write this query?
    Thanks,
    Rich

    You really don't want to rely on implicit string to date conversion ever. Oracle will use your NLS date settings to do the conversion, but different users (and different databases) may have this set differently, so one user might have '2/1/2002' convert to February 1, 2002 while another user might have it convert to January 2, 2002. A third user might not be able to convert the string at all.
    The proper way to do this is to use either Oracle syntax
    "where call_date >= to_date( '1/1/2002', 'MM/DD/YYYY' )
    and call_date <= to_date( '2/1/2002', 'MM/DD/YYYY' )"
    or to use the ODBC date escape sequence, {d }, to create the dates.
    If this isn't the problem, there may be issues because Oracle dates have a time component. If you don't specify a time, Oracle will default to midnight, so any call_date records after 12:00am on 2/1/2002 won't be found.
    Justin

  • SQL syntax for querying Active Directory group membership

    Post Author: cantrejj
    CA Forum: Data Connectivity and SQL
    I've established a connection to Active Directory through Crystal Reports XI. Now I need to write an SQL select statement to return all computer accounts and their group memberships. My statement returns all the computer accounts in the target OU, but when I add the memberOf field to my report everything goes blank. What am I doing wrong? I've included below my query statement and would welcome any suggestions...******************************************Select CN, memberOfFrom 'LDAP://OU=Managed Accounts, OU=Central Valley Service Area, DC= root, DC=sutterhealth, DC=org'where ObjectClass='computer'********************************************

    No ERRORs, no PANICs:
    # grep -i error /var/log/samba/log.smbd
    # grep -i panic /var/log/samba/log.smbd
    # grep -i error /var/log/samba/log.smbd.old
    # grep -i panic /var/log/samba/log.smbd.old
    #

  • Uni on Bex-Query: filter on Structure - Without Keyfigures as column: error

    Hi All,
    I have a 'Without Key Figure structure' as a column called Version in which (amoung others) the values 'Actual' and 'Last Year' .
    Thus
    Version
    - Actual
    - Last Year
    Now i want to create a filter in my universe which pre-selects Actual.
    When I use the tool for that this is my standard definition of the filter:
    <FILTER KEY="@Select(Version\Version)">
      <CONDITION OPERATORCONDITION="Equal">
        <CONSTANT VALUE="Actual"/>
      </CONDITION>
    </FILTER>
    However it results in error: 'A database error occured. The database error text is: (CS) "Error on BindCol". (WIS 10901)'
    Meaning(i guess) that somehow i'm not getting the correct selection-command to the database,
    When i use the version-dimension itself in the reports as part of the query filter it works fine and LOV displays both versions for selection.
    We are using XI3.1 fp3.1; BW 701-sp5 on oracle 11
    I've look through the forum, but couldnt find an answer.
    If there is point me into that direction and i'll close this one
    Any other information on how filters etc should be specified in an Universe on a BW query is also greatly appreciated.
    I already have found some info but any information is welcome.
    Your help is greatly appreciated.

    I found my answer.
    Create a caption dimension for your keyfigures and filter on thath
    Dimension:
    [xxkeycharacteristicxx].[caption]
    Filter:
    <FILTER KEY="@Select(Key Figures\Key Figures Caption For predefined filters)"><CONDITION OPERATORCONDITION="Equal"><CONSTANT CAPTION="VERSIONS like Actual"></CONSTANT></CONDITION></FILTER>

  • What is the SYNTAX for the user and group filters??? Is the HTML Ampersand token Amper A m p semicolon required in the filter

    There seems to be quite a bit of confusion over the actual syntax for the user and group filters on the Forms Based Authentication  Ldap Role and membership providers.. MSFT isn't really clear and there is a universal confusion in the blogsphere.
    I the filters should the prefix be the ACTUAL Ampersand or the HTML token for an AMPERSAND.. I realize the in many cases the blogger might have inadvertently specified the html token when the bare naked ampersand was intended..   The question
    therefore is : can a filter be taken directly from and ADSIEdit query and used as a filter or must the filter be made HTML safe by swapping out the AMERSAND with the HTML Token for AMERSAND before putting it into the configuration
    for the LDAPRole/membership provider...
    All science is either physics or stamp collecting

    Hi GUYO,
    I am not quite sure how we implement this on sharepoint side, as I did research and sharepoint may not have this feature to do this.
    most of the LDAP for sharepoint may need to follow these steps in this article:
    http://technet.microsoft.com/en-us/library/ee806890(v=office.15).aspx
    http://blogs.msdn.com/b/sridhara/archive/2010/01/07/setting-up-fba-claims-in-sharepoint-2010-with-active-directory-membership-provider.aspxhttp://blogs.msdn.com/b/kaevans/archive/2013/01/31/configuring-ldap-for-fba-in-sharepoint-2010-or-sharepoint-2013-with-powershell.aspx
    here is an example :
    http://blogs.msdn.com/b/sharepoint__cloud/archive/2011/12/20/achieving-fba-with-adlds-amp-sharepoint-2010.aspx
    if should this questions was at the ADSIEdit part, perhaps you can help us by opening a new thread at the AD foum
    https://social.technet.microsoft.com/Forums/en-US/home?category=windowsserver
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • SQL Syntax for hour/date range in Query

    Hi
    I am trying to set up an query for sales order documents procesed in the last 30 minutes to be set as an alert to be run every 30 minutes to the sales manager.  I am having difficulty getting the syntax for the last 30 minutes
    Any suggestions?
    David

    hi,
    I'm not sure query is correct,but u can modify it futher to get correct one.
    SELECT T0.DocNum, T0.DocDate, T0.CardName, T0.DocTotal FROM ORDR T0 WHERE DateDiff(dd, T0.DocDate ,getdate()) = 0 and
    DateDiff(Minute,T0.DocTime,' ') <= 30
    Jeyakanthan

  • A filter value for Query is set with some value automatically

    Hello SAP sourcing Guru!
    I created a query which has several filters.
    Some of Filter's type is VLV.
    When I preview the query somehow the filter values are already set with some value even though I did not set the default value.
    For example, filter name is Region and there are four regions: Asia, NA, Europe, and SA.
    I want to select one of them from drop-down menu. But Asia was already selected when I clicked the preview button for the query. I want to see "Please Select" instead of Asia from drop-down menu. I did not select "Prefill value from cache" for the filter. I made the filter Optional only. I did not set Default Value either for the filter.
    Any clues?
    Thank you for your response in advance.

    Hi,
    In the Default value field of the filter prompts, you need to mention the Class Reference ID of the corresponding field. E.g., if you have Contract document phase as a filter, then in that if you want to display a blank or none value, then you should use null:2016.
    Similarly for vlv type, the system has a value 616. Hence if you want to display a None value insteead of Asia, use the following in the Default value field:
    0:616:null.
    The way to find the class reference ID is to goto the RG > Class Reference > Look for the field that you are attempting to default on.
    Hope this helps,
    Vikram

  • Syntax for taking export with 'Query' parameter

    Hi all
    Please help me regarding syntax for taking export with query parameter

    Hi
    exp file=d:\exp.dmp log=d:\exp.log tables=scott.emp query='where empno=10'
    exp file=d:\exp.dmp log=d:\exp.log tables=scott.emp query='where ename='''SCOTT''Salman

  • Query Syntax for Dynamic Navigation Menu

    I'm trying to build a Navigation menu from a query using the following syntax:
    select LEVEL,
           LABEL,
           LINK,
           'NO' as IS_CURRENT,
           null as IMAGE
      from V$RC_MENUS
    where CLUB = :APP_CLUB
    start with PID is null
    connect by prior ID = PID
    order by SEQUENCE, LABEL
    The query itself works fine for all values of APP_CLUB but it only generates the menu entries for some values of APP_CLUB, but not others. The SEQUENCE value determines the order of the entries within each level. Is this the correct syntax for a query-based navigation menu? How does it determine which sub-levels belong to a parent?  Does the ordering of the resultset have any impact on how the menu is generated?

    Jritschel-Oracle wrote:
    I'm trying to build a Navigation menu from a query using the following syntax:
    select LEVEL, 
          LABEL, 
          LINK, 
          'NO' as IS_CURRENT, 
          null as IMAGE 
      from V$RC_MENUS 
    where CLUB = :APP_CLUB 
    start with PID is null 
    connect by prior ID = PID 
    order by SEQUENCE, LABEL 
    The query itself works fine for all values of APP_CLUB but it only generates the menu entries for some values of APP_CLUB, but not others. The SEQUENCE value determines the order of the entries within each level. Is this the correct syntax for a query-based navigation menu? How does it determine which sub-levels belong to a parent?  Does the ordering of the resultset have any impact on how the menu is generated?
    As stated in the documentation:
    ...do not specify either ORDER BY or GROUP BY, because they will destroy the hierarchical order of the CONNECT BY results. If you want to order rows of siblings of the same parent, then use the ORDER SIBLINGS BY clause.
    Try:
    select LEVEL,
          LABEL,
          LINK,
          'NO' as IS_CURRENT,
          null as IMAGE
      from V$RC_MENUS
    where CLUB = :APP_CLUB
    start with PID is null
    connect by prior ID = PID
    order siblings by SEQUENCE, LABEL

  • "where used" list for query structures

    Hello Community,
    A structure is a re-useable BEx query object. I'm using the older version of BW 3.5, and we need to be able to identify the following :
    which structures have been used by a given query (using the query's technical name) ?
    which queries already make use of a given structure (using the structure's technical name) ?
    Any useful instructions would be so helpful.
    Thanks!
    Keith Helfrich

    Hi,
    You can get the where used list of the structures bu checking in query designer itself for where used list.
    Other option is : for both parts of your question you can get the infrmation from table RSZELTDIR.
    Here you will get the ELTUID . To find the relation between ELTUID and query technical name (COMPUID), check the my wiki below for exploring the relations below:
    http://wiki.sdn.sap.com/wiki/display/BI/ExploretherelationbetweenBEx+Tables
    -Vikram

  • Query filter on  a value with dash confuses for a range

    Hello, I've a web query, have a variable on a legacy PO which is char 10, the legacy PO values have legitimate - in their value for ex: 65011-001
    when i enter this value in the query filter (variable value), the query comes with msg ' this characteristic info object doest not support interval selections', and ignores the filter and bring the all the values.
    I tried putting PO enclosed with single and double quotes  but that didnt seem to work either, how can we make the variable take the literal value and do not interpret it as a range or interval.
    thanks for the help.
    Mayil

    Alright figure it out..
    looks like i've to give a escape in this case '\'
    so if i entered the value like 64917\-001 it is able to filter out in the web.
    i wonder if there is a way i cannot do this and get by..
    thanks
    Mayil

  • Retrieving Query Filter conditions for a WebI Report

    I'm developing a Java program using the Business Objects SDK to gather all relevent data from a WebI report and export it to a XML document.  I'm having an issue retrieving the Filters correctly.
    Right now I have a method that retrieves a query from a query container. Then I retrieve a condition container from the query.  After that I use a loop to get the filtercondition nodes in the conditioncontainer and I get their name and ID's.  My goal is to get all the information the object, the dimension, condition, and values seperatly instead of it all printing out together. For example my code prints out this as the filter name : "Period Of Time_Air Date Greater  Enter Start Date:" .  The name contains all the information from the filter but is there a way to get each peice of information for the filter seperately. 
    I'd appreciate any help.
    Edited by: ccmagrane on Feb 28, 2011 8:55 PM
    Edited by: ccmagrane on Mar 3, 2011 2:42 PM

    Please find below a snippet code that shows how to access those objects:
    Query q=oDataProvider.getQuery();
                ConditionContainer condCont=q.getCondition();
                ConditionObject condObj=null;
                FilterConditionNode fcn = null;
                FilterCondition fc = null;
                 FilterConditionValue fcv = null;
                FilterConditionContainer fcc=q.getCondition();
                if(fcc==null)
                        continue;
                int conditionCount=q.getCondition().getChildCount();
           for(int jj=0;jj<conditionCount;jj++)
                  fcn=fcc.getFilterConditionNode(jj);
                  System.out.println(getConditionLabel(fcn));
                  if(fcn==null)
                   continue;
                if(fcn instanceof AdvancedCondition)
                        AdvancedCondition ac=(AdvancedCondition)fcn ;
                        int nDim= ac.getResultObjectCount();
                else if(fcn instanceof ConditionObject)
                   condObj = (ConditionObject) fcn;
                    fc=(FilterCondition)(condObj).getOperand();
                      if(fc!=null)
                          System.out.println("==================================================");
                             System.out.println("Operand Count - " + fc.getOperandCount());
                             for (int k =0; k < fc.getOperandCount(); k ++)
                               fcv=fc.getOperand(k);
                                   System.out.println("Operand Value - " + fcv);
                              System.out.println("==================================================");
                                 System.out.println("==================================================");
                                System.out.println("Condition Name - " + fcn.getName());
                                System.out.println("Condition Data Source Object - " + condObj.getDataSourceObject().getName());
                                System.out.println("Condition Operand - " + condObj.getOperand().toString());
                                System.out.println("Condition Operator - " + fc.getOperator());
                                System.out.println("Condition Operand Count - " + fc.getOperandCount());
                                 System.out.println("==================================================");

  • InfoView - Query Filter for date variable of previous week

    I am trying to automate the process to generate a report for the previous week's data.  Right now I just prompt the user to enter in the start & end date/times, but I would like to somehow automate the date filtering using a Query Filter.
    In particular, the report will be generated every Thursday at 12:35 PM, and it needs to filter only the date field between the date's of the previous Thursday @ 1:31 PM, and the current Thursday @ 12:30 PM.
    I know there is a way to do this using an offset or something like that, but I'm a bit of a newbie to InfoView....so any help is greatly appreciated.  Sorry if the explanation is confusing.
    Thanks so much,
    Nick

    Hi,
    You can create two objects on universe level or first database level then add in the universe based the sysdate.
    Then go to  webi  query and  replace the prompt value by these objects and from next time when ever user refresh this report will run  without any prompt.Same thing in the scheduled report.
    Thanks,
    Amit

Maybe you are looking for

  • T530i multiple external displays without dock

    Hello all, I'm having an issue trying to set up a T530i with Intel HD Graphics 400 with multiple external displays.  I have searched the forum and not found anything similar, it looks like most people are using docking stations with their configurati

  • Having problems downloading View Generator

    Im trying to prepare AW and one of the thing listed as required is OLAP View Generator Sample at http://www.oracle.com/technology/products/bi/olap/viewGenerator_1_0_1.zip but Im getting a 404 error. Anyone can link me an alternative download source..

  • Traffic lights ( ICONs)

    Hi frnds, I am printing the Traffic lights ( Red, Yellow, Green) in the ALV report using the ICON symbol. The same output i am generating in the layout through smartforms. But I am not able to print the ICONs (Red, Yellow, Green) in the layout. I am

  • SAP DMS - Content Server and Unicode - What is effect on size?

    We know that unicode conversion will cause the database to grow in size. I understand that this will apply to the SAP tables with data and metadata etc. The question is whether the actual content (drawings, Word, Excel and PDF documents etc) that are

  • Translation transport problems

    Hi experts, we're facing a massive translation activity on an SRM system in order to have some texts belonging to custom data elements, custom classes, OTR & so on also in portuguese. The main difficulty relies on how to attach such translation into