Validation of PL/SQL expressions

Hello
I've been testing and testing the comparison of two fields. I created a Validation but, for some strange reason, it works when it wants to. Its a bit crumbly...
Posting type: PL/SQL Expression
< code >
(: P1_FIELD1) > = (: P1_FIELD2)
< code >
Associated point: P1_FIELD2
Condition: Save(Apply Changes)
This code simple comparison works when he wants to, Field2 cannot be superior to field1. When I modify all records the data sometimes I can apply changes and other times I get the error message. Is there a better way to compare two fields numbers or perform validations?

TO_NUMBER(:P1_FIELD1) > = to_number(:P1_FIELD2)

In addition, because the values must be numeric, add validations to fire before this one to ensure that they are digital.

Scott

Tags: Database

Similar Questions

  • Validation of an sql expression

    Hello

    I use Forms 10.2.0.1.0 Oracle and Oracle Database 10g.

    My request was given the option to the user to create sql expressions and get the result true or FAlLSE.
    Is it possible that I could validate the expression to make sure that the syntax is correct. ?

    If the user selects the table as emp
    emp_no and salary are column in the emp table

    and the created expression is count (emp_no) * salary > 1000

    I'll use it in if else statement returns true or false
    That is to say
    If count (emp_no) * salary > 1000 then
    Returns True
    on the other
    return the value False;
    end if;


    Can someone suggest me a way to evaluate the expression generated by the user is syntactically correct or not

    Published by: user8783669 on December 16, 2009 01:23

    Analyzing a SQL query has nothing to with the compilation of a database stored procedure/function.
    The thing I gave you is only to analyse a SQL command.

    François

  • Field validation through pl/sql returning a Boolean

    Hello

    I do a validation of date entered based on a value in the other field of the form.  The function returns Boolean values (TRUE / FALES) based on the date of entry if it falls within the specific range of dates.

    Here is the example.

    img 2.png

    However, after sending them, I get the error message like -.

    Processing of validation error.

    ORA-06550: line 1, column 44: PLS-00221: 'F_CHECK_DATE' is not a procedure or is undefined ORA-06550: line 1, column 44: PL/SQL: statement ignored

    I'm doing something wrong here?  Help, please.

    Thank you

    -Anand

    anand_gp wrote:

    Hello

    I do a validation of date entered based on a value in the other field of the form.  The function returns Boolean values (TRUE / FALES) based on the date of entry if it falls within the specific range of dates.

    Here is the example.

    However, after sending them, I get the error message like -.

    Processing of validation error.

    ORA-06550: line 1, column 44: PLS-00221: 'F_CHECK_DATE' is not a procedure or is undefined ORA-06550: line 1, column 44: PL/SQL: statement ignored

    I'm doing something wrong here?  Help, please.

    Thank you

    -Anand

    The index is in the validation type: function returning a Boolean

    The expression of validation for validation of Boolean function return must be in the form of a function with at least one accessible body return statement that returns a Boolean value:

    ...

    return ;

    or

    return to_date(:p11_event_date, 'DD/MM/YYYY') > sysdate;


    in this case:

    return my_package.f_check_date(:p11_season, :p11_event_date);

    However, because the function returns a Boolean value anyway, you might as well use a validation Of PL/SQL Expression and save some typing:

    my_package.f_check_date (: p11_season,: p11_event_date);

  • Dynamic action with multiple values of PL/SQL Expression as a condition

    Hel

    I am currently using Apex 4.0 for a schoolproject.

    I have two selectlists (P8_BUSINESSRULETYPE - which has al businessruletypes) and (P8_OPERATOR) that has a select statement based on the businessruletype.

    I want to hide the selectlist operator when P8_BUSINESSRULETYPE = 7,8,9 and 10 or P8_OPERATOR = 9

    When: change

    SelectionType article (s)

    Elements P8_BUSINESSRULETYPE

    condition: equal to 10

    Real actions: hide items p8_operator

    False actions: show p8_operator items

    ConditionType PL/SQL EXPRESSION

    : P8_BUSINESSRULETYPE = 10 OR: P8_BUSINESSRULETYPE = 8 OR: P8_BUSINESSRULETYPE = 7 OR: P8_BUSINESSRULETYPE = 9

    What is the problem with my dynamic action? Because he does not hide the operatorfield when businessruletype 10 or 9 are selected in the selectlist. Sessions has also said operator = 9 and Businessruletype = 10

    I hope you guys can help out me.

    Thank you very much.

    2843640 wrote:

    Please update your forum profile with a real handle instead of '2843640 '.

    I am currently using Apex 4.0 for a schoolproject.

    I have two selectlists (P8_BUSINESSRULETYPE - which has al businessruletypes) and (P8_OPERATOR) that has a select statement based on the businessruletype.

    I want to hide the selectlist operator when P8_BUSINESSRULETYPE = 7,8,9 and 10 or P8_OPERATOR = 9

    When: change

    SelectionType article (s)

    Elements P8_BUSINESSRULETYPE

    condition: equal to 10

    Real actions: hide items p8_operator

    False actions: show p8_operator items

    ConditionType PL/SQL EXPRESSION

    : P8_BUSINESSRULETYPE = 10 OR: P8_BUSINESSRULETYPE = 8 OR: P8_BUSINESSRULETYPE = 7 OR: P8_BUSINESSRULETYPE = 9

    What is the problem with my dynamic action? Because he does not hide the operatorfield when businessruletype 10 or 9 are selected in the selectlist. Sessions has also said operator = 9 and Businessruletype = 10

    The first thing is that a Condition that is applied to a control of dynamic action if the dynamic action is made the see page. She has therefore no impact on the question of whether the actions of true or false are performed. Control conditions which are those defined in the when the properties of the dynamic action. As they are evaluated in the browser, they must be specified as JavaScript.

    Secondly, this expression is not valid because it is a space between the colon and the identifiers. Link the names of rating, the colon and the variable element must be contiguous:

    :P8_BUSINESSRULETYPE = 10 OR :P8_BUSINESSRULETYPE = 8  OR :P8_BUSINESSRULETYPE = 7 OR :P8_BUSINESSRULETYPE = 9
    

    However the latter is only of academic interest, in this case you need to remove the condition of dynamic action.

    In the dynamic of change when action section, P8_BUSINESSRULETYPE, P8_OPERATOR, Condition of JavaScript Expressionand value to the value of the item (s)

       ($v('P8_BUSINESSRULETYPE') == '7')
    || ($v('P8_BUSINESSRULETYPE') == '8')
    || ($v('P8_BUSINESSRULETYPE') == '9')
    || ($v('P8_BUSINESSRULETYPE') == '10')
    || ($v('P8_OPERATOR') == '9')
    

    If you are using a browser that supported, this can be simplified to

       (['7', '8', '9', '10'].indexOf($v('P8_BUSINESSRULETYPE')) >= 0)
    || ($v('P8_OPERATOR') == '9')
    
  • Difference between the Expression SQL and PL/SQL Expression

    Hello

    I use the value of the Pnn_ACTIVE_SECTION variable type to show and hide regions.

    Based on similar logic, I also filter or put on condition of validations of fire based on same Pnn_ACTIVE_SECTION and a few other conditions as element value is null or not null.

    What is the best way to filter.

    I used [item = value] option earlier and after a few lights, now I use SQL EXPRESSION that according to me is not otherwise effective than PL/SQL EXPRESSION.

    Is this correct? Or who make no difference on the performance of application? I have at least 7 forms and about 100 postings by form (especially the function that returns the error text for the club of multiple postings on the same point in a validation)

    Based on the reviews of the forum, I'll turn in my application.

    Does not say that at all. It says that they are different and use another language (SQL or PL/SQL). It is not about performance.

    My first post is yet - maybe you should reread.

    See you soon

    Ben
    http://www.munkyben.WordPress.com
    Don't forget to mark the answers useful or correct ;)

  • How to skip the installation of SQL Express 2005 and using SQL Express 2008 instead?

    I have SQL Express 2008 is installed and you want to use instead of SQL Express 2005.

    How to configure the installation of Lookout as he ignores the installation of SQL Express 2005?

    Are there other measures that must be taken so that Lookout can work properly with SQL Express 2008?

    Thank you.

    OK - it worked.

    However, for 64-bit installations, I had to use the WOW of SQL Express 2008 versions, because, the Citadel is a 32-bit database and installation of 64-bit native versions would not allow an upgrade of the Citadel of Instance.

    Thank you.

  • SQL Express 2005 on XP Windpows

    I got this error when I try to install SQL Express 2005; http://pastebin.com/h0MyrzyG

    SUPPORT IS LOCATED IN THE SQL SERVER FORUM:
    http://social.msdn.Microsoft.com/forums/en/category/SQLServer

  • SQL Express?

    I'm having a problem where there is no data other than the current day Net traffic. Support told me to the default database that is included with the software is not supported in production (ridiculous if you ask me).

    They asked me to upgrade to SQL Standard or Enterprise. For the sake of money I would use rather not one of these.

    Does anyone know if SQL Express is supported?

    Thanksw

    -Evan

    According to support SQL Express is not supported.

  • SQL Express LocalDB Path missing until reboot

    We have just upgraded one of our Installer components required for SQL Express LocalDB 2014 (SP1) since the 2012 version.

    The problem is that LocalDB installer does not update the path environment variable, so when the main installer try subsequently call slqlocaldb it fails because it cannot find the executable file.

    The path variable does not seem to be updated after a reboot, but the LocalDB installer does not prompt for this (and anyway it would be a pain).

    Everyone knows this? Is a workaround to enable the change of the path without a reboot?

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)

    If you give us a link to the new thread we can point to some resources it
  • Error when you try to use SQL Express 2012 import/export wizard

    When you try to use 'Import and data export' Wizard SQL Server 2012 Express with Advanced Services, I get the following error message:

    I tried everything I can think of. I tried to copy this .dll on various windows system files, by registering the .dll file, even tried to not downgrading from SQL Express 2016 until 2012... no luck, still the same problem. I tried everything on at least the first five pages of a Google search. I am running it in a box of Windows 7 Pro 32-bit. I used the x 86 version of SQL Express 2012 with Advanced Services and all the features were installed during the installation.

    Any help would be greatly appreciated.

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • VAMT 3.0 does not appear after installation of SQL Express 2012 and Powershell separately of ADK

    Hello

    I tried to install 3.0 the VAMT tool on a server for a week now and after that installation of the pre-reqs VAMT 3.0 option is gone to install.

    I installed powershell 3.0 and the guys installed DB 2012 SQL express and SQL 2008 management tool.

    It won't let me download pictures, so I guess you'll just I think the VAMT 3.0 is not displayed when I run adksetup.exe the VAMT tool tool 3.0 is not installed. I already rebooted the server.

    The only thing I can think is that I have to delete SQL and install it in pair. That is not sensible, but as Microsoft article says you can install VAMT without SQL express tool.

    My date limit is the end of this month, so any help would be greatly appreciated,

    Thank you!

    Hi Jeff,

    Thank you for your response.

    The problem is related to Powershell 3.0. As this is a complex question, you must post your query in Microsoft TechNet forums.

    You can check the link to post your question:

    http://social.technet.Microsoft.com/forums/en/category/w7itpro

    It will be useful.

  • SQL Express 2012 synchronization with SQL Server Azure

    I need to be able to periodically synchronize SQL Express 2012 running on the Surface to Azure SQL Server 2012.   Something special to know or do - because we want in synchronization with the server SQL Azure?

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums:

    http://social.technet.Microsoft.com/forums/en-us/SQLExpress/threads

  • can I open a SQL express database in SQL server express 2005 2012?

    Hello

    I have a database and it's in SQL express 2005 but because my windows 8 is not compatible with the installer, I have to install the latest installer from 2012. now, my problem is that I can't open it in the 2012 edition... What should I do?

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Vsphere 5.1 upgrade up3 one 6 up2 con DB passaggio da SQL express 2008 to 2012 STD

    Hello to all,

    prima di passare nostra infrastruttura dalla 5.1 went 6.0 ho creato di ambiente test by testament procedure di aggiornamento.

    He e vcenter server virtuale con 5.1 up3 con SQL express 2008. Visto che gli welcomes da manage saranno una dècina ho deciso di passare a 2012 e SQL standard later aggiornare alla versione 6.0 up2.

    He passaggio del database e avvenuto senza intoppi e vcenter if apre perfettamente, quindi sono passato all'aggiornamento alla versione 6.0 my dopo autenticazione (use the su Office Vcenter by access al Vclient vacation), gli script di Messa questo mi update:

    errore up6.JPG

    Verificando it tipo di e error ho letto di change the compatibility del da DB del Vcenter SQL2008 a SQL 2012.

    Ho rilanciato the update my persists it message.

    compatilbiltàsql.JPG

    Ho gia verificato sul sito Vmware is e supportato SQL 2012 con Vcenter 6.0Up2 e no, sono problemi (he mio Sql e gia SP2):

    sqlinter.JPG

    Ho anche aggiornato SQL 2012 con SP3 (che e ora con supportato Vcenter 6 UP2), my not changed nulla e ovviamente.

    MI potete dare una mano?

    Ho trovato questo KB per lo spostamento dei nodi da UN vcenter ad uno nuovo

    https://KB.VMware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalID=1004775

    Out e procedo con nuovo server there.

  • Is it possible to use the default value as sql expression in obiee 11g report?

    Hi all

    Is it possible to use the default value as sql expression in obiee 11g report?. Actually what I'm trying to make is that we send an ibot users. They want the same default values that are assigned in the command prompt in the report. So when we send the ibot it shows the report for default values assigned in the report criteria which is obsolute. As a solution, I kept the report in a dashboard page and send the dashboard like ibot page. But the problem here is that I can send only pdf format. Is it possible to do so at the level of the report (without using session variables). I want something like that

    Date between Date ' @{PV1} {Timestampadd (SQL_TSI_DAY,-90, CURRENT_DATE)} and Date ' @{PV2} {CURRENT_DATE}

    Thanks in advance

    Thank you

    AJ

    http://www.w3.org/2001/XMLSchema-instance"container ="http://www.w3.org/2001/XMLSchema"xmlVersion ="201201160' xmlns:sawx="com.siebel.analytics.web/expression/v1.1" > "

    "Question time '." Date '.

    "Question time '." Date '.

    BOX WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 1) THEN TIMESTAMPADD (SQL_TSI_DAY,-2, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 2) THEN TIMESTAMPADD (SQL_TSI_DAY,-3, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 3) THEN TIMESTAMPADD (SQL_TSI_DAY,-4, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 4) THEN TIMESTAMPADD (SQL_TSI_DAY-5 (, cast (max (CURRENT_DATE) date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 5) THEN TIMESTAMPADD (SQL_TSI_DAY,-6, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 6) THEN TIMESTAMPADD (SQL_TSI_DAY, 0, cast (max (CURRENT_DATE) as date)) WHEN (DAYOFWEEK (cast (max (CURRENT_DATE) date)) = 7) THEN TIMESTAMPADD (SQL_TSI_DAY-1, cast (max (CURRENT_DATE) date)) END

Maybe you are looking for