internal problem in a query order by clause

Hello...

I have an update statement with a select clause simple present form of inner query...

(select col1 from table1 where col2 = 'abc' and rownum = 1 order by col3 desc)

Since it is an internal application, this is why I can't delete the square brackets.

COL3 can be 0 or 1 (1 can only happen once... 0 can be several times)
My goal is to retrieve the record if the col3 is 1
If is not 1, then it will get the first album with col3 = 0... that's why I put order by col3.
Furthermore, I don't want that one folder, that's why I put rownum = 1.

but it fails with 'missing right parenthesis.

Help, please...

Hello

Don't forget that the ORDER BY clause is applied last, when the WHERE clause is complete, then when you way

WHERE     ROWNUM = 1
ORDER BY  col3    DESC

in the same auxiliary request, you are choosing a line (arbitrarily) and then "sorting" only one line.

Here's a way to get the desired results:

(
     SELECT     col1
     FROM     (
               SELECT  col1
               ,     ROW_NUMBER () OVER (ORDER BY  col3  DESC)
                              AS r_num
               FROM     table1
               WHERE     col2     = 'abc'
               AND     col3     IN (0, 1)
          )
     WHERE     r_num     = 1
)

Depending on how it is used in your query completed, there may be better ways to achieve the same results.

Tags: Database

Similar Questions

  • Problem with order by clause

    Hai all,

    I have problem with order by clause,

    My query is

    "Select number from table1 order number CSA.

    and the output as

    1
    10
    12
    13
    15
    17
    19
    2
    20
    21
    22
    .
    ........

    But if we give the order that it should display below the only good?

    1
    2
    10
    12
    13
    15
    17
    19
    20
    21
    22 ........

    Help me please why it is not displayed as she. and how to make the statement to display as in the second case. Thanks in advance.

    Kind regards
    Uraja

    In your table, the column is VARCHAR2 data type.

    It is a string, even if it is to store numeric values, it will get condemn as strings

    Try the below

    select your_column from table1 order by to_number(your_column) asc 
    

    Published by: JAC on November 19, 2012 16:35

  • Problem in the SQL because of the order by clause

    Hi all
    I am facing a problem in a sql query. I use Oracle 10 g 2.
    Query is given below:
    SELECT t1.ename
            FROM T1, T2
           WHERE T1.EMPNO = 1234
             AND T1.ACCOUNTNO = T2.ACCOUNTNO
             AND T1.SEQ = T2.SEQ
           ORDER BY T2.SEQ
    The query Plan is:
    .----------------------------------------------------------------------------------------------------
    | Id  | Operation                     | Name                 | Rows  | Bytes | Cost (%CPU)| Time     |
     ----------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT              |                      |     2 |   218 | 11716   (1)| 00:00:41 |
    |*  1 |  TABLE ACCESS BY INDEX ROWID  | T1                   |     1 |    89 |     1   (0)| 00:00:01 |
    |   2 |   NESTED LOOPS                |                      |     2 |   218 | 11716   (1)| 00:00:41 |
    |*  3 |    TABLE ACCESS BY INDEX ROWID| T2                   |     2 |    40 | 11715   (1)| 00:00:41 |
    |   4 |     INDEX FULL SCAN           | PK_T2_SEQ            | 58752 |       |   122   (5)| 00:00:01 |
    |*  5 |    INDEX RANGE SCAN           | FK_ACCOUNTNO         |     3 |       |     0   (0)| 00:00:01 |
     ----------------------------------------------------------------------------------------------------
    Now, I want to reduce the time of this request.

    If I remove order by clause query that the query performance is quite perfect, but with order by clause its take time.

    I already set SORT_AREA_SIZE, but still nothing improves.

    Welcome and thank you for your suggestions.

    Thank you

    Published by: BluShadow on June 23, 2011 07:55
    addition of {noformat}
    {noformat} tags and formatted explain plan to make it readable.  Please see {message:id=9360002} for details on how to post code and data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    Hey, a quick test, try:

    select ename from (
    SELECT t1.ename, T2.SEQ
    FROM T1, T2
    WHERE T1.EMPNO = 1234
    AND T1.ACCOUNTNO = T2.ACCOUNTNO
    AND T1.SEQ = T2.SEQ
    and rownum > 0)
    ORDER BY SEQ
    

    Amiel Davis

  • I have some problem in my query to sql server. If I press f5 to run it opens to record dialogue area nd do not run (I don't get successful... orders etc). Please help me

    I have some problem in my query to sql server. If I press f5 to run it opens to record dialogue area nd do not run (I don't get successful... orders etc). Please help me

    Hello

    SQL Server is not supported in these forums. I suggest that you ask your question again in one of the forums dedicated to Microsoft for him here:

    http://social.technet.microsoft.com/Forums/en-us/category/sqlserver .

    Thank you.   :)

  • order by clause union in date column

    Hi gems... good evening...

    Oracle version: 11.2.0.2 EL6 Linux server

    I have a query as below:

    Select col1, col2, col3 col4
    tab1, tab2, tab3
    where the conditions
    Union
    Select col1, col2, col3 col4
    tab1, tab2, tab3
    where the conditions
    Union
    Select col1, col2, col3 col4
    tab1, tab2, tab3
    where the conditions;

    Now the col4 is a date column, and I need to order by on that entire result sets. I know that I can do (order of col4) (order by 4) or at the end of all of the query.

    But the problem is that the output is coming to Mon-dd-yyyy (i.e. 31-Dec-2012).

    I want each output in the format dd/mm/yyyy, so I need to use the function to_char.

    But in this case, I can't use the order by clause, because in this case it's get organized by character IE by 1,2,3,4,5 like that.

    How can I solve my problem... Please help... Thanks in advance.

    Published by: gogol on 3 November 2012 08:05

    Maybe - when you order by date column, she did it with a date internal representation so on exit you can use any date format you think appropriate

    select distinct
           col1,col2,col3,col4
      from (select col1,col2,col3,col4
              from tab1,tab2,tab3
             where conditions_1
                or conditions_2
                or conditions_3
           )
    

    Concerning

    Etbin

  • ORDER BY clause with an expression

    As the column of names and table name is valid, what happening internally when the query is executed?

    SQL > SELECT STU_ID, STU_NAME FROM to STUDENT BY 2 + 3, STU_ID;

    What I discovered, was that the lines get sorted by ascending order of STU_ID. It is obvious that he does not know the expression 2 + 3, so my doubts are:

    (a) is he adding a pseudo-column to the table with 2 + 3 get discounted at 5?

    Select (b) if there is a 5th column among students of the table and specify us it in the select statement of the list (5 column names) then why not consider as 5 and sort the data according to that?

    (c) it is true that, any expression that we write is getting evaluated to null? Then - what is ORDER BY NULL refers to any order and if the Analyzer search name column or next position (if specified)?

    (d) If neither of the two, so what is the reason of ignorance?

    Hello

    Welcome to the forum!

    987236 wrote:
    As the column of names and table name is valid, what happening internally when the query is executed?

    SQL > SELECT STU_ID, STU_NAME FROM TO STUDENT BY 2 + 3, STU_ID;

    What I discovered, was that the lines get sorted by ascending order of STU_ID. It is obvious that he does not know the expression 2 + 3, so my doubts are:

    b is a pseudo-column adding to the table with 2 + 3 get discounted at 5

    There is no column pseduo involved. (Pseudo-colonnes are something that Oracle provides to you, without requiring you to specify what you want. Include ROWID and LEVEL pseudo-colonnes. In this example, 2 + 3 is an Expression . Like the pseudo-colonnes, expressions can usually appear in the ORDER BY clause, even if they are not actually stored in the table.)
    It is the first sort by the NUMBER 5 (= 2 + 3), not the 5th column. Since the NUMBER 5 has the same value on every row, every row relates to the forefront. The result of sorting by any constant is the same; the results are the same that besides as exrpression in the ORDER BY clause. This is the clause ORDER BY, that you have published is equivalent to

    ORDER BY  2 + 3
    ,         'foo'
    ,         SYSDATE
    ,         NULL
    ,         stu_id
    

    and this is also equivalent to

    ORDER BY  stu_id
    

    None of the expressions except stu_id vary from one line to the other, then none of them affect sorting.

    Select (b) if there is a 5th column among students of the table and specify us it in the select statement of the list (5 column names) then why not consider as 5 and sort the data according to that?

    As Solomon replied only literal numbers are taken to refer to a column. 5 is a literal number, then

    ORDER BY  5
    

    means "Sort by the 5th column", but 2 + 3 is not a literal (that is an expression that happens to include a couple of literals), so

    ORDER BY  2 + 3
    

    does not refer to the 5th colunmn.

    (c) it is true that, any expression that we write is getting evaluated to null? Then - what is ORDER BY NULL refers to any order and if the Analyzer search name column or next position (if specified)?

    No, when you way "ORDER BY x", the rows with values of x which come first, followed by the lines with higher values of x. lines having the same value of x will be together, in no particular order with respect to the other (unless there is an expression of failure later in the clause ORDER BY.
    This is exactly what happens when you say "ORDER BY NULL". NULL has the same value (in fact, the same lack of any value) on all lines, so all rows have the same value of x, and they will appear in no particular order.

    (d) If neither of the two, so what is the reason of ignorance?

  • Problem with instruction box (order by case expression)

    Hi friends, I'm stuck in a strange problem. My query is like below

    OPEN FOR Cursor_prnt_req
    SELECT
    LTRIM (to_char (sprq.stit_numb)). ' - ' || substr (IH. (Name, 1, 35).
    sprq.event_key,
    sprq.planogram_key,
    TO_CHAR (sprq.request_date, 'HH12:MI:SS') requested_time,-asked on time
    TO_CHAR (plano2.desc2) desc2,-department
    TO_CHAR (plano2. Desc4) desc4,-in subcategory
    CASE)
    SELECT sp.status
    OF v1sprq01 sp
    WHERE sp.event_key = sprq.event_key
    AND sp.planogram_key = sprq.planogram_key
    AND to_char (sp.request_date, 'YYYYMMDD') = to_char (sprq.request_date, 'YYYYMMDD')
    AND ROWNUM = 1
    ORDER BY sp.status ASC
    )
    WHEN 'R '.
    THEN "ready."
    WHEN 'P '.
    THEN 'print '.
    WHEN THE A '
    And THEN "pattern".
    Status of END,
    CASE)
    SELECT count (DISTINCT planogram_key)
    OF v1sprq01
    WHERE stit_numb = sprq.stit_numb
    AND to_char (request_date, 'YYYYMMDD') = to_char (sprq.request_date, 'YYYYMMDD')
    )
    WHEN 1
    THEN "N".
    ELSE 'Y '.
    END dual_sited
    (
    SELECT MAX (request_date)
    OF v1sprq01
    WHERE event_key = sprq.event_key
    AND planogram_key = sprq.planogram_key
    ) latest_requested_time,.
    CASE sprq.status
    WHEN THE A '
    THEN "N".
    ELSE 'Y '.
    Printable END
    Of
    v1sprq01 sprq,
    dplapro1.ix_spc_planogram plano2,
    dplapro1.ix_spc_product ih - Ver 1.1
    WHERE sprq.event_key = plano2.dbkey5
    AND sprq.planogram_key = plano2.dbkey
    AND sprq.status IN ('R', 'P', the from ')
    AND sprq.stit_numb = ih.ID
    AND sprq.store_key = p_dbstorekey
    AND to_char (sprq.request_date, 'YYYYMMDD') = to_char (SYSDATE, 'YYYYMMDD')

    UNION

    SELECT
    LTRIM (to_char (sprq.stit_numb)). ' - ' || NVL (substr (IH. ((Name, 1, 35), cm).
    sprq.event_key,
    sprq.planogram_key,
    TO_CHAR (sprq.request_date, 'HH12:MI:SS') requested_time,-asked on time
    "& nbsp" desc2,-Department
    "& nbsp" desc4,-in subcategory
    "No direct Plan."
    N AS dual_sited,
    (
    SELECT MAX (request_date)
    OF v1sprq01
    WHERE event_key = sprq.event_key
    AND planogram_key = sprq.planogram_key
    ) AS latest_requested_time,
    "N" AS printable
    Of
    v1sprq01 sprq
    LEFT OUTER JOIN dplapro1.ix_spc_product ih - Ver 1.2
    WE (sprq.stit_numb = ih.ID)
    WHERE sprq.status = ' don't
    AND sprq.store_key = p_dbstorekey
    AND to_char (sprq.request_date, 'YYYYMMDD') = to_char (SYSDATE, 'YYYYMMDD')

    ORDER BY
    requested_time DESC,
    desc2 CSA,
    Desc4 CSA,
    latest_requested_time / / DESC
    ;

    When I compile my inner... I get an error ORA-00936: lack of expression (it points to the first case statement) but when I take the ORDER BY clause, it works very well.

    Can ne1 plz help (I tried google, but which did not help at all)

    Hey Suman,

    Order preference allows for the display of your need, or to access the data in a cursor in your SQL, a sort order is not necessary in cases and case statement does not support order them by in anyway.

    * 009 *.

  • Break the order of substitution of my ORDER BY clause

    Hi Experts,

    I've created a report in Oracle 6i where I receive the ORDER BY clause at run time. And in the datamodel application, I use a lexical to tell parameter, column selected in the parameter order.

    The problem facing me, during execution, the ORDER BY clause is ignored by the report, and takes the column mentioned with the order break property as "Crescent" sort by this column.

    I'm not able to set the order property of break None for all columns, as Builder's mistake out asking me to have at least one column Asc or Desc value!

    Anyone know this problem before? Is there anyway to get rid of this and use the report by columns in the ORDER BY clause.

    Please note: I tried an explicit BY < columnname > ORDER in the query data model, but again the report uses the value of the mentioned pause command and sorts by that column.

    Appreciate your help on the same.

    Thank you!

    Hello

    There is a simple rule, how it works. For each query, you have one or more groups (hierarchical) in the data model. For the lowest group ORDER BY is selected for sorting and for groups, not be the lowest group, the ORDER of ROMPRÉ is chosen (and vice versa ignored).

    Concerning
    Rainer

  • How to remove the Order By clause

    How can I get rid of the Order By clause in the underlying SQL query? I created a simple hierarchy, but when I use the hierarchy in the analysis and then come down, the results show multiple occurrences of each child. For some reason, I was able to reduce the number of occurrences of each child by adding a saved filter.

    I was expecting this:

    Expected.jpg

    Instead, I got this:

    Actual.jpg

    The generated physical query looks like this:

    SET VARIABLE QUERY_SRC_CD = "report"; SELECT s_0, s_1, s_2, s_3, s_4 s_5, (FROM s_6)

    SELECT

    s_0 0,.

    CAST (NULL AS VARCHAR s_1 (1)).

    "Registration - College". «Dimensions of the inscription '.» "' Exercise ' s_2,.

    'All the colleges' s_3,.

    IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_4 all Colleges").

    MOUNT s_5 (NULL AS DOUBLE),

    "Registration - College". "" Counties of schooling. "" Full-time student "s_6

    "REGISTRATION - College".

    UNION ALL

    SELECT

    1 s_0

    "Registration - College". «Dimensions of the inscription '.» "" Name of College "s_1,.

    "Registration - College". «Dimensions of the inscription '.» "' Exercise ' s_2,.

    'All the colleges' s_3,.

    IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_4 all Colleges").

    IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_5 College ').

    "Registration - College". "" Counties of schooling. "" Full-time student "s_6

    "REGISTRATION - College".

    WHERE

    ("Registration - College". «Dimensions of the inscription '.» ("' Exercise ' IN ('201213')) AND (IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". (("' Colleges ') (1))

    ) djm ORDER OF 1, 3 ASC NULLS LAST, 4 ASC NULLS FIRST, 5 ASC NULLS FIRST, 2 ASC NULLS FIRST, NULLS FIRST CSA 6

    EXTRACT FIRST 10000000 LINES ONLY

    HI mbengue,.

    Check the report you are running any column presentation sorted in the user interface (in which case the order by clause will creep into generated sqls Physics). Also, I think that its worth it to check the settings of the hierarchy you have configured and if the installation program for the calculation of the measured column (number of students in this case), has been done correctly.

    Kind regards

    Arko

  • How does the order by clause in oracle 10G?

    Hi This is my table called Master.I want to order by sno. so I run the below mentioned query.

    SNO DESC STIME, ETIME CCODE ADD SID

    11 11 11 1 10 s11

    1 1 s1 09:00 12:00 10

    2 2 s2 06:00 07:00 9

    3        3      S3        9:00       23:00                         0

    SELECT * FROM MASTER BY SNO

    SNO DESC STIME, ETIME CCODE ADD SID

    1 1 s1 09:00 12:00 10

    11      11         s11        11             1              10

    2         2         s2           6:00        7:00           9

    3         3         S3           09:00     23:00                        0

    but I had bad results. Help kindly me.i can't understand how the order by clause is fetching the record.

    Hello

    Most probably because that SNO is not digital, but a tank.

    If it contains a number onlly, try

    SELECT * FROM MASTER BY TO_NUMBER (SNO);

  • Order By clause does not

    I have a very basic SQL statement that I am running on a simple table of three columns. I just want to choose two of the three columns basing selection on a column, then rank each other. I use version 9.2.0.1.0 and I tried to use sqlplus and toad 10.6 and the results are the same in both. My problem is that even if I use an Order By clause the results not be sorted. I have countless statements written and never had a problem with the Order By clause before. I'm puzzled.

    Executed SQL statement:

    Select COL3 From Table1 where COL2 = 1 Order By COL3;

    Result:

    DXXXXX
    NXXX Mxxx/Cxxxx CXXV
    Nzzzz Ezzzz
    Oxxxxxxxxxx Exxxx
    Rxxxxxxxxx Exxxx
    Sxxxxxxx Exxxx
    Sxxxxxx Hxxx
    gxxxxxxx

    You should know that I replaced everything except the first letter of each letters to alter woth Word. There's nothing remarkable about the table:

    Executed SQL statement:

    DESC Table1;

    Result:

    Table1 TABLE:
    Name                                      Null?    Type
    ----------------------------------------- -------- ----------------------------
    COL1                                                   NUMBER
    COL2                                                   NUMBER
    COL3 VARCHAR2 (255)

    Hello

    Use this...

    Select COL3 From Table1 where COL2 = 1 Order By LOWER (COL3);

    It should work once you order by the case-based.

    When you view, its up to you, if you want to use all the conversions of case or not

  • Problem with the case where the clause

    Hello

    I want to use cases in which clause. I wrote a very simple query to test how it works. However, I always got an error message. Here's what I did.

    Select eid, firstname, lastname from employee where eid = 1 works fine

    Select eid, name, name of the employee

    where

    cases where 1 = 1 then eid = 1

    When 1! = 1 then eid = 2

    end

    I ORA-00905: lack of keyword.

    Did I miss something?

    Thank you

    Jennifer

    Hi, Jennifer.

    Why do you want to use BOX in a WHERE clause?  The wonderful thing about the CASE is that it allows you to do IF-THEN-ELSE logic.  In a SELECT clause, or an ORDER BY clause, this is really useful, but the WHERE clause already allows you to use the IF-THEN-ELSE logic.

    However, if you use the BOX in a WHERE clause, it is as it does nowhere else.  Always BARGAIN instead of a single expression in a SQL data types.  All the clauses THEN (and ELSE, if there is one) must return a single expression, such as the NUMBER.  (There is no BOOLEAN data type in SQL).  So, you can use a CASE statement like this:

    ...

    CASES WHERE

    WHEN 1 = 1 THEN 1

    WHEN 1! = 1 THEN 2

    END = eid

    Here, the CASE expression takes the place of a NUMBER.

    However, if I was not sure if 1 = 1 or not, I would write the condition in this way, without a CASE expression:

    WHERE (1 = 1 AND eid = 1)

    OR (1! = 1 AND eid = 2).

  • sys_context and order by clause

    Hi all

    IM using Oracle 11 g R2.

    Is it somehow possible to use the context variable (to store the column name) in the ORDER BY clause? My ultimate goal is to build by Order at run time, without using the concatenation.

    for example, I created context as my_ctx for some pkg and its variable as v_ctx with a value defined as 'TABLE_NAME '.
    So it is possible to use it as

    Select * from all_tables
    sys_context order ('my_ctx', 'v_ctx');

    If not, does perform a work around?

    Thank you
    Vivek

    Hi, Vivek,

    Vivek says:
    Hi all

    IM using Oracle 11 g R2.

    Is it somehow possible to use the context variable (to store the column name) in the ORDER BY clause? My ultimate goal is to build by Order at run time, without using the concatenation.

    Of course, you can use SYS_CONTEXT in an ORDER BY clause, but it is unclear what you are trying to do, so I don't know if SYS_CONTEXT will help you.

    for example, I created context as my_ctx for some pkg and its variable as v_ctx with a value defined as 'TABLE_NAME '.
    So it is possible to use it as

    Select * from all_tables
    sys_context order ('my_ctx', 'v_ctx');

    If not, does perform a work around?

    Post a full test script Hat people can run to recreate the problem and test their ideas. Show the output you want from the parameters a data you give.

    Consider using a CASE expression in the ORDER BY clause. You can use SYS_CONTEXT in the expression BOX, if you wish.

  • Problem with Oracle Sales Order form customization

    Hi all

    We have a problem in the sales order form customization. Here we try to customize three field based on the type of order

    Scenario:

    NAV-> Oredr management type Super User-> commands, returns-> sales orders-> order-> standard

    In this type if we are sailing to the lines, he should ask the following fields as required
    (Nav-> Oredr management form Super User-> commands, returns-> sales orders-> others)

    1. mode of delivery
    2. conditions related to the transport
    3. priority shipping of


    NAV-> Oredr management Super user-commands, returns-> sales > orders-> order-> Bill only & internal RMA type


    then he must navigate to line items without asking these three fields.

    For this, we have made the following customization grace-> Diagnostics-> Custom Code-> customize

    Level-> shape
    Activated-> Yes

    Condition

    Triggering event: When-validate-registration
    Trigger object: order
    Condition: (: ORDER.) ORDER_TYPE not like '% INTERNAL') and (: ORDER.) ORDER_TYPE do not like ' % BILL %') and (: ORDER.) ORDER_TYPE not like '% RMA')

    Processing mode: both
    level: site


    Actions

    SEQ:10
    type: property
    Description: Make required field
    language: all
    activated: Yes

    object: article type
    target object: ORDER. SHIPPING_METHOD
    property name: REQUIRED
    value: TRUE

    Actions

    SEQ:10
    type: property
    Description: Make required field
    language: all
    activated: Yes

    object: article type
    target object: ORDER. Terms of freight
    property name: REQUIRED
    value: TRUE



    Actions

    SEQ:10
    type: property
    Description: Make required field
    language: all
    activated: Yes

    object: article type
    target object: priority ORDER.shipment
    property name: REQUIRED
    value: TRUE


    Problem

    If the order type is standard the following fields should be mandatory without these fields, that it shouldn't navigate to line items

    1. mode of delivery
    2. conditions related to the transport
    3. priority shipping of

    If the ordar enter as the Bill only or internal or RMA

    1. mode of delivery
    2. conditions related to the transport
    3. priority shipping of

    not required must navigate to line items

    to do this, we made three customization for these three fields as mentioned above

    but the problem is

    When we first select the type of ordar like Bill only or internal or RMA, he works as expected the gall sare not obligatory the without closing the form, if we choose the command type as standard so if I try to navigate lines it is not afford without going into the three areas. But incase we first select the standard type order then we navigiting to the lines is not allowing us without going into these three fields as expected. Therefore, the problem is without closing the form now we changed the command type as Bill alone or internal or RMA now also these fields stay as mandatory is the question.

    Hope, the problem is clear to you all.

    If somone can help to solve this as soon as POSSIBLE, we would be grateful to you.

    Thanks in advance

    Kind regards
    CSK

    Rather than make the fields required, why not you just popup a message of error if the shipping_method is empty.

    If the personalization will look like this
    => trigger when-validate-record
    condition => (: ORDER.) ORDER_TYPE not like '% INTERNAL') and (: ORDER.) ORDER_TYPE do not like ' % BILL %') and (: ORDER.) ORDER_TYPE not like '% RMA') and (: order.shipping_method is null)

    action-online error-online you cannot save this record mode of delivery is not met.

    You repeat this customization for priority, but also the conditions related to the transport.

    Hope this helps,
    Sandeep Gandhi

    PS: Another option is to use two times-news-registration-Forum customizations. The first is the required fields if the order type = STANDARD.
    And the second customization if required fields is not the order type! = STANDARD. Since you do not have this second customization, the fields remain necessary even when you select a type of STANDARD command.

  • Evaluate the Expression in the order by Clause

    Hello

    I'm struggling to run after JPQL.

    Select r.firstname, r.lastname, (e.distance/e.duration) from Runner r Inner Join r.event e Order BY (e.distance/e.duration) Desc;

    Error suggests that ' (' character is unacceptable in the Order By Clause.) Here is the error.

    javax.servlet.ServletException: java.lang.IllegalArgumentException: an exception occurred while creating a query in EntityManager:
    Description of the exception: syntax error parsing the query [Select r.firstname, r.lastname, (e.distance/e.duration) of Runner r Inner Join r.event e Order BY Desc (e.distance/e.duration);], line 1, column 101: unexpected token [()].
    Inner exception: NoViableAltException (81! = [1328:1: orderByItem returns [object node]: (n = stateFieldPathExpression (a = ASC | DESC = d |) | I = IDENT (a CSA = | d = DESC |)) ;])])

    Can someone show me please how to fix it.

    Thank you
    Adam

    What version do you use? It should work in EclipseLink > 2.1.

    ---
    James: http://www.eclipselink.org

Maybe you are looking for

  • What snap is "Java Script"?

    Suddenly this morning I receive a message that Java Script is not enabled. I am not able to access Yahoo! mail, Gmail or iCloud mail. When I search for "Java Script" I get 300 + add-ins, the top 50, or appear not to be simply Java Script. What is the

  • web to print HP does not work for the latest version of firefox

    It is supposed to be a plugin firefox for printing web hp. This plugin is always obsolete. versions of the Firefox browser are updated fairly often and can be found at FTP://FTP.Mozilla.org/pub/Firefox the night is what would be the latest daily buil

  • Can't get into hotmail for two days - HELP! Says: Server error

    For the last two days when I try to log into my hotmail account it appears In the Application Server error ' / '. Runtime Error Description: An application error occurred on the server. The current settings of error customized for this application pr

  • BBM MDS error

    I installed the BBM MDS Simulator and configured to use unlimited level encryption. The MDS Simulator starts just fine, and I can access the internet on my simulators. However, I can't get the two simulators to add each other as Contacts BBM. On the

  • Lost administrator permissions

    As nobody seems to have an answer to this problem or many other similar posted. I guess I have no choice but to re - format the hard drive and reload everything which will take at least three days. Looks like early windows days are back! CAN ANYONE T