Case sensitive string variable?

Hello,
I use the following code to determine whether I am opening a DAT file or a TDM file. Some of it is complicated by a bug in 2010 but that is not relevent for this particular problem. Up until today it has worked perfectly, probably because the TDM files I have been opening were written using code from the same autosequence. Today I was opening files saved by DIAdem using the standard save as toolbar button.
T2 = NameSplit(T1,"E") ' extract file extension
if T2 <> "TDM" then 'case sensitive??
CallDataLoadHdFile(T1) 'Temporary fix from NI until DataFileLoadSel problem is fixed
CallDataLoadSel(DATADRVUSER&T1, ChList_, 0) 'Temporary fix from NI until DataFileLoadSel problem is fixed
' Call DataFileLoadSel(DATADRVUSER&T1,T2,"[1]/["&ChList_&"]","") ' Load selected data channels from next file 'Commented out by SA 8/6/11, as it doesn't work in 2010
else
CallDataFileLoadSel(DATADRVUSER&T1,T2,"[1]/["&ChList_&"]","") ' Load selected data channels from next file
endif
The code failed because the file I was opening had the extension tdm, and thus the value of T2 was "tdm". I couldn't believe it but I wondered whether the if...then loop was case sensitive to the value of T2. It was... When I changed the second line of code as follows (i.e. lower case tdm) it worked.
if T2 <> "tdm" then'case sensitive??
It seems that when DIAdem saves files it applies a lower case extension but my code has applied uppercase letters. For reasons of backwards compatability I can't really change my code to save with lower cases.
I've tried using:
if T2 <> "TDM" or "tdm" then'case sensitive??
but that doesn't work.
So, my question is: how do I correct the 'or' statement so that it works, or is there a function I can use to make the if...then loop and/or T2 case insensitive?
Thanks.

Try InStr for comparing instead:
T2 = "TDM"
If InStr(1, T2, "tdm", vbTextCompare) <> 0 then
 MsgBox "Found TDM"
end if
(T2 contains capital TDM whereas Instr used lowercase tdm for comparison....)

Similar Messages

  • Still need help with case sensitive strings

    Hello guy! Sorry to trouble you with the same problem again,
    but i still need help!
    "I am trying to create a scrypt that will compare a String
    with an editable text that the user should type to match that
    String. I was able to do that, but the problem is that is not case
    sensitive, even with the adobe help telling me that strings are
    case sensitive. Do you guys know how to make that comparison match
    only if all the field has the right upper and lower case letters?
    on exitframe
    if field "t:texto1" = "Residencial Serra Verde"then
    go to next
    end if
    end
    |----> thats the one Im using!"
    There were 2 replys but both of them didnt work, and the
    second one even made the director crash, corrupting even previously
    files that had nothing to do with the initial problem..
    first solution given --
    If you put each item that you are comparing into a list, it
    magically
    makes it case sensitive. Just put list brackets around each
    item.
    on exitframe
    if [field "t:texto1"] = ["Residencial Serra Verde"] then
    go to next
    end if
    end
    Second solution given--
    The = operator is not case-sensitive when used on strings,
    but the < and > operators are case-sensitive.
    So another way to do this is to check if the string is
    neither greater than nor less than the target string:
    vExpected = "Residencial Serra Verde"
    vInput = field "t:texto 1"
    if vExpected < vInput then
    -- ignore
    else if vExpected > vInput then
    -- ignore
    else
    -- vExpected is a case-sensitive match for vInput
    go next
    end if
    So any new solutions??
    Thanks in advance!!
    joao rsm

    The first solution does in fact work and is probably the most
    efficient way
    of doing it. You can verify that it works by starting with a
    new director
    movie and adding a field named "t:texto1" into the cast with
    the text
    "Residencial Serra Verde" in the field. Next type the
    following command in
    the message window and press Enter
    put [field "t:texto1"] = ["Residencial Serra Verde"]
    You will see it return 1 which means True. Next, make the R
    in the field
    lower case and execute the command in the message window, it
    will return 0
    (true).
    Now that you know this works, you need to dig deeper in your
    code to find
    what the problem is. Any more info you can supply?

  • Case Sensitive String

    Hi,
    I need to read an argument but without case sensitivity, so far I have:
    if (args[2].equals("MEAN"))
    How can I make this line case insensitive?
    Thank you
    Mike

    Hi,
    I need to read an argument but without case
    sensitivity, so far I have:
    if (args[2].equalsIgnoreCase("MEAN"))
    How can I make this line case insensitive?
    Thank you
    Mike

  • Not case sensitive string comparison

    Is there any chance that the coparison function below returns true value?
    Attachments:
    Capture.PNG ‏2 KB

    Please vote for this idea...
    Case Insensitive Comparison Mode for String Equality Comparison
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Query Variable: F4 search by Text is case sensitive in Web Templates.

    Hello Guru's,
    I have a problem, when I am trying to search the variables in Web Templates the search by text is case sensitive.
    For example If I have the customer name as "King", I have to search the text as King or Ki*, But If I search as king I will not get any results.
    I need to have my text search as case insensitive.                                                                    
    When I checked in my BEx queries the search is case insensitive. I have the problem in my Web Templates only. Please let me know do I need to change any variable settings ing the web templates or let me know how do I fix this issue.
    Many Thanks,
    Vamshi Krishna

    Hi,
    So the only workaround for this would be to goto RSD1 -> enter info
    -object as xxxx, and press maintain, then goto master data/text
    tab and select the check box, 'with text', now save and activate the
    infoobject. After this regenerate the query using tcode rsrt.
    To regenerate goto rsrt enter query name and press 'generate report'
    button.
    Now the F4 help screen should show the options search by key and search
    by text. So that you can select serach by key to have a case insensitive
    search.
    Thanks,
    Venkat

  • Treeset.contains(String) is case sensitive ?

    hi
    i noticed that treeset.contains(String) is case sensitive.
    when you all are testing keywords do you therefore put everything to lower case to test ?
    just double checking something extremely simple

    Well strings are case sensitive. Try using String.equalsIgnoreCase(String) to compare strings without regards to case. As for using it in collections, you may want to convert all strings to upper or lower case before placing them into collections (this may not always be possible due to "business reasons").
    Note: contains(String) on the Collection interface uses Object.equals(Object o) to test object equality. The implentation of equals on String will return true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object. Case will not be ignored in this implementation.
    Hope this helps.

  • Case sensitive variabe

    Hi,
    I am using a variable and in my PL/SQl function/procedure .But the problem i face is the variable is being converted into UPPER CASE Automatically.i have to retain the case of my string.I can't use to_upper or to_lower or NLS_UPPER or NLS_LOWER.Because
    if my string is PRaMOd
    by Default it takes PRAMOD
    if i use NLS_LOWER its pramod.
    I want PRaMOd as it is.
    Is there any way to get that right.
    Thanks,
    Pramod

    Hi,
    Oracle strongly recommends that you not use quotation marks to make usernames and passwords case sensitive
    But if you like...you can use quoted identifiers:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL>
    SQL> CREATE OR REPLACE FUNCTION "FuNcTiOn_1" RETURN NUMBER AS
      2  BEGIN
      3     RETURN 1;
      4  END;
      5  /
    Function created
    SQL> SELECT * FROM USER_OBJECTS t where t.object_type = 'FUNCTION';
    OBJECT_NAME                                                                      SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE         CREATED     LAST_DDL_TIME TIMESTAMP           STATUS  TEMPORARY GENERATED SECONDARY
    ExAMple2                                                                                                             17867                FUNCTION            16/07/2009  16/07/2009 20 2009-07-16:20:34:00 INVALID N         N         N
    FuNcTiOn_1                                                                                                           17872                FUNCTION            16/07/2009  16/07/2009 20 2009-07-16:20:34:57 VALID   N         N         N
    F_TEST1                                                                                                              16266                FUNCTION            01/06/2009  01/06/2009 10 2009-06-01:10:33:32 VALID   N         N         N
    F_TEST2                                                                                                              16267                FUNCTION            01/06/2009  01/06/2009 10 2009-06-01:10:33:51 VALID   N         N         N
    FNC_TEST                                                                                                             17667                FUNCTION            11/07/2009  11/07/2009 09 2009-07-11:09:36:57 VALID   N         N         N
    FNC_RANDOM_MIXED_VALUE                                                                                               14116                FUNCTION            15/04/2009  15/04/2009 23 2009-04-15:23:59:32 VALID   N         N         N
    FNC_COMPARE_STRING                                                                                                   14221                FUNCTION            19/04/2009  19/04/2009 15 2009-04-19:15:31:05 VALID   N         N         N
    EVAL                                                                                                                 16620                FUNCTION            08/06/2009  08/06/2009 20 2009-06-08:20:18:13 VALID   N         N         N
    8 rows selected
    SQL> Regards,

  • How to retrieve column names in a query in a case sensitive way

    Given a query, I want to extract all the column names/aliases in the query in a case-sensitive way.
    When I use dbms_sql.describe_columns() or java.sql.ResultSetMetaData classes getColumnName() or getColumnLabel()
    it returns the columns name ONLY in Upper case.
    My application needs to extract the column names in the same case as it appears in the query string.
    Is there any API to get this without parsing the SQL query string?
    Thanks
    PS: The dbms_sql.describe_columns() returns the column name in upper case.
    declare
    IS
    l_column_recs DBMS_SQL.DESC_TAB;
    l_cur NUMBER;
    l_column_count NUMBER;
    BEGIN
    l_cur := dbms_sql.open_cursor;
    dbms_sql.parse(l_cur, 'select target_type from targets', dbms_sql.NATIVE);
    dbms_sql.describe_columns(l_cur, l_column_count, l_column_recs);
    FOR i IN l_column_recs.FIRST..l_column_recs.LAST
    LOOP
    dbms_output.put_line(l_column_recs(i).col_name);
    end loop;
    end;
    /

    As far as the result set is concerned, though, the column name is in all upper case. If you query the data dictionary, you would see that the TARGET_TYPE column in the TARGETS table is stored in upper case.
    The way Oracle works is that column names that are not enclosed in double-quotes are converted to upper case in the data dictionary and elsewhere and then Oracle looks for the column name in the table definition. That is what allows Oracle to have case-insensitive identifiers unless a user specifies case-sensitive identifiers by enclosing the identifier in double quotes.
    If you changed the query to be
    SELECT target_type as "target_type"
      FROM targetsOracle should report the alias in a case sensitive fashion because you've now indicated that the alias should be treated as case sensitive.
    Justin

  • Maximum number of characters for a BPEL string variable

    Hi,
    What is the maximum numbers of characters that a string variable in BPEL process can hold??.
    Is there any document which describes the datatypes in BPEL.
    Regards
    V Kumar

    Trick question - with or without the use of the FM GUI?
    1. Via the FM interface to define a variable, FM will only save the first 1022 characters of your variable definition - if you dare try to enter that many via the GUI dialogue slot.
    2. Importing a variable via MIF, adds virtually any length - I've tested out 2510 characters. HOWEVER, FM will only display the first 1023 characters of this string.
    If you save the file to MIF, you can still see the original length of the variable. The other caveat is that if you touch any of these long variables via the FM GUI (Edit Variables), then FM will truncate it down to 1022 characters - regardless of how you save (binary or MIF).
    FWIW - Klaus Daube lists (see: http://daube.ch/docu/fmaker25.html ):
    Until FM 7.2: up to 255 characters including meta-notations (such as <Default ¶ Font> or \t - this counts as 16 resp. 2 characters). See also note Variables below
    From FM 8.0: up to 2023 Windows Codepage characters or up to 2022 UTF-8 characters
    I'd say that this is not quite correct. You could enter more than 255 prior to FM 7.2 as well, but again the display issue via the GUI kicked in and truncated down to 255. The newer versions only display 1022/1023 but you can enter more than 2510 characters (which in this case is futile anyway).

  • How do I make search case sensitive

    I created a search region of type "query" using a simpleSearchPanel. The instructions say the search is case-sensitive when running the page but it appears it is not. Can anyone tell me how to make the search case sensitive?

    Please check if you have followed these guidelines
    Rule 2 : If your view attribute is of type String(VARCHAR2), and if the item has the Selective Search Criteria property set to false, then OA Framework generates a case-insensitive simple WHERE clause based on the CRITERIA_CONDITION and the CRITERIA_VALUE.
    Rule 3: If your view attribute is of type String(VARCHAR2), and the item has the Selective Search Criteria property set to true, then OA Framework generates a case-insensitive WHERE clause using a four-way join to ensure that the index is used.

  • Oracle 11G password case sensitive option is not working.

    Hello,
    I am facing problem in Oracle 11G. I installed and created a database. I disabled password case sensitive option by setting it to false (Pls see the below output). but case sensitive option is not disabled and i am not able to logon using the lower case password.
    SQL> connect sys/<pwd in lower case>@<connect string> as sysdba;
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SQL> connect sys/<pwd in uppper case>@<connect string> as sysdba;
    Connected.
    SQL> show parameter SEC_CASE_SENSITIVE_LOGON
    NAME TYPE VALUE
    sec_case_sensitive_logon boolean FALSE
    Any idea.... should i open the case in the metalink ?
    With Regards
    Hemant Joshi.

    Can you execute:
    SQL> select USERNAME, PASSWORD_VERSIONS from dba_users where username = 'SYS';Have you tried reseting the sys password? When you create the password file by default the passwords stored on it are case sensitive, maybe you also need to rebuild it...
    Enrique
    PS. See Note:429465.1 +11g R1 New Feature : Case Sensitive Passwords and Strong User Authentication+
    Edited by: Enrique Orbegozo on Oct 15, 2008 1:20 AM

  • Jdbc bug in executeUpdate(sql, int[]) when table name is case-sensitive;

    I have found a bug in oracle's jdbc (ojdbc6.jar), can someone tell me how to submit it so that it can be fixed?
    The BUG: using executeUpdate(insert_sql_stmt, int[]) to retrieve the generatedKey generated by before-insert trigger using a sequence results in error when the tablename is case-sensitive (but OK if table name in uppercase).
    Steps to reproduce:
    1a. create table "mixCase" (f1 integer, f2 varchar2(20));
    1b. create table upperCase (f1 integer, f2 varchar2(20));
    2a. create sequence mixCase_seq start with 1;
    2b. create sequence upperCase seq start with 1;
    3a. create or replace trigger mixCase_trigger before insert on "mixCase"
    bq. for each row \\ begin \\ select mixCase_seq.nextval into :new.f1 from dual; \\ end;
    3b. create or replace trigger upperCase_trigger before insert on upperCase
    bq. for each row \\ begin \\ select upperCase_seq.nextval into :new.f1 from dual; \\ end;
    4a. String url = "jdbc:oracle:thin:@//localhost:1521/orcl";
    bq. conn=DriverManager.getConnection(url,user,password); \\ Statement stmt = conn.createStatement (); \\ int rc=stmt.executeUpdate("insert into \"mixCase\"(f2) values('aa')",new int[]{1});
    4b. String url = "jdbc:oracle:thin:@//localhost:1521/orcl";
    bq. conn=DriverManager.getConnection(url,user,password); \\ Statement stmt = conn.createStatement (); \\ int rc=stmt.executeUpdate("insert into upperCase(f2) values('aa')",new int[]{1});
    When you run 4a or 4b in a java jdbc program:
    4b runs OK and rset=stmt.getGeneratedKeys() returns the correct f1 value of 1.
    4a results in error:
    bq. h6. java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist \\ + at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)+ \\ + at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)+ \\ + at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)+ \\ + at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)+ \\ + at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:406)+ \\ + ...+
    +Notes:&lt;/&lt;/em&gt;
    # If Statement.RETURN_GENERATEDKEYS is used instead of "new int[]{1}" in 4b, there is no error but the rset=stmt.getGeneratedKeys() returned in a ROWID such as 'AAARUyAAEAAAAGQAAL', not what is expected. Other database's jdbc return the correct generated integer value.
    # Same 4b error if new String[]{"f1"} is used as 2nd argument for executeUpdate.
    # The only difference in 4a and 4b is that 4a has case-sensitive table name. All sequence names, trigger names, column names are implicitly deemed to be uppercase by oracle in both cases.
    bq.
    Edited by: user10343198 on Oct 2, 2008 5:50 PM
    Edited by: user10343198 on Oct 2, 2008 6:34 PM

    Please patch one fo your machines to 10.2.0.3 and then try and duplicate. You do not have to go through the complete registration of the XSD process thoguh you can check and see if the c based parser will validate on the command line using the
    schema executible under your oracle_home bin directory.
    schema 1.xml 1.xsd
    for example
    if it dupes in 10.2.0.3 open a TAR with support so that we may bug it.
    regards
    Coby

  • How to make PowerPivot case sensitive?

    Hi all,
    I just discovered that PowerPivot is case-insensitive, which is quite a big problem for me. The only discussion of this I found so far is here: http://dennyglee.com/2010/06/18/powerpivot-you-are-so-insensitive-case-that-is/ .
    That didn't fully answer my question though, is it possible to change this behaviour and make it case sensitive?
    The reason it's a problem for me is that I have a column (from external data source) used as an ID in a relationship, which contains a string of random characters. If it so happens that two entries have an ID which only differs by a case of a letter, everything
    blows up. More precisely, I can no longer import the data into the table where the column is used as a PK, because it is not unique.
    Thanks for any comments,
    Jurgis

    You can post bugs on Connect.
    Thanks!
    Ed Price, SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Sort column by without case sensitive  using Comparator interface

    Hello,
    When i sorted my values of a column in a table it was showing all sorted upper case letters at top rows and all sorted lower case letters on bottom. So i would like to sort values without case sensitive order. Like. A, a, B, b, C, c....
    I am using Collection class to sort vector that contains the values of a column as an object and using Comparator interface to sort the values of a column in either ascending and descending order. It facilitates to compare two objects like.
    <class> Collections.sort(<Vector contains values of column to be sort>, <Comparator interface>);
    and in interface it compares two objects ((Comparable) object).compareTo(object);
    Now Let's suppose i have three values say Z, A, a to sort then this interface sorted in ascending order like A, Z, a
    but the accepted was A, a, Z. So how can i get this sequence. I would like to sort the values of a column without case sensitive manner.
    Thanks
    Ashish Pancholi
    Edited by: A.Pancholi on Dec 29, 2008 1:36 PM

    [http://java.sun.com/javase/6/docs/api/java/lang/String.html#CASE_INSENSITIVE_ORDER]

  • Case sensitive within character literals in SQL Server and Oracle

    I am migrating SQL Server database to Oracle database by using Oracle Workbench.
    SQL Server is not case sensitive, but Oracle PL/SQL is case sensitive within character literals. for example, if sort the following string ('UN','Win', 'iS' ,'Ne','zS'), SQL Server will get ('iS', 'Ne','UN','Win','zS') order, but Oracle PL/SQL will return ('Ne','UN','Win','iS','zS') order.
    Anyone has idea how I can get same result as SQL Server without change PL/SQL code (I don't want to change "ORDER BY typename" to "ORDER BY UPPER(typename)" for every stored procedure).
    Thanks

    Jimmy,
    alter session set NLS_SORT=West_European;
    is the closest thing I know of, but UPPER() is the only sure way.
    West_European sort order is AaBbCc ... 0123456789
    usually sort order is 0123456789 ABC ... abc ...

Maybe you are looking for