Not Like statement in Crystal?

In SQL server there is a statement that goes along the lines of (field1) not like '09%'
In Crystal Reports there is a statement "Like".  Is there any statement in Crystal that is "Not Like"?
I'm trying to get a wildcard of 09 to work in Crystal so far I have......
(field1) <> "09*"
But it needs to be something like the following ........
(field1) not like "09*"
Does Crystal have a Not Like statement?  What are my choices if Crystal does not have that statement?
Thanks

I'm looking for anything that does not contain any thing like "09".  The actual "09" field is "09xx", and the report will need to pull back everything that is not "09"
I used the * symbol to try and do a wildcard that would not pull back anything that is like "09".
I was wondering if the * symbol was Crystal Reports answer to "Not Like"?

Similar Messages

  • LIKE IN or NOT LIKE IN

    SELECT table_name FROM all_tab_columns
    Where column_name NOT LIKE 'tmp%' AND
    column_name NOT LIKE '%old%' AND
    column_name NOT LIKE 'sys%' AND
    column_name NOT LIKE 'test%'
    And wish to consolidate the NOT LIKE statements into something like:
    column_name NOT LIKE IN ('tmp%', '%old%', 'sys%', 'test%')
    I guess it can't be done that way, but is there some other construct which can make the above query simpler (lesser number of words)?

    Or
    select * from emp, table(sys.dbms_debug_vc2coll('S%','M%')) where ename like column_value

  • Not Like in Select Statement

    Hi All,
    My requirement is not to select the entries for the T024 table where the eknam is either starts with 'NOT VALID' or blank.
    For that, I have written the select statement using NOT LIKE,
    Will this negation in the select statement cause extra execution tiem?
    If so, can you give some hint for alternative statement.
    SELECT EKGRP EKNAM FROM T024 INTO TABLE IT_T024
    IT_PURC WHERE EKGRP = S_EKGRP AND EKNAM NOT LIKE 'NOT VALID%' AND EKNAM NOT LIKE ' '.
    Thanks,
    Kal Chand

    Hello,
    For the first condition: not starting with 'NOT VALID' , I don't know other way apart from yours: EKNAM NOT LIKE 'NOT VALID%'.
    For the second one, not starting with blank: EKNAM NOT LIKE ' '. Does it work? I think it compares if EKNAM is different from blank which can be done using:  EKNAM NE ' '.
    I hope it will help you.

  • What is the syntax for a CASE statement in Crystal XI

    I'm having difficulty locating documentation for the use of CASE statements in Crystal syntax. My database administrator does not allow me to write SQL expressions so I need to covert the SQL below to Crystal Syntax. Can anyone help me? Thank you very much!!
    Select
       CASE
             WHEN projects.ProjType like 'S%' then 'Shopping Center'
             WHEN projects.ProjType like 'I%' then 'Industrial'
             WHEN projects.ProjType like 'O%' then 'Office Building'
             ELSE 'Other'
       END
    from projects

    Let's assume column XYZ has both numbers (1), and letters (any alphabet).
    I have a case statement on SQL to turn any value that's not 1 into 0, then I am getting a sum of that column.
    I am also grouping by Row A, B etc to get aggregated sum of column XYZ for those group.
    Now on Crystal Reports function, I need to sum up values under column XYZ for all the groups.
    If I try using sum function like below, I get an error stating:
    "A number field or currency amount field is required here"
    (sum({Command.XYZ}))
    So I thought if I can use a case statement to change the non-numbers to 0 prior to sum that will probably resolve it. But I could not get the below case statement to work either (Error: A string is required). 
    SELECT {Command.XYZ}
       Case 1:
          1 
       Default:
          0;

  • How do i get my old itunes back? I upgraded new version and do not like it

    Please can someone help me.... I did a software update and it changed my itunes and i do not like it, can i get my old version back?
    Or can i access free music again? As i could listen to the radio before???? I cannot find it in the new version.

    It's been awhile since I've done something like this, but if I memory serves me, I believe you use the System Restore function to return your computer to the state it was in prior to installing iTunes 11.
    That should take it back to the last version of iTunes you'd installed. Of course, any other changes you've made to your system since then (e.g. other programs installed, etc.) will also be changed back.
    Not to sound like a jerk for referring you to Google like so many people online tend to do--but--I think there are instructions for the process of reverting to a previous version available online. I've done it in the past with IE 8 vs IE 9.

  • SQL LIKE statement in JSP

    I tried to write a query in jsp page using LIKE statement. However, Apache Tomcat report back an error in the query string. I tried to run the same query style in MS Access and it works. Can someone please tell me where is the error in jsp code:
    JSP Code:
    sql = "SELECT tblStudent.firstName, tblStudent.lastName, tblStudent.studentID FROM tblStudent WHERE (((tblStudent.firstName) LIKE '%" + g_firstNameInput + "%')) ORDER BY tblStudent.firstName";
    MS Acccess:
    SELECT tblStudent.firstName, tblStudent.lastName, *
    FROM tblStudent
    WHERE (((tblStudent.firstName) Like '*e*'))
    ORDER BY tblStudent.firstName;
    PS: I tried changing from '%' to '*' already, but still does not work
    Thanks

    Don't use JSP for SQL querries... to complicated.
    1) Write a Java application that does what you want (as far as interacting with the database
    2) Isolate the database access code into its own class/classes
    3) Double check that you can then use those isolated classes inside a command line application
    4) Adapt the code you used in 3) to use those same classes from a JSP - preferrably using Java Beans and DTOs

  • Not Like in SQL not working

    Trying to use not like in the following sql:
    select *
    from respondents
    where sample_id = 00000001
    and email not like '%cccp.org%';
    Right now, I'm getting back 51 rows, but 1/2 of the rows have the wrong domain in the email fields, and I need to filter all of the wrong ones, except cccp.org.
    There was a thread,
    NOT LIKE
    And I tried that, but not getting the correct results.
    thanks

    Given a simple table like:
    SQL> SELECT * FROM t;
    EMAIL
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    [email protected] WHERE email NOT LIKE '%cccp.org%' will return:
    SQL> SELECT email FROM t
      2  WHERE email NOT LIKE '%cccp.org%';
    EMAIL
    [email protected]
    [email protected]
    [email protected] is exactly what you asked for. However, this statement "1/2 of them have the wrong email domain, like .edu and .com email domains" seems to contradict the predicate. Do you really want something more like:
    SQL> SELECT email FROM t
      2  WHERE email LIKE '%cccp.org%';
    EMAIL
    [email protected]
    [email protected]
    [email protected]
    John

  • Passing parameter into SQL statement in Crystal Reports

    Hi all,
    I would like to call Crystal Reports in JSP. I can handle it well now. But I hope to let user input their selection criteria before printing out the report. I know how to get the parameter value in JSP, but I really dunno how to pass these parameter values into the SQL statement in Crystal Report. Actually, is it possible to do so?
    If anyone has idea, please tell me. Thx Thx!
    Regards,
    Betty

    Dear Sir,
    I want to use Crystal Report as a web base using JSP. But, I am getting how to call .rpt file in .jsp file & passing of parameter.
    If you have any idea, please reply as early as possible
    Thanking U.
    My userid = [email protected]
    Regds
    Pankaj..

  • LIKE statement in CASE statement

    Hi,
    I have a table called amounttagged as below
    Amount Tag
    10000 ABDCBD
    20000 CBDADE
    30000 CBDABD
    40000 ABDADE
    and my sql statement is as below,
    select Amount, case when tag like '%ABD%' then 'ABD' else when tag like '%CBD%' then 'CBD' else 'ADE' end as tag
    from amounttagged
    The problem is when the tag is ABDCBD it will only be displayed for 'tag like '%ABD%' statement and the tag is only ABD. How can I make it to appear for both tag ABD and CBD?
    Pls see example of result of sql
    Amount Tag
    10000 ABD
    20000 CBD
    30000 CBD
    40000 ADE
    How can I make the amount 10000 appear for tag CBD as well? Pls advise.

    I just tested mine, and I missed off a couple of commas...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 10000 as amount, 'ABDCBD' as tag from dual union all
      2             select 20000, 'CBDADE' from dual union all
      3             select 30000, 'CBDABD' from dual union all
      4             select 40000, 'ABDADE' from dual)
      5  --
      6  -- end of test data
      7  --
      8  select Amount, decode(rn,1,abd,2,cbd,ade) as tag
      9  from (
    10        select Amount,
    11               case when tag like '%ABD%' then 'ABD' else null end as abd,
    12               case when tag like '%CBD%' then 'CBD' else null end as cbd,
    13               case when tag not like '%ABD%' and tag not like '%CBD%' then 'ADE' else null end as ade
    14        from t /* amounttagged */
    15       )
    16      ,(select rownum rn from dual connect by rownum <= 3)
    17  where decode(rn,1,abd,2,cbd,ade) is not null
    18* order by amount, tag
    SQL> /
        AMOUNT TAG
         10000 ABD
         10000 CBD
         20000 CBD
         30000 ABD
         30000 CBD
         40000 ABD
    6 rows selected.
    SQL>

  • SAP 8.8 - statement in crystal report

    Hi,
    We have imported layout and reports available in SAP 8.8 Information Center, however, Customer statement (in Crystal version) does not seem to be part of it.
    Will statement in Crystal report version be released in any near future?

    Hi Paulo,
    I am aware that the Crystal report layout available for download.  Unfortunately Customer statement is not one of them.
    Yes, it is good that Crystal report is provided as a report writing tools.  However, we need to look beyond that.
    Customer Statement is expected as standard report in all accounting packages and is a document that needs to be sent to third party, ie the customers.
    Therefore, the presentatipon of it is important and also the information required is often more than what the existing one has.
    The problem is, the data on the existing customer statement are populated by the program and what we can see is just field type "text".
    The following screnarios are not taken care of.
    Example:
    1. It is normal that there are part payment invoice.
    The normal request is showing original invoices amount, applied details (ie the receipts/credit notes applied against it) and also the outstanding balance.
    2. Posting Date and Document Date are not the same.
    SAP B1 allows posting date and document date to be different, but the Document Date fields is not avaialble in PLD.
    3. No transactions available for the period.
    Customer has no transaction in 1 March 2009 - 30 Apr 2009, however, there are opening balance prior to March 2009.
    It is normal expectation that when you run the customer statement for 1 March 2009 to 30 March 2009, it will still produce a statement, with the prior balance row populated.
    However, it just does not print the statement at all.
    So, Customer has not choice but to keep posting date from blank. 
    These are just some of the problems. 
    I would hope SAP could look into this standard report, to add to the list, Stock Aging and Bank Reconciliation report should also be looked into.
    Regards,

  • Named query problem with "like" statement

    I'm having issues with a named query that contains a 'like' statement in it. I have other named queries that have like statements that have hardcoded like values in them that work fine.
    (i.e. select * from foo where foo.col1 like 'foo%' )
    But when the like value to be tested is a parameter, it doesn't seem to work at all, no matter what variation i've tried, other than no wildcards.
    (i.e.
    this DOES work
    select * from foo where foo.col1 like #fooParm
    this DOES NOT work
    select * from foo where foo.col1 like '%#fooParm%'
    Any suggestions on how to get this to work?
    Thanks in advance

    Try building your select statement in a different way.
    Instead of:
    select * from foo where foo.col1 like '%#fooParm%'
    Try something like:
    select * from foo where foo.col1 like '#fooParm'
    And include the wild cards in the parameter.
    i.e. if fooParam was 'abc', make fooParm = '%abc%'

  • Multiple like statements in a query

    Hi,
    I wonder if it's possible to have multiple like statements in a query.
    suppose instead of
    select * from someTable where remarks like '%ab%'
    I want to search for many string patterns such as '%edi%' '%odi%' '%di%' '%gf%' '%od%' '%podi%' etc. in one query.
    BTW, the table contains many millions of records.
    Regards
    Crusoe
    Edited by: Crusoe on 19-Jan-2009 00:25

    Crusoe wrote:
    This regexp_like function does not work with the development server to which I have rights to create tables etc. I guess it only works in 10g or greater. However i tried a quick test in the production server and it worked. It returned rows where the values between the | characters were found anywhere in the field ( I must learn this regex syntax sometime). Yes, regular expressions are 10g upwards. (You really should have your development server reflect your production server)
    There was a thread a while back giving an introduction to regular expressions...
    Introduction to regular expressions ...

  • How to make a bind variable out of a comparison like statement

    I have a statement similar to the following -
    select x from atable where acolumn like '1%';
    How do I turn that into a variable in an anonymous block like -
    declare
    l_var varchar2(1) := '1';
    begin
    select x from atable where acolumn like 'l_var%'
    end;
    I need to prevent the database from using a literal in the plan so I need to convert like '%1' into a variable.
    Any suggestions?

    Not quite sure what you mean by 'binding' or 'substitution'.
    If you mean bind variables, the yes oracle does automatically use bind variables:
    SQL> CREATE TABLE atable
      2  (
      3          x VARCHAR2(10)
      4  )
      5  /
    Table created.
    SQL>
    SQL> INSERT INTO atable VALUES ('1234');
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL>
    SQL> set serveroutput on size unlimited
    SQL>
    SQL> declare
      2    l_var atable.x%TYPE := '1';
      3    l_str atable.x%TYPE;
      4  begin
      5    select x
      6      into l_str
      7      from atable
      8     where x like l_var || '%';
      9
    10    dbms_output.put_line ('l_str = "' || l_str || '"');
    11  end;
    12  /
    l_str = "1234"
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT SQL_TEXT FROM v$sql WHERE sql_text LIKE 'SELECT %ATABLE%' AND sql_text NOT LIKE '%V$SQL%';
    SQL_TEXT
    SELECT X FROM ATABLE WHERE X LIKE :B1 || '%'
    SQL>Where that is the sql statement that the sql engine actually ran on behalf of the pl/sql routine.
    GP>

  • Oracle Error - statement handle not executed state

    Hello,
    A BCA scheduled job has failed and returned with the following error. Does anyone have an idea to fix this error.
    Connection or SQL sentence error: (DA0005): [Exception: DBD, ORA-24338: statement handle not executed State: N/A] The following data providers have not been successfully refreshed
    Thanks
    -Gopi

    Please provide more information on what Crystal Reports or Business Objects product you are using. The more details you can provide, the quicker the resolution...
    Ludek

  • HT4623 I updated my i phone and i pad to ios7, but do not like many of the features, especially the calendar.  How can I go back to ios6?

    I have both an iphone and an ipad.  I foolishly updated both to ios7, but do not like many of the new features, particularly the calendar.
    How can i go back to ios6 ??

    You cannot go back to a previous iOS version.
    State your dislikes to Apple regarding iOS 7 here:
    http://www.apple.com/feedback/
    That's just about all anyone can do...Apple only "listens" through the feedback process.

Maybe you are looking for