Date of Condition does not, not cming point value.

Hi friends,

I create a form to place order and I have created a MASTER table for fixed point rate between two appointments with price as A, B, C, D code.

In the form, I for item

: P1_ORDER_DATE
: P1_ITEM_CODE
: P1_PRICE_CATEGORY check the mailing list

: P1_ITEM_RATE

Rate of point, I put in Source,
Source Type SQL - Quary
Vale of source
select RATE_1 from SAM_ITEM_MAS where ITEM_CODE =:P1_ITEM_CODE and  PRICE_CATEGORY=:P1_PRICE_CATEGORY and :P1_ORDER_DATE
 between FROM_DATE and TO_DATE
My Table
CREATE TABLE  "SAM_ITEM_MAS" 
   (     "ID" NUMBER NOT NULL ENABLE, 
     "ITEM_CODE" NUMBER, 
     "PRICE_CATEGORY" VARCHAR2(5), 
     "FROM_DATE" DATE, 
     "TO_DATE" DATE, 
     "RATE_1" NUMBER, 
     CONSTRAINT "SAM_ITEM_MAS_PK" PRIMARY KEY ("ID") ENABLE
   )
/
that does not code but if I run this code in the SQL command, then there working fine.but not to the order of the DAY: P1_ITEM_RATE.

I want when I select P1_PRICE_CATEGORY as A, B, C, D, then the respective rates of Table SAM_ITEM_MAS should come point: P1_ITEM_RATE.

Date condition oredr does not work.

Thank you

Published by: 805629 on December 28, 2010 23:32

Hello

Have you tried running the item as dates using TO_DATE() values:

select RATE_1
from SAM_ITEM_MAS
where ITEM_CODE =:P1_ITEM_CODE
and  PRICE_CATEGORY=:P1_PRICE_CATEGORY
and TO_DATE(:P1_ORDER_DATE,'DD/MM/YYYY') between "FROM_DATE" AND "TO_DATE"

(change the date format string to match the format of the page P1_ORDER_DATE element)

You should probably change the name of the field to something else that TO_DATE since it is a name of Oracle function - try DATE_FROM and DATE_TO start_date and end_date or something like that. Otherwise, you need to use double quotes, as I have indicated above

Andy

Tags: Database

Similar Questions

  • Case in SQL condition does not return the values as expected

    Hello gurus of PL/SQL,.

    SELECT amd.brkr_nm, amd.brkr_sym, AMD.MINORITY_FLG, atdf.comm_brkr_dim_key, atdf.exec_brkr_dim_key,
    WHEN atdf.COMM_BRKR_DIM_KEY = AMD.ACCESS_METHOD_DIM_KEY - CASE THEN
    WHEN AMD BOX. MINORITY_FLG = 'Y' THEN
    CASE WHEN atdf.EXEC_BRKR_DIM_KEY = atdf.COMM_BRKR_DIM_KEY THEN 'Done' ELSE 'InDirected.
    END
    ANOTHER "NA".
    END
    ELSE ' 0'
    END
    AS Direction_Method
    Of
    alloc_tran_det_fact atdf,
    ACCESS_METHOD_DIM AMD

    But it returns me the 0 value in the Direction_Method field. But when I checked the values in DB then my first condition (atdf.COMM_BRKR_DIM_KEY = AMD.ACCESS_METHOD_DIM_KEY)
    second condition (AMD. MINORITY_FLG = 'Y') and third (atdf.EXEC_BRKR_DIM_KEY = atdf.COMM_BRKR_DIM_KEY) condition of all them have passed, then it should show the value as indicated, but it is shwoing the '0' value only in the Direction_Method column.

    Kindly help me.. .am I missing something?
    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production. I can't create the test data in the database, I did not have the required privileges to make :(

    Kindly help me, thnanks in advance for your time and your comments

    Published by: user555994 on May 24, 2012 02:00

    could be a space or case (upper or lower case). Try:

    /* Formatted on 2012/05/24 16:00 (Formatter Plus v4.8.8) */
    SELECT amd.brkr_nm, amd.brkr_sym, amd.minority_flg, atdf.comm_brkr_dim_key, atdf.exec_brkr_dim_key,
           CASE
             WHEN trim(upper(atdf.comm_brkr_dim_key)) = trim(upper(amd.access_method_dim_key))
               THEN CASE
                     WHEN trim(upper(amd.minority_flg)) = 'Y'
                       THEN CASE
                             WHEN trim(upper(atdf.exec_brkr_dim_key)) = trim(upper(atdf.comm_brkr_dim_key))
                               THEN 'Directed'
                             ELSE 'InDirected'
                           END
                     ELSE 'NA'
                   END
             ELSE '0'
           END AS direction_method
      FROM alloc_tran_det_fact atdf, access_method_dim amd
    
  • The date and time does not work.

    I have an iphone 5 c.

    The date and time does not work. This is the second time.  The first time was about 3 to 4 months again and now again after upgrade to iOs9.3.1.

    Even after trying to change it manually, time slows down or stops.

    Everyone has problems with their date and time?

    • Try a forced reboot: hold down the House and on the buttons until the unit turns off. Ignore the cursor off if it appears. Once completed, if it does not start on it own, turn off power with the key On. In some cases, it also contributes to double click the Home button and close all applications before restarting.
    • Restore factory settings (no backup)
    • Make an appointment at your local Apple store to have it checked.
  • Vista Data Execution Prevention does not let me play tractor simulator 2013

    Vista Data Execution Prevention does not let me play tractor simulator 2013

    Moved from feedback

    Hi, Tractor1o1,

    If you choose to protect all programs, you can always turn off DEP for individual programs. If you think that a program does not run correctly when DEP is enabled, check for a compatible version of the DEP program or an update from the software publisher before you change your DEP settings.

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-data-execution-prevention-settings

    Please do not duplicate messages.  It is a violation of the Code of conduct.  See the article "Please Don't ':

    "Post questions that are identical or similar to the questions you have already posted. When someone has an answer to your question, that person will respond. »

    http://answers.Microsoft.com/en-us/page/FAQ#faqCodeConduct

    Thank you.

  • When I try to burn a music disc player is registered as a DATA reader and does not allow me to copy music files that I can play on an external source

    I have computer aGateway running Vista Home Edition and something happened with WIndows Media Player.   I have the DVD/RW internal drive and external DVD/RW as a player.  I use them mainly to copy music files and it has always worked fine until yesterday.

    When I try to burn a music disc, the player is registered as a DATA reader and does not allow me to copy music files that I can play on an external source (such as the CD or car drive).  Worked fine Saturday and had burned discs Saturday night recognizes the two drives as data drives.

    Is it something that needs to be reset or changed?

    In WMP, please click the button burn up and make sure that the Audio CD is selected. Then try burning the CD again, they now play on a standalone CD player too.

  • ODI-15005: data type "varchar" does not close in technology: file?

    Hello

    I created the interface that loads data from flat file (source) oracle (target).

    For this, I took LKM SQL FOR SQL and SQL TO ADD FILE IKM.

    Please check the source and target data types.

    [WORK REPOSITORY1] Oracle Data Integrator 11g  ORCL_TO_FLAT_2015-08-11_11-59-12.png

    When I am executing this interface, I get the error as

    ODI-15005: data type "varchar" does not close in technology: file.


    To resolve this error, I changed the types of flat file data.

    I went to the Manager of topology-> select technology of files-> data types: string - > orcle to the number data type.

    Even if I do not correct this error. Please help me.


    Thanks in advance,

    A.Kavya.

    Hello

    Can you please check what are the data types for the columns in your data target store. As you say it's a file, can you check if the data type for the two columns has the String value (and not varchar).

    Thank you

    Ajay

  • Data Recovery Advisor does not work

    In our environment of RAC DB 12 c Data Recovery Advisor does not work? Why?

    The Data Recovery Advisor is only supported by ORACLE DB Single Instance!

    https://docs.Oracle.com/CD/E60665_01/db121/BRADV/rcmrepai.htm#BRADV246

  • Export model data as xml does not work

    Export model data as xml does not work

    Please advice on this subject? I created a template with editable regions - index.dwt, but when I try to export the model as xml - it is greyed out. I read another thread in this forum, but I'm not clear on the second stage of the given statement. Please click on the header to see step 2 on a previous thread.

    Please notify.

    THX

    Now that you have a template file, you can create a page by using the template file. Have a look here http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WSc78c5058ca073340dcda9110b1f693f21-7ef da.html.

    Once you have created the page, you can export as XML.

    GRAMPS

  • Possible error with module GWT.xml file. The value of time compilation agent user (ie6) does not match the value of user.agent (ie8) run time

    Hi there... How can I sort this problem as this message looks back constantly on google Account... ERROR POSSIBLE WITH GWT. The value of time compilation agent MODULE XML FILE user (ie6) does not match the value of user.agent (ie8) run time

    Hello nEve Adam,.

    Thanks for the return of the response.  Below, I've added some links Google support on this issue.  I hope this helps.

    ERROR: Problem Possible with your *. GWT.XML file module. The value of compile time user.agent (opera) does not match

    http://www.Google.com/support/forum/p/blogger/thread?TID=2d6d9bd1326a07c4&hl=en

    In addition,

    Message from Web page

    http://social.technet.Microsoft.com/forums/en-us/ieitprocurrentver/thread/53194559-306a-4ffc-a614-4bac817f178d

  • APEX_ITEMS does not store the value in the SESSION after the validation error

    Hello

    I'm build dynamically using APEX_ITEMS, but it does not keep the value when the page is submitted and the validation error occurs. Here are the following steps that I am following.

    When I enter SUE (more than 8 characters), SUBMIT, validation fails and the error is displayed on the page (which is fine)
    BUT it does not keep SUE value (which I got) and filled with the old value which is ABC.

    WHY it does not keep the value that the user entered (even as the normal Page items)

    Region PL\SQL
    declare
      v_value varchar2(20);
    begin
      v_value := 'ABC'; 
      htp.p(apex_item.text(7,v_value));
    end;
    Validation (function returning the error text)
    DECLARE
     v_count number;
     v_value varchar2(50);
     v_value1 number;
    BEGIN
      v_value := apex_application.g_f07(1);
      select length(v_value) into v_value1 from dual;
    
          if v_value1 > 8 then
              return 'Field must have less than 9 character';
          ELSE
             return null;
          END IF;
    END;

    You use collections if you want the State to show if, after a validation error. Unfortunately, this is the case if you do not use the normal tabular forms.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    https://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • The value entered does not match the value in the field

    I have a simple form on the page, a field callculates a percentage based on the values entered in 2 other fields, works very well, but then all the entries on the form generates this message "the entered value does not match the value in the field".

    Also, you can remove a tab stop of the fields?

    Just happened again.

  • Drop-down list does not appear selected value

    Hello

    I have a problem. The output of a query results page. There are 2 fields must be updated: scholarshipID and amount. I want to update my request at a time. My dynamic drop-down list does not appear selected value. The value is there, but it does not recognize in the drop-down list. I could not find the error. My code is below, so please help...

    < name cfquery = "getStudentsData" datasource = "#application. DSN #">"
    Select StudentID, fname, lname, GPA, Tbl_Students.ID, ScholarshipID, rise, Tbl_StudentsScholar.ID as the SSID, AwardStatus
    of Tbl_Students, Tbl_ApplyYear, Tbl_EduBckgrnd, Tbl_StudentsScholar
    where Tbl_Students.ApplyYr = Tbl_ApplyYear.id
    and Tbl_Students.id = Tbl_EduBckgrnd.SID
    and Tbl_Students.ID = Tbl_StudentsScholar.SID
    and ApplyYear = 1
    and steps = 7
    order by studentid
    < / cfquery >

    < name cfquery = "getScholarship" datasource = "#application. DSN #">"
    Select AcctNum, scholarship, Tbl_Scholarships.id, Code
    of Tbl_Scholarships, Tbl_DistCode
    where Tbl_Scholarships.DistCode = Tbl_DistCode.id
    AcctNum order
    < / cfquery >

    < cfparam name = 'X' default '0' = >
    < cfparam name = default "CounterX" = "0" >

    <!--get scholarship-->

    < cfif getStudentsDataRet.RecordCount eq 0 >
    < class p 'paragraph' = > No Records Found < /p >
    < class p = "pageheight" > < / p >
    < class p = "pageheight" > < / p >
    < cfelse >


    < class p = "submitmessage" > records found - < cfoutput > #getStudentsDataRet.Recordcount # < / cfoutput > < / p >
    < table width = "98%" border = "1" cellpadding = "3" cellspacing = "0" style = "" border-collapse: collapse "bordercolor ="#000000"align ="center">"
    < class tr = "steptext2" bgcolor = "#999999" align = "center" >
    < td width = "10%" > Student ID < table >
    < td width = "9%" > name < table >
    < td width = "9%" > name < table >
    < td width = "5%" > GPA Cum < table >
    < td width = "5%" > account # < table >
    < td width = "5%" > < table > amount
    < td width = "20%" > account # | Dist Code | Scholarship name < table >
    < /tr >

    < do action = "updateAward.cfm" method = "post" name = "AwardForm" > "
    < cfoutput query = "getStudentsDataRet" >
    < cfif eq x 0 and x neq getStudentsDataRet.recordcount >
    < cfset x = 1 >
    < cfelseif x neq (getStudentsDataRet.recordcount + 1) >
    < cfset x = x + 1 >
    < / cfif >
    < class = "paragraph" tr >
    < td > #StudentID # < table >
    < td > #lname # < table >
    < td > #fname # < table >
    < td > #GPA # < table >


    < cfif AwardStatus eq 2 >
    < name cfquery = "getStudentsScholar" datasource = "#application. DSN #">"
    Select Code, Tbl_Scholarships.id, AcctNum, scholarships
    of Tbl_Scholarships, Tbl_DistCode
    where Tbl_Scholarships.DistCode = Tbl_DistCode.id
    and Tbl_Scholarships.ID = #getStudentsDataRet.ScholarshipID #.
    < / cfquery >
    < / cfif >
    < td >
    < select name = "" scholarshipID_ #X # "onChange =" showMessage_ #X #(this.options[this.selectedIndex].value) ">"
    < option value = "" > < / option >
    < cfloop query = "getScholarshipRet" >
    < option value = "" #id # "selected < cfif getStudentsDataRet.ScholarshipID eq id > < / cfif > > #AcctNum # < / option >"
    < / cfloop >
    < / select >
    < table >
    < td > < input name = "" amount_ #X # "type ="text"size ="5"< cfif amount gt 0 > value = ' #NumberFormat (amount, 99.99) # ' < / cfif > / > < table >"
    < td > < cfif AwardStatus eq 2 > #getStudentsScholar.AcctNum # | #getStudentsScholar.Code # | #getStudentsScholar.Scholarship # | #getStudentsDataRet.ScholarshipID # < / cfif > < table >
    "< input name =" "IndexID_ #x #" type = "hidden" value = "#SSID #" / >
    < /tr >
    < / cfoutput >
    < cfoutput > < input name = "CounterX" type = "hidden" value = "" #getStudentsDataRet.RecordCount # "/ > < / cfoutput >"
    < b >
    < td align = "center" colspan = "11" height = "50" valign = "middle" > < input name = "Submit" type = "submit" value = "Submit" / > < table >
    < /tr >
    < / make >
    < /table >
    < / cfif >

    the syntax is: getStudentsDataRet.ScholarshipID [1]

    where '1' is the line number to specify

  • SUMIFS numbers for two conditions does not

    I'm trying to calculate totals based on the months using a SUMIFS, and I can't for the life of understand me

    I have income coming and based on it called the category and the date of receipt, I want to calculate totals for a given month.  Here is my table and some test values

    But this formula does not work to calculate revenues for January

    If I do the only condition for "Trade Mission", the formula works, but when I add the second condition to test if a date month January it does not work.  Help, please

    I don't think you can use the "MONTHS (Q1 Ledger::B2:B47).

    you will need to make the values in B2 thru B47 be month values 1-12

  • Automatically set to the Date and time does not

    Date and time settings on my iPad Air set them automatically does not work? When I turn it out it will allow me to choose a city (Knoxville).

    When I turn it on with (location settings) it just turns and turns?

    Any ideas?

    Hello and welcome to Apple Support communities,

    This problem may be caused by a number of things, most often the cause is the device not being able to contact the time server. Here are the instructions from Apple supported for this problem, as well as a link to the appropriate article.

    Follow these steps, after each step:

    1. Make sure you have the latest version of iOS.
    2. Automatically turn on set in settings > general > Date & time. This will automatically put your date and time based on your time zone.
    3. Make sure that your time zone is set correctly. Tap Settings > general > Date & time > time zone.

    If you still have any questions affecting your date, time, or time zone, you can automatically disable in the settings > general > Date & time and manually set the time and time zone. Or contact your carrier.

    The option to enable the value automatically may not be available in all countries or all shells.

    If the time on your iOS device does not go after a sync with your computer, the computer may be time wrong. Check the time on your computer in system preferences > Date & time. You can select "Set date and time automatically."

    Support the Article HT203483

    Get help with the date and time on your iPhone, iPad and iPod touch - Apple Support

    Of course, if the time of your carrier server cannot connect the other option is to manually set the date and time until the carrier server are again available.

    Hope you helps out.

    Kind regards

    Peter.

  • How can I get rid of a popup telling me I have a virus Zeus.  It locks my screen and try to "erase the history and data, etc." does not work.

    I need help with a popup that locks the screen of my iPadAir2.  Go to the setting and compensation history/data does not work.

    If you have deleted the historical data and Safari Web site, and nothing is resolved, the problem is on the wireless router. Check your router wireless for possible violations.

Maybe you are looking for