Between operator for VARCHAR values

Hi there,
I am trying to compare one varchar value between two varchar values which is not working.
for e.g. in my table there are two columns.
FROMpcode(column1)
L6P 0A1
L6A 0A1
TOpcode(column2)
L7E 5S1
L6A 4R1
the value I want to compare for between FROMpcode and TOpcode is L6S 6B7. here is the query. this is for Canadian postal code comparison.
select * from mytablename where L6S 6B7 between FROMpcode and TOpcode
I can not convert FROMpcode , TOpcode into numbers as they are alphanumeric data.
thanks for your help.
Techie_nas

Hi,
Post CREATE TABLE and INSERT statements, like this:
CREATE TABLE     table_x
(      frompcode     VARCHAR2 (7)
,      topcode          VARCHAR2 (7)
INSERT INTO table_x (frompcode, topcode) VALUES ('L6P 0A1',   'L7E 5S1');
INSERT INTO table_x (frompcode, topcode) VALUES ('L6P 0A1',   'L6A 4R1');Also post the results you expect from that data.
It helps to post your (incorrect) query, too. Even if you just copied it from this site, post your code; there may just be an editing error.
[email protected] wrote:
... Easier said than done. Looks like you have never gone through the pain of posting data in formatted matter. Just try doing it once. the Line : turns out ugly and makes data look like random numbers.As explained in the FAQ: http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
Type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Between operator for group by date in Apex Interactive Reports

    Hi,
    In the interactive reports filter, i couldn't find the 'between' operator for date field (got a 'group by date' in my sql query (source). I am just wondering, Is it beacuse of the group by date clause?. Is there any way to show the 'between' operator in the interactive reports filter.
    Thanks

    I just opened an existing IR style report, went to actions, filter, selected a date column and found between at the bottom of the list of values.. Are you sure the date you are trying to filter on is a true date column?
    Thank you,
    Tony Miller
    Webster, TX
    What if you really were stalking a paranoid schizophrenic... Would they know?
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Link between documentation for chars value and chars

    Hi,
    we need to find out sap transaction or report for link between documentation of chars value and chars.
    we know for specific chars through CT04 and going to VALUES sub-tab then selecting perticular chars value and clicking on the documentation for value.

    Go to transaction CT10 and select display option 'Allowed values'. You will have the characteristics along with their values.

  • CreateWithParams operation for Date value

    Hi,
    i want to use createwithparams for date value. I have drag and dropped the createwithparams operation and in the page def file and i have inserted NamedDate and in that i have entered NDName, NDType as "oracle.jbo.domain.Date" and NDValue. But its not working... Please help

    Which Jdev version. What error ? What value do you exactly pass ?

  • APEX_UTIL.IR_FILTER with BETWEEN operator for date columns

    Hi,
    when I run my application I can set a BETWEEN-filter for date columns. I can't find a way how to use it with the APEX_UTIL.IR_FILTER function. Maybe I miss something?
    Documentation: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_util.htm#CHDDDFBF
    Tobias

    Tobias,
    If you think about it, a "Between" is nothing more than a single line way to say
    WHERE :X >= :Y
    AND :X <= :Z
    So you should be able to apply two filters to the report using the LTE and GTE operators
    Hope this helps
    Doug Gault
    www.sumneva.com

  • Is there a "between" operator for CFIF?

    Rather than including both a GTE and LTE in a CFIF when I
    want to find something between two values, is there an operator
    that I can include to simply things.
    something like
    <CFIF #column1# BETWEEN(value1, value2)>
    Currently I have to do
    <CFIF (#column1# GTE value1) AND (#column1# LTE
    value2))>
    It just seems very redundant to include a GTE and LTE in the
    same statement when my ideal example above would cover this in one
    operator.
    So, is there anything out there for what I'm looking
    for?

    Cold Fusion has nothing like that. cflib.org is a repository
    of udf's. Maybe there is something there.
    Of course, looking at the example you gave, and nothing else,
    maybe you could use the sql keyword "between" in your query so you
    don't have to worry about it in Cold Fusion.

  • OSB JCA Merge operation for null value

    I am doing a merge and when I supply the nodes the nodes I leave empty i.e. <somenode></somenode> I expect to update, if the record exists, the database to a null, but instead it does nothing and leaves the existing value.
    Anybody know how to accomplish this, perhaps an attribute on the toplink file?

    I figured it out. You have to change the DetectOmissions="false" in the wsdl where the merge operation properties are specified.

  • XML Document Format for JDBC Receiver(Between operation)

    Hello everybody,
    is there a way to use a BETWEEN operation for the key in a SELECT XML document format????????, I need to filter in the Where for different Statements in teh strcuture as BETWEEN, thanks in advance.
    Regards,
    Julio

    http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Not sure but Check the option of
    <key1>
         <col2 compareOperation=u201DLTu201D>val2old</col2>
         <col2 compareOperation=u201DGTu201D>val2old</col2>
    </key1>
    Thanks,
    Beena.

  • Between operator

    Hi
    We used between operator for varchar2 column.it is caused any performance problem n query execution.
    My sql statement is AND gcc_c.segment3 BETWEEN '&&3' AND '&&4'
    AND gcc_c.segment4 BETWEEN '&&5' AND '&&6'
    where segment3 and segment4 as varchar2 columns.now program is running some times very fast and some times take more hours to execute the sql satement.
    Plz give any one solutions.how to write the between operator for varchar2 columns.
    Thank's

    Is there any correlation between the range between the two values specified and the time it takes the query to execute?
    For instance one might expect this
    select *
    from big_table
    where col23 between 'BBB' and 'XXX'
    /to take longer to execute than this...
    select *
    from big_table
    where col23 between 'MMM' and 'MNO'
    /In fact, you might well want a completely different execution for the first case and the second case (full table scan, preferably with parallel query VS indexed range scan).
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • InputListOfValue with ViewCriteria using between operator giving error.

    So i am using inputlistofvalues with ViewCriteria.In ViewCriteria i am using between operator for a date(CreDttm) field.
    when i click on search icon,it takes me to search popup and i give range of date and click search it give me result correctly and when i select a row and click ok,it take me to parent page but give error that "Credttm is required"...its Readonly Vo. If i use equal operator on same it works fine.
    Am i doing something wrong?
    Any help will be appreciated!
    Thanks

    its better to say which jdev version you are using..
    what is 'Credttm' atttribute is associated with.. is it the inputComboboxlitof values.. is this happening when you set the autsubmit=false for the inputcombolov? whe exactly are you seeing this error..

  • Weblink syntax for 'between' operator

    I have created a weblink that works fine with the gt and eq operator but I would like to use the 'bet' between operator. I tried entering the 2 values separated by a comma, semi-colon, surrounded with parenthesis, but I still get an error.
    What is the correct syntax to provide 2 dates for the P6 parameter. This is my weblink url:
    https://secure-ausomxbha.crmondemand.com/OnDemand/user/ReportIFrameView?SAWDetailViewURL=saw.dll?Go%26Path%3D%252fshared%252fCompany_31193_Shared_Folder%252fUnused%252fTemp&Action=Navigate&P0=2&P1=eq&P2=Lead.PICK_1&P3=Fans&P4=bet&P5=Lead.Created&P6=(08-30-09,09-30-09)

    According to Michael L's book the operator is 'bet'.
    I have already tried using what you have suggested. That is add an extra param and check for date less-than(lt) SELECTED_DATE and date greater-than(gt) SELECTED_DATE. That doesnt work either. CRMOD ignores the 2nd param and takes into account only the first one.
    *(I did not forget to change P0=3)
    Any other suggestions?
    Edited by: nmbtcAdmin on Nov 16, 2009 3:26 PM

  • The Creative Cloud application becomes inoperable continually on both my Windows 7 and 8.1 operating systems. I'm tired of re installing the application after deleting the OOBE file to get updates and syn settings between computers for Photoshop. Is this

    The Creative Cloud application becomes inoperable continually on both my Windows 7 and 8.1 operating systems. I'm tired of re installing the application after deleting the OOBE file to get updates and syn settings between computers for Photoshop. Is this an endemic problem with others? I'm using Google Chrome as my browser. Is this an issue with the problem?

    Similar problem just happened to me with the Creative Cloud Update 1.7.1.418—slightly different so I thought I'd share. I have multiple Adobe Creative Cloud programs installed on my computer, all working just fine. I updated the Cloud App to the latest version and then it shows me that I have only one program installed! All my previously installed programs (Photoshop and the like) still work but show as "install" instead of "Up to date". Initially I thought I'd have to re-install the Cloud app or recreate the OPM data base but then I noticed that some of the Cloud app preferences (Apps > Settings > App Language) were different to what I had set previously. I use English (International) language, the update had reverted the app back to English (North American). I flicked back to my previous language and bam, all my apps now show as being installed correctly.

  • (+) operator for a between condition

    When i write this query in the sql prompt, getting an error "Invalid relational operator".
    But when i write the same query in the report bulider , there is no error.
    (but data is not selected as required)
    Is this query correct? Can we write (+) operator for between conditions
    select      tab1.col1,
         tab2.col1
         tab1.col2,
         tab2.col2
    from     emp tab1,emp tab2,table3
    where     tab2.col1(+) = tab1.col1
    and     tab2.col2(+) = tab1.col2
    and      tab1.col2(+) between TO_DATE('11/10/20060601','DD/MM/YYYYHH24MI')
                   AND TO_DATE('11/10/20061400','DD/MM/YYYYHH24MI')
    Thanks in advance
    Chettarjee

    Get rid of the (+) before the between.. Only use (+) when outer joining tables.
    This statement below is not outer joining a table with a table..
    and tab1.col2(+) between TO_DATE('11/10/20060601','DD/MM/YYYYHH24MI')
    AND TO_DATE('11/10/20061400','DD/MM/YYYYHH24MI')If you are trying to say tab1.col2 must be between two dates or it can be null then do this..
    "(and tab1.col2 between TO_DATE('11/10/20060601','DD/MM/YYYYHH24MI')
    AND TO_DATE('11/10/20061400','DD/MM/YYYYHH24MI') or tab1.col2 is null)"
    The above where clause is just a guess of what you may be trying to do with the (+) before the between.
    Message was edited by:
    Mark Reichman

  • Between operator not appearing for date in custom field of IBASE search

    Hi experts
    I am using CRMCMP_IBSEARCH for search enhacement of IBASE by adding a new fields as valid from date in CRM 7.0.
    I have added the field using append structure in the search structure of IBASE.Now my requirement is i am unable to see the between operator in UI for this date field and also i cannot enter date range for my requirement.
    Any su

    Hi,
    please go to SM34 and open viewcluster CRMVC_DQ
    Check and change here the operators for your component and view / attribute.
    Kind regards
    Manfred

  • What are the hours of operation for phone support? I cannot find them and the phone system just says between regular hours?

    My patience has been pushed to its  limit with this iPod and I cannot find hours of operation for customer service and tech support and the phone system just tells you no one is available and call back during regular hours, but nothing saying what those hours are. Does anyone know?

    Looking at the Apple's website and previous posts, Apple does not publish the hours.  Did you can in the USA during the times that corresponsd to about 9AM to 4PM Pacific time?

Maybe you are looking for

  • Want to use new laptop for iPhone 5, but will iPhone 4 backup on old pc transfer ok?

    I'm about to set up my new iPhone 5, but I want to set it up on a new pc, not the one I previously used for my iPhone 4. I've done a backup of my iPhone 4 with the old pc, but want to plug the new one into my new laptop. Will everything still transfe

  • FB50 upload data err."Item 1000 should be created maximum 999

    REPORT ZBDC_TAB_CTRL_FB50 . DATA: I_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE. ****Header Internal Table DATA: BEGIN OF T_HEAD OCCURS 0, BLDAT(10) TYPE C, BUDAT(10) TYPE C, END OF T_HEAD. ****Detail Internal Table DATA: BEGIN OF T_DET OCCURS 0,

  • Streaming over WiFi is not fluent

    When I stream video from my mac or iPad over wifi, video is not fluent, it is stucking. When I stream it from my mac over ethernet (apple tv is connected to my network by ethernet), it works just fine. These problems started after updating my Apple T

  • Looking for an external USB CD/DVD burner

    Hello all, I just got my MacBook Air 13" and I'm in need of an external USB CD/DVD burner.  I've read on Newegg and Amazon that certain drives require two USB plugs just to get sufficient power.  With the MBA, however, this isn't really feasible beca

  • .ipa package from Flash Builder 4.5.1

    Can someone explain to me what is in the .ipa package for Apple iOS? I opened the package and I don't see Objective C code.  Does the iOS just contain a SWF?