[VB] Like operator not functioning?

I'm trying to create the following statement in my VB code, but I'm getting a "Sub or Function not defined" error. My question is, how do you use the Like operator with InDesign scripting? InDesign doesn't seem to recognize the Like operator.
"myCurrentString" contains a letter.
If myCurrentString Like "[A-z]" Then
End If
I'm also trying to do the following:
If myCurrentDigit Like "[0-9]" Then
End If

I couldn't find "RegExp" in the InDesign script model--could you give a bit more information about what this is? I don't know how to iterate through the contents of an XMLElement as individual character objects, so I'm iterating throught XML.contents, putting each character in a basic string variable. I need a way to put strings into a With statement, or a Like operator. I haven't had success with either technique.
Here's an example:
strTime = myCurrentXMLElement.contents
strTime = Trim(strTime)
strLength = Len(strTime)
For counter = 1 to strLength
strTemp = Mid(strTime, counter, 1)
[This is where I need to find out if strTemp is a letter or a digit]
Next

Similar Messages

  • Like operator not passed to database for nvarchar(max)

    From Crystal Reports 2008 I need to do a keyword search against a data type of nvarchar(max).
    I am using the LIKE operator in my record selection formula.
    When I do a SHOW QUERY the LIKE condition is omitted from the where clause.
    This makes the report run so slow it is useless.
    How can I do a keyword search against an nvarchar(max) data type?
    Thanks,
    Larry
    CR Developer 12.2.0.290, Product type: Full
    SQL Server 2008 r2

    Sorry it wasn't clear what you are doing or why. I assumed you were using the LIKE in the record selection formula to filter on fields like CustomerID etc. which can be passed to the server. You want to filter based on the text in a Description type field field.
    Yes that is going to be very slow having Crystal do it client side, means all of the data will be sent to the local work station and then on the second pass CR will start filtering.
    You could try using a Command Object to use as the data source, CR should simply pass what ever SQL you type in. Copy your existing SQL and then create a new report and use a Command object and paste in the SQL, edit it to include the LIKE operator and see it that works for you.
    Another option is to use a Stored Procedure with a parameter to do the searching, that will force it to do it Server side. DB servers will aways be more efficient at processing filters that ce will be.
    When viewing the report can you not use the Search window, although that is after the fact so it too would mean all data has to come down first...?
    Basically what is happening is CR is testing every word in the nvarchar field, CR isn't very optimized to do that kind of filtering client side and because it's more complex SQL we won't generate the proper syntax to pass it to the server. Also, Cr supports so many data sources and to build that logic into the basic report designer is very complex and not efficient, there are various DB tools that can do that kind of work and CR can connect to them, Universes, Data Integrator etc., those tools are designed to do this type of complex SQL generation.
    Thank you
    Don
    PS - If Jason sees this thread he is a SQL guru and may have some suggestion for you also.
    Edited by: Don Williams on Jun 22, 2011 11:17 AM

  • LIKE Operator not supported from CMIS Search on Foundation Server

    I am running a CMIS query against Sharepoint foundation server.
    The app is returning the following error: One or more of the input parameters to the service method is missing or invalid
    The log files report the following: 
    CMIS Repository Interfaces    This operator is not supported:   like
    CMIS Repository Interfaces    Exception is thrown of type: Microsoft.SharePoint.CMIS.Data.Exception.InvalidArgumentException
    CMIS Repository Interfaces    Exception thrown in core dll. Microsoft.SharePoint.CMIS.Data.Exception.InvalidArgumentException: One or more of the input parameters to the service method is missing or invalid.
    CMIS Repository Interfaces    Constructing soap exception from  invalidArgument 
    Strange thing is the query works against Sharepoint Enterprise server after setting "Reduce storage requirements for text properties by using a hash for comparison” 
    Does anyone know if this is a limitation of Foundation Server or something in the CMIS Repository Interfaces
    Thank you.

    I've been testing Sharepoint 2010 CMIS api for a while and pretty much everything worked according to CMIS 1.0 spec except the Query which is unfinished work.
    As Alex already wrote only "=", "<=", ">=" and "<>" operators will work. LIKE and IN do not work for me either. And there are other issues that I found.
    Query does not return all properties defined for specific content type, but you can use them in the query: SELECT * FROM "Fixed Assets" WHERE Vendor_x0020_ID = '134' (Select all from "Fixed Assets" document library that holds
    documents of "Fixed Asset" content type). This query will run fine but will not return any custom properties for the "Fixed Asset" content type. Forcing select fields does not help either.
    Selecting SELECT Vendor_x0020_ID,Vendor_x0020_Name FROM "Fixed Asset"
    returns list of empty objects and properties tags:
    <queryResponse xmlns="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
    <objects>
    <objects>
    <properties xmlns="http://docs.oasis-open.org/ns/cmis/core/200908/"/>
    </objects>
    <objects>
    <properties xmlns="http://docs.oasis-open.org/ns/cmis/core/200908/"/>
    </objects>
    <objects>
    <properties xmlns="http://docs.oasis-open.org/ns/cmis/core/200908/"/>
    </objects>
    Content type id (cmis:objectTypeId) is not queryable type. If your document library contains multiple content types you cannot query by content type. Funny thing is that you can query by ContentTypeId which is Sharepoint property name for content type.
    And, I am sure there is more :)
     My conclusion is that this version Sharepoint CMIS DiscoveryService is just a lousy implementation of SQL to CAML query translation. CAML is a strong query language and I don't see any CMIS SQL expression that cannot be easily converted to CAML. Unfortunately
    with the first version of Sharepoint CMIS producer this is not the case.
    Thanks,
    Boris

  • Not like operator not working while matching text from two tables

    Hello  Everyone,
    I want to find the Id from table child where the column name  is not matching with at least first term of column name from parent table.
    I am not getting proper output. can anyone help me.
    Output should be :-->ID 6 & 7
    with child as
    (select 1 id, 'Genentech'  as name from dual union all
    select 2 id, 'Altana Pharma AG'  as name from dual union all
    select 3 id, 'Yamanouchi'  as name from dual union all
    select 4 id, 'Sigma-Tau'  as name from dual union all
    select 5 id, 'Schering-Plough'  as name  from dual union all
    select 6 id, 'Pharma AG'  as name from dual union all
    select 7 id, 'Pfizer'  as name  from dual
    ), parent as
    (select 1 id, 'Genentech number'  as names from dual union all
    select 2 id, 'Altana Pharma AG'  as names from dual union all
    select 3 id, 'AG site/Yamanouchi'  as names from dual union all
    select 4 id, 'sigMa Tau'  as names from dual union all
    select 5 id, 'Schering-Plough'  as names  from dual union all
    select 6 id, 'AG'  as names from dual union all
    select 7 id, 'Inc'  as names  from dual
    select *
    from child a, parent bc
    where a.id=bc.id
    and upper(a.name) not like (bc.names)

    One way:
    WITH child AS
            (SELECT 1 id, 'Genentech' AS name FROM DUAL
             UNION ALL
             SELECT 2 id, 'Altana Pharma AG' AS name FROM DUAL
             UNION ALL
             SELECT 3 id, 'Yamanouchi' AS name FROM DUAL
             UNION ALL
             SELECT 4 id, 'Sigma-Tau' AS name FROM DUAL
             UNION ALL
             SELECT 5 id, 'Schering-Plough' AS name FROM DUAL
             UNION ALL
             SELECT 6 id, 'Pharma AG' AS name FROM DUAL
             UNION ALL
             SELECT 7 id, 'Pfizer' AS name FROM DUAL),
         parent AS
            (SELECT 1 id, 'Genentech number' AS names FROM DUAL
             UNION ALL
             SELECT 2 id, 'Altana Pharma AG' AS names FROM DUAL
             UNION ALL
             SELECT 3 id, 'AG site/Yamanouchi' AS names FROM DUAL
             UNION ALL
             SELECT 4 id, 'sigMa Tau' AS names FROM DUAL
             UNION ALL
             SELECT 5 id, 'Schering-Plough' AS names FROM DUAL
             UNION ALL
             SELECT 6 id, 'AG' AS names FROM DUAL
             UNION ALL
             SELECT 7 id, 'Inc' AS names FROM DUAL)
    SELECT *
      FROM child a, parent bc
    WHERE a.id = bc.id
           AND UPPER (REGEXP_REPLACE (a.name, '[^[:alnum:]]')) NOT LIKE
                  '%' || UPPER (REGEXP_REPLACE (bc.names, '[^[:alnum:]]')) || '%';
    Regexp_replace can be avoided and replaced by translate there if you know for sure what characters you are expecting.
    ID NAME ID_1 NAMES
    1 Genentech 1 Genentech number
    3 Yamanouchi 3 AG site/Yamanouchi
    7 Pfizer 7 Inc
    Cheers,
    Manik.

  • Like operator functionality

    We have a simple select query which is using the 'Like' operator on a char(4) column.
    In a oracle windows environment when we have a query such as:
    select col1, col2, col3
    from table1
    where col1 like 'AB'
    it returns everything which is = to 'AB' and doesn't seem to be including the trailing 2 spaces as would be stored becasue the column is char(4)
    In a oracle unix environment when we the same query:
    select col1, col2, col3
    from table1
    where col1 like 'AB'
    it returns nothing...
    It appears as if the version running on a windows environment is truncating the trailing 2 spaces when using the like expression but in a unix environment, it is not. Does anybody have any idea or clue what could be occuring or if there is some database setting which could cause this to occur?

    Quote from Oracle Doc:
    Character Values
    Character values are compared using one of these comparison rules:
    Blank-padded comparison semantics
    Nonpadded comparison semantics
    The following sections explain these comparison semantics.
    Blank-Padded Comparison Semantics If the two values have different lengths, then Oracle first adds blanks to the end of the shorter one so their lengths are equal. Oracle then compares the values character by character up to the first character that differs. The value with the greater character in the first differing position is considered greater. If two values have no differing characters, then they are considered equal. This rule means that two values are equal if they differ only in the number of trailing blanks. Oracle uses blank-padded comparison semantics only when both values in the comparison are either expressions of datatype CHAR, NCHAR, text literals, or values returned by the USER function.
    Nonpadded Comparison Semantics Oracle compares two values character by character up to the first character that differs. The value with the greater character in that position is considered greater. If two values of different length are identical up to the end of the shorter one, then the longer value is considered greater. If two values of equal length have no differing characters, then the values are considered equal. Oracle uses nonpadded comparison semantics whenever one or both values in the comparison have the datatype VARCHAR2 or NVARCHAR2.
    "

  • Using Like Operator in a decode function

    Hi,
    I am trying to find out if I can use the like operator in a decode function
    like:
    select decode(1234,like '%123%','123 is a match') from dual;
    this reults in error ORA-00936: missing expression
    is there any way to make this work?
    thank you

    SQL> ed
    Wrote file afiedt.buf
      1  WITH tbl AS (SELECT '201aaa' dt FROM DUAL UNION ALL
      2               SELECT '123bbb' dt FROM DUAL UNION ALL
      3               SELECT '567ccc' dt FROM DUAL UNION ALL
      4               SELECT 'ab123ddd' dt FROM DUAL
      5               )
      6  SELECT dt,CASE WHEN dt like '%123%' THEN 'Match'
      7         ELSE 'Not Matched'
      8         END With_case
      9        ,DECODE(REGEXP_SUBSTR(dt,'123'),NULL,'Not Match','Match')   With_Regexp
    10        ,DECODE(INSTR(dt,'123'),0,'Not Match','Match') With_Instr
    11        ,DECODE(REPLACE(dt,'123'),dt,'Not Match','Match') With_Replace
    12* FROM tbl
    SQL> /
    DT       WITH_CASE   WITH_REGE WITH_INST WITH_REPL
    201aaa   Not Matched Not Match Not Match Not Match
    123bbb   Match       Match     Match     Match
    567ccc   Not Matched Not Match Not Match Not Match
    ab123ddd Match       Match     Match     MatchEdited by: Saubhik on Jul 26, 2010 5:24 AM
    Edited by: Saubhik on Jul 26, 2010 5:40 AM
    Edited by: Saubhik on Jul 26, 2010 5:40 AM

  • LIKE operator is not working in SQL Query in XML file

    Hi Gurus,
    LIKE operator is not working in SQL query in XML template.
    I am creating a PDF report in ADF using Jdeveloper10g. The XML template is as follows
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="catalogDataTemplate" description="Magazine
    Catalog" defaultPackage="" Version="1.0">
    <parameters>
    <parameter name="id" dataType="number" />
    <parameter name="ename" dataType="character" />
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
       SELECT ename, empno, job, mgr from EMP where deptno=:id and ename LIKE :ename || '%']]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="EmployeeInfo" source="Q1">
    <element name="EmployeeName" value="ename" />
    <element name="EMPNO" value="empno" />
    <element name="JOB" value="job"/>
    <element name="MANAGER" value="mgr" />
    </group>
    </dataStructure>
    </dataTemplate>
    if i pass the parameter value of :ename from UI, it doesn't filter. But if I give ename = :ename it retrieves the data. Can anyone help me why LIKE operator doesn't work here?
    Appreciate your help,
    Shyamal
    email: [email protected]

    Hi
    Well for a start, you are doing some very strange conversions there. For example...
    and to_char(a.msd, 'MM/DD/YYYY') != '11/11/2030'
    and to_char(a.msd, 'MM/DD/YYYY') != '10/10/2030'If a.msd is a date then you should e converting on the other side ie.
    and a.msd != TO_DATE('11/11/2030', 'MM/DD/YYYY')
    and a.msd != TO_DATE('10/10/2030', 'MM/DD/YYYY')Also, you may want to take into consideration nothing being input in :P2_ITEM_NUMBER like this...
    AND INSTR(a.item_number,NVL(:P2_ITEM_NUMBER,a.item_number)) > 0Is item number actually a number or char field? If it's a number, you want to explicitly convert it to a string for using INSTR like this...
    AND INSTR(TO_CHAR(a.item_number),NVL(TO_CHAR(:P2_ITEM_NUMBER),TO_CHAR(a.item_number))) > 0?
    Cheers
    Ben

  • Relational operator LIKE is not supported.

    Hi friends,
    I am trying to write a routine in bw.  I am using LIKE pattern.
    But it is giving the below error.
    "E:Relational operator "LIKE" is not supported."

    hi,
    can you post your code and mention what do you want to achieve?
    thanks
    ec

  • The up down arrows on the side of my Hotmail email list do not function, nor does clicking the space above and below the slider bar. These functions work in all other cases. It began with Firefox 3.6 upgrade. Firefox version: 3.6 Operating system: Windows

    The up down arrows on the side of my Hotmail email list do not function, nor does clicking the space above and below the slider bar. These functions work in all other cases. It began with Firefox 3.6 upgrade.
    Firefox version: 3.6 Operating system: Windows XP
    == This happened ==
    Every time Firefox opened
    == After upgrade to Firefox 3.6

    See https://bugzilla.mozilla.org/show_bug.cgi?id=511075 - The arrows of the scrollbars don´t work in hotmail
    Should be fixed in the next release Firefox 3.6.4

  • Safari says "i cannot open the page because the server cannot be found" I get this on Safari and Mail does not function. Apps work like a dream. All Windows OS are screaming. Any thoughts?

    Safari says "i cannot open the page because the server cannot be found" I get this on Safari and Mail does not function. Apps work like a dream. All Windows OS are screaming. Any thoughts?

    You can check this thread for the answer you are looking for.
    https://discussions.apple.com/thread/3685247?start=0&tstart=0

  • I believe my firefox is viewing some websites on my laptop in formats that are used for cellular devices. Sites like facebook, sports illustrated, yahoo are not functioning correctly but certain sites work fine.

    sits such as facebook, yahoo, and sports illustrated do not function correctly on firefox but they do on my internet explorer. I believes its somehow set itself into the same format used for cellular devices... My JSU.edu page says somethin about it being in (portal mode). It is also a different format now that normal.

    Hi @TheBigGiggle ,
    Thank you for visiting the HP Support Forums and Welcome. I have read your thread on your HP ENVY TouchSmart 17 Notebook PC and a keys not functioning correctly. Here is a document on cleaning the keyboard.
    I would start with air on the keys as sometimes debris can cause this issue.
    Here is a link to uninstall the keyboard. In the device manager have you uninstall all that is listed in keyboards, restart the computer after uninstalling, it should reinstall automatically and resolve any issues with the keyboard.
    Here is a link to keyboard troubleshooting.
    Here is a fix from Microsoft that might help.
    Let me know how this goes.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Like Operator is not working

    Hi have a table BACKLOG where i have a column called item_number
    I have made report on this table and i have included all item_number. Now i have to create another set of reports where i have to exclude records on basis of item_number.
    For this i have made a static lov which is having values like SERVICE,SAMPLE,EBV
    The item_number is db contains SERVICE,SAMPLE,EBV in them. Examples are
    SERVICE WFR SEN
    SERVICE NRE SEN
    SAMPLE NRE SEN
    SAMPLE WFR SEN
    EBV NRE SEN
    EBV WFR SEN
    In my report i am using the like operator as
    and a.item_number like '%:P2_ITEM_NUMBER%'
    [/CODE]
    I have used the :P2_ITEM_NUMBER because i have a select list in the report page.
    Apart of it i want one more query to exclude the selected value of :P2_ITEM_NUMBER from report
    Thanks in advance
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi
    Well for a start, you are doing some very strange conversions there. For example...
    and to_char(a.msd, 'MM/DD/YYYY') != '11/11/2030'
    and to_char(a.msd, 'MM/DD/YYYY') != '10/10/2030'If a.msd is a date then you should e converting on the other side ie.
    and a.msd != TO_DATE('11/11/2030', 'MM/DD/YYYY')
    and a.msd != TO_DATE('10/10/2030', 'MM/DD/YYYY')Also, you may want to take into consideration nothing being input in :P2_ITEM_NUMBER like this...
    AND INSTR(a.item_number,NVL(:P2_ITEM_NUMBER,a.item_number)) > 0Is item number actually a number or char field? If it's a number, you want to explicitly convert it to a string for using INSTR like this...
    AND INSTR(TO_CHAR(a.item_number),NVL(TO_CHAR(:P2_ITEM_NUMBER),TO_CHAR(a.item_number))) > 0?
    Cheers
    Ben

  • Error message saying a device attached to the system is not functioning

    i m getting an error message saying a device attached to the system is not functioning whenever i m trying to connect my pc to my smartphone. i tried all your options like uninstalling failed updates from my update history, checking if their is any flag
    in device manager option but nothing helped me.. plz solve my problem..

    Hi,
    Could you please have a share with your phone's information?
    Based on what I know, different phones may have different softwares developed by the manufacturer to make the connection through Windows operating system, we may check with the phone's manufacturer side and see if there could be some helpful information
    offered.
    Besides, please take a check with
    Event Viewer and see if any special errors logged there.
    Best regards
    Michael Shao
    TechNet Community Support

  • Keyboard+trackpad not functioning at all on HP 2000 Notebook PC! please help!

    Tonight I turned on my laptop (HP 2000 Notebook PC) to find that the Keyboard and track pad was not responding, the only thing that worked was the wireless mouse.
    I can not find the product number but the name is HP 2000 Notebook PC, the operating system is Windows 8, I can't login to see if there are any error messages, the last thing I remember doing was trying to apply a new cursor image and it told me to restart and when I did I couldnt log back in or type anything at all, I could only use the mouse.
    Also the things I have tried to do are: Restart Computer, Take out batter and restart. (I cant do much because I can't type in password)
    All help will be greatly appreciated!
    UPDATE: I logged in using the On-Screen Keyboard, it seems like a hardware malfunction and not a virus because i cant find anything in my downloaded stuff that wasnt there before. So it is just a hardware malfunction.
    UPDATE #2: it says that the driver (for keyboard and touchpad) may be corrupt or missing and it says Code 39 in parenthesis.

    Hello Oceanlife,
    You state that the keyboard and touchpad are not functioning, that is correct? I will try to assist you with this issue.
    As of today are you still having this problem?
    If you have, any more questions do not hesitate to ask. .
    Thanks
    Clicking the White Kudos star on the left is a way to say Thanks!
    Clicking the 'Accept as Solution' button is a way to let others know which steps helped solve the problem!

  • CS6.0 & CS5.5 Master Collection InDesign Font Control bar & Characters Panel not Functioning

    Hi, I am a college student and our college a year ago sent me CS5.5 Master Collection InDesign at that time the font control bar was not functioning correctly on my PC. Our class was about Adobe Illustrator so our instructor rather than deal with it had us just cut and paste things into MS Word.
    Now a year and half later I am taking a college course in Adobe Photoshop . . CS6.0 Master Collection InDesign once again the collection is the Student and Teacher Licensing for Windows.  The same thing is happening now we are REQUIRED to this semester to create a Calendar using our own photos and create a INDESIGN layout using our photos we took for our course.  In this version of CS6.0 InDesign I figured they would of fixed it by now, but the "Control Panel is still not working, nor is the Character Panel that you pull up to the side of InDesign. I am able to use the pull down menus and do things from there, but the point of taking this course was to learn the software, how can we students use the software if it is not functioning properly.
    NOTE I AM EXPERIENCEING THE SAME THING WITH ALL SIDE PANELS NOW TOO.
    Oh yes it changes the font name when you use the pull down window from the top menu, but it is not allowing us to use the CONTROL BAR just under the MENU BAR, nor the side panel I pulled up and am showing there. In ADOBE ILLUSTRATOR I can use the character panel just fine, but not in InDesign.
    In Illustrator when I go to launch it I get this error, I have done as it asked but it still is bring this up at launch. I can go in and use Illustrator just fine, except for this error.
    Someone thought I may of installed it incorrectly, so I removed all ADOBE software from my computer ran maintenance and virus scans and reinstalled the software, a whole day wasted, but it still is doing the same thing.
    a) Thinking that this is a limitation placed on the software by Adobe because it is a Student Teacher Edition?
    b) There's a problem with having OpenType and TrueType fonts on hand?
    c) Adobe has a software problem that they have yet to resolve?
    d) There is something somewhere within the software I need to flip a switch on?
    Our instructor I gather who owns his own business his works just fine on his PC, but then because it is his business software it makes me think it has to do with the Student Teacher Edition.
    I have more than enough RAM and hard drive space the Processor is a AMD A8-3800 APU with Radeon(tm) HD. Graphics is 2.40 GHz. It is a 64-bit Operating System. Oh I am using a Windows OS 7.0 Professional .
    This is the only piece of software that I have come accross that will not function correctly on my computer system since it's purchase Jan of 2012.

    There is no difference between the commercial and educattional versions of the products other than the license terms. The software itself is the same.
    Since you are on windows 7, the first question is are you using large fonts in the Windows interface? Large fonts combined with an Aero theme are deadly to ID. See InDesign tools and panels don't respond to mouse clicks (Windows 7/Vista)
    If this doesn't apply, the next thing to try is replacing your preferences. See Replace Your Preferences
    Do you use a font manager? If so, which one?
    Does the account you are using have adminsitrator privileges? Shouldn't matter, but it would be worth trying a new account that does.
    It's still possible that the installation failed in some way. That Illustrator error certainly makes it look like a strong possibility, and there may have been some left-over crud from the first failed install that was not replaced the second time. If the things above don't clear up the problems, I would suggest Deactivating the suite from an applicatin that will open, and uninstalling again, then run the cleaner tool (CS Cleaner Tool for installation problems | CCM, CS6, CS5.5, CS5, CS4, CS3) which will remove all traces of the previous installations. Reboot, then before reinstalling run MSConfig and turn off all non-essential startup programs and services, especially any virus or maware scanners, third-party firewall, instant messengers, iTunes and all browser helpers and toolbars, then close MSconfig and reboot. Log in as an Administrator (the actual Adminsitrator account would be best, but it may not be turned on). When the warning comes up about diagnostic mode continue to boot (cancel MSConfig if it opens), then run the installer again. You can now run MSconfig to restore normal startup and reboot once more.

Maybe you are looking for