SQL, Qry: is the correct approach?

Hello

I use oracle 10g

create the table script
CREATE TABLE testing
(
  testcol    VARCHAR2(200 BYTE)
)
INSERT statement
insert into testing values ('10%           ')
insert into testing values  ('10% for 12 months             ')
insert into testing values ('20%                           ')
insert into testing values ('20% for 12 months             ')
insert into testing values ('Excluded                      ')
insert into testing values ('Not Included                  ')
insert into testing values ('                            ')
I want that output voltage
TESTCOL
10%           
10%
20%                           
20%
Excluded                      
Not Included                  
                            
when its 10% 12 months I should show just 10%
the value of the line is 20% for 12 months I should show just 20%

I am doing like below
select case when testcol =  '10% for 12 months             '  then '10%'
when testcol = '20% for 12 months             ' then '20%' else testcol end testcol from testing
I wanted to know if it is the most effective method?

Thanks to all in advance

Or, without regular expressions that will be faster:

SQL> select  substr(testcol,1,instr(testcol || '%','%')) testcol
  2    from  testing
  3  /

TESTCOL
--------------------------------------------------------------------
10%
10%
20%
20%
Excluded
Not Included

7 rows selected.

SQL> 

SY.

Tags: Database

Similar Questions

  • [ADF, JDec12.1.3] Which is the right approach in ADF to detect when a user leaves an inputText (or in general a UIC)?

    Hallo,

    I would like to know what is the correct approach in the ADF to run a function in a bean when the user leaves / exits a field (a form).

    In the particular case, when the user leave a field in the form, I need to call a function that executes a query using the value of the field and then fills the other 4 fields in the form.

    Thank you

    Federico

    You must implement a valueChangeListener for the inputText and also set the autosubmit to true property.

  • Dual-language web site - it's the standard approach of the industry?

    Hello

    I have a seemingly simple question to which I have an answer, but before I continue I want to make sure I do it in the way recognized by industry professionals.

    I have a website that I need to be presented in French and English for the customers. I have a professional to do the actual translation, the question is actually geared toward how to pages.

    Currently, I decided to do the following to achieve the desired result - is - what the right approach (industry standard)?

    1. build a home page in French with all navigation to web pages dedicated French

    2 build a second home page of UK in English with all the links pointing to pages in English

    3. build pages in French and English and name them site/en & site/en etc.

    4. place on every page (French or English) pointing to the English & French homepages thereby giving the user the version option to display an icon.

    Clearly the highest cost increase work load and therfore the customer for both the job site and also for making changes and future updates.

    I would appreciate your comments as to the correct approach.

    Thank you very much

    Concerning

    Rob

    1) once I have display images for the UK & French flag how do I set the $_SESSION associated with each indicator?

    Place the buttons (flags) in a form and have the action script change the value of the session variable.

    (2) on my index page you showed me how to replace the text in the navigation list (which I understand), but the CSS background image that appears in fact the text is stored in an image that changes color with each of the States. How can I handle this? I also suspect that I can replace the example of list with regular item & items on other pages to replace larger blocks of text n in the same way.

    It's always a bad idea to have the text as an image. In the case of the menu, just the highlight image. If you don't want to do that, then you will need to change the CSS selectors to include the language.

    (3) how to replace the main image on index.html, the BULK of the text in the middle of the page?

    Same as 2). It's much better to have text as an image.

    GRAMPS

  • What is the correct syntax to reference a page point (P23_ID, for example) in a process of PL/SQL page after submit?

    What is the correct syntax to reference a page point (P23_ID, for example) in a process of PL/SQL page after submit?

    TexasApexDeveloper wrote:

    Variable binding is preferred: P23_ID you can also use & P23_ID. (variable substitution notation).

    Bind variable and static text substitution references are not interchangeable. For example, static text substitution references cannot be used in allocation targets:

    :P23_ID  := 'foo';  -- valid
    &P23_ID. := 'bar'; -- syntax error (or something weird or sinister due to SQL injection)
    

    Substituting static text references should be avoided in SQL and PL/SQL code because of the risk of behavior topic SQL injection and / odd error because of values containing quotes, etc.

  • Where isi poijnter to the correct JDK 8 in my case for sql developer 4.1?

    Where isi poijnter to the correct JDK 8 in my case for sql developer 4.1? Have several JDK on this pc, 7 8, somewhere, there is a pointer

    for the right to use when installing sql developer 4.1 JDK.

    Who did. Really appreciate it.

    Need to expose this region better. Other positive results will continue in the same question.

    Especially if they do not take explicit measures to expose the hidden files and folders.

    Thanks again

  • translation vs SQL qry (best approach) table

    Hello

    I use oracle 10g

    I was wondering what would be the best approach to get the answer below.

    create table
    create table rateguaran 
    (rateguarantee        VARCHAR2(200 BYTE))
    INSERT statement
    insert into rateguaran values ('16 Months                     ')
    insert into rateguaran values ('       ')
    insert into rateguaran values ('24 months            ')
    insert into rateguaran values ('2 Years (51+ Lives)           ')
    insert into rateguaran values ('1     ')
    insert into rateguaran values ('3 years    ')
    Please note that this is how I have values in my picture

    power required:

    I need to check the number that precedes the first space. If the number is less than 5, then I need to multiply it by 12. If its null or more than 5 then leave it as it is.

    so is the output that I need to get
    16 months
    
    24 months
    24
    12
    36
    Please advice if I can do this using sql or do I create a table of conversion and get the values of the value to the translation table mapping.

    Thanks in advance.
    SQL> select rateguarantee
      2  ,      case
      3           when substr(rateguarantee, 1, instr(rateguarantee, chr(32))-1) < 5
      4           then to_char(substr(rateguarantee, 1, instr(rateguarantee, chr(32))-1) * 12)
      5           else rateguarantee
      6         end new_rateguarantee
      7  from   rateguaran; 
    
    RATEGUARANTEE             NEW_RATEGUARANTEE
    ------------------------- -------------------------
    16 Months                 16 Months
    
    24 months                 24 months
    2 Years (51+ Lives)       24
    
    1                         12
    3 years                   36
    
    6 rows selected.
    
  • SQL only: WHERE Condition pulled the correct runtime of the Central "SQL" tab

    I have a requirement that seems like it should be easy to solve in SQL, but me seems to be stuck with blinders and can't see the solution.

    The 'problem' that I'm trying to solve is to get several reporting units to any use of the SQL even in their where clause for certain types of metrics reports. So this is the solution I am proposing that we store the sql in a central table, which, in a simplified form, would have two columns as:

    GroupName Varchar2 (2000)
    SQL_Filter Varchar2 (5000)


    What I want to do conceptual, it's allow the user (even if they're using MS - SQL) to


    WHERE FunctionName (GetSQL_ForGroupName)

    But first of all, I would tell them that this can be done in Oracle sql. However, I can't understand how to achieve this end. From what I've read so far that oracle will not do:

    WHERE (subquery that returns SQL)

    or (in SQL)

    WHERE VariableSubstition

    or

    WHERE FunctionName (GetSQL_ForGroupName)

    It seems that these things in the WHERE clause allows Oracle after only

    FieldName [operator]

    as in

    WHERE price > (subquery)

    or

    WHERE ID IN (Value) Function

    Is it possible to do a subquery (or anything else) that allows me to draw the where clause running SQL - using only SQL? I can do this with a stored procedure, but it is to say it seems to me I had start coding select specific instructions for them or code so that they could enter select statements (or joins etc.). I don't want to write a complete dynamic reporting engine. I want to do is be able to pull the sql running. This ensures that everyone is 1) with the good sql for metrics 2) by using the same sql and 3) the core sql parameters can be stored in one place instead of 3000 definitions of the various reports.

    I must be looking at this the wrong way, I think. The solution does NOT seem to do WHERE (pull in the SQL running)... but I was not able to find a different way of thinking. For example, WITH does not resolve as you immediately the requirement WHERE fieldname [operator] [subquery | function]. I was browsing the internet and looking through all the books SQL on Safari of O'reilly but I have not met a solution. However, I think, this issue of 'centralization of base SQL' must have been resolved several, several times previously. Why can't I find anything on it then?

    Brad

    You might use a pipeline function to return a TABLE object. This function accepts a parameter that contains the name of the Group (although "GetSQL_ForGroupName" is supposed to represent). The query that they deliver will then look something like this:

    SELECT column_list
    FROM   TABLE(table_function('GroupName'))
    WHERE  additional_conditions
    

    In the function, you can create the SELECT statement that channels the rows in the table with WHERE conditions pulled a table for the provided group name.

  • The search syntax of SQL query against the data type varchar2 preserving valid data.

    Have a data model that we are not allowed to change and the column in question is a varchar2 (20). The column has at this stage no foreign key to the list of valid values. So, until we can get those who control the data model in order to make the adjustments we need for a SQL query that root out us bad data on the hours fixed.

    Is what we expect to be good data below:

    -Whole number, without floating point
    -Length of 5 or less (greater than zero but less than 99999)
    -Text "No_RP" can exist.

    Request demo below works most of the time with the exception of 'or Column1 is null' is not contagious in the null record. I tried to change the logical terms around, but did not understand the correct layout still provide it. So help would be greatly appreciated it someone could put me straight on how to properly register a null value in the recordset that has been selected with other types of error for end users to correct their mistakes. Another thing, I suppose there could be a better approach syntactically to a call find all offender characters such as *, &, (and so on.)

    WITH Sample_Data AS (SELECT '0' collar OF DOUBLE UNION ALL)
    SELECT "2" collar OF DOUBLE UNION ALL
    SELECT "99999" col OF DOUBLE UNION ALL
    SELECT "100000" col OF DOUBLE UNION ALL
    SELECT '1 a' collar OF DOUBLE UNION ALL
    SELECT the "ABCD" OF DOUBLE UNION ALL pass
    SELECT 'A1' collar OF DOUBLE UNION ALL
    SELECT ' *' collar OF DOUBLE UNION ALL
    SELECT "/" pass OF DOUBLE UNION ALL
    SELECT '-' col OF DOUBLE UNION ALL
    SELECT ' ' collar OF DOUBLE UNION ALL
    SELECT "pass OF DOUBLE UNION ALL
    4. SELECT 5 6' collar OF DOUBLE UNION ALL
    SELECT "24.5" collar OF DOUBLE UNION ALL
    SELECT '-3' collar OF DOUBLE UNION ALL.
    SELECT 'A' collar OF DOUBLE UNION ALL
    SELECT 'F' OF DOUBLE UNION ALL cervical
    SELECT the 'Z' OF DOUBLE UNION ALL pass
    SELECT the pass 'Bye' FROM DUAL UNION ALL
    SELECT the "Hello World" OF DOUBLE UNION ALL pass
    SELECT "=" col OF DOUBLE UNION ALL
    SELECT "+" col OF DOUBLE UNION ALL
    SELECT '_' pass OF DOUBLE UNION ALL
    SELECT '-' col OF DOUBLE UNION ALL
    SELECT ' (' col OF DOUBLE UNION ALL)
    SELECT ')' collar OF DOUBLE UNION ALL
    SELECT '&' collar OF DOUBLE UNION ALL
    SELECT ' ^' collar OF DOUBLE UNION ALL
    SELECT '%' collar OF DOUBLE UNION ALL
    SELECT the pass of "$" OF DOUBLE UNION ALL
    SELECT the pass ' # ' TO DOUBLE UNION ALL
    SELECT ' @' collar OF DOUBLE UNION ALL
    SELECT '!' collar OF DOUBLE UNION ALL
    SELECT ' ~' collar OF DOUBLE UNION ALL
    SELECT "' collar OF DOUBLE UNION ALL
    SELECT '.' pass FROM DUAL
    )
    SELECT col from Sample_data
    WHERE (translate (col, '_0123456789', '_') is not null
    or length (col) > 5
    col = 0 or
    or col is null)
    and (upper (col) <>'NO_RP');

    One more thing, I also took the approach of the regular expression, but he could not understand. If anyone knows how to do with this approach, I would also appreciate learning this method as well. Below is a close because I had. Impossible to get a range to work as "between 0 and 100000", guessing because of the comparison of varchar2 and # even attempted using to_char and to_number.

    Select to_number (column1) from the testsql where REGEXP_LIKE (column1, ' ^ [[: digit:]] + $') ORDER BY to_number (column1) CSA;

    Thanks in advance for anyone to help.

    Nick

    Hello

    Thanks for posting the sample data in a useable form.
    It would be useful that you also posted the accurate results you wanted from this data. You want the same results as those produced by the query you posted, except that nulls should be included? If so:

    SELECT     col
    FROM     sample_data
    WHERE     CASE
             WHEN  UPPER (col) = 'NO_RP'               THEN  1
             WHEN  col IS NULL                    THEN -1
             WHEN  LTRIM (col, '0123456789') IS NOT NULL     THEN -2
             WHEN  LENGTH (col) > 5               THEN -3
                                           ELSE TO_NUMBER (col)
         END     NOT BETWEEN     1
                  AND          99999
    ;
    

    The requirement that pass! = 0 gives that much more difficult. You could test easily for an integer from 1 to 5 digits, but then you must have a separate condition to make sure that the chain was not '0', '00', '000', ' 0000 'or ' 00000'.
    (Unlike Solomon, I guess that do not want to choose no-0 numbers starting by 0, such as ' 007 'or ' 02138'.)

    Using regular expressions, you may lose a few keystrokes, but you also lose a lot of clarity:

    SELECT     col
    FROM     sample_data
    WHERE     REGEXP_LIKE ( col
                  , '^0{1,5}$'
                  )
    OR NOT     REGEXP_LIKE ( NVL ( UPPER (col)
                     , 'BAD'
                     )
                  , '^(([1-9][0-9]{0,4})|NO_RP)$'
                  )
    ;
    

    Published by: Frank Kulash, December 13, 2010 21:50

    Published by: Frank Kulash, December 13, 2010 22:11
    Added regular expression solution

  • Cluster to C formatting style struct (Named pipes (Windows), OpenG implementation), best/correct approach?

    Greetings,

    I'm trying to send commands to 3rd party software, through pipes (Windows). The 3rd party software implements channels appointed for me this approach should be used. The 3rd party software returned data me through a separate set of named pipes. The pipe command accepts the following structure as input:

    typedef struct _pipe_CMD

    {

    WORD wCMD

    BYTE, Byte [2]

    } PIPE_CMD;

    An example of command shows the following values:

    wCMD = PIPE_CMD_EXAMPLE

    bYte [0] = 0 x 0001

    bYte [1] = 0

    Similarly, the exit pipe returns the following structure:

    typedef struct _PIPE_OUT_PUT

    {

    Double x

    Double y

    Double z

    } PIPE_OUT_PUT

    Question:

    What is the way to better/correct to imitate the structure of the typedef above in/to leave LabVIEW? Note that the channel named (OpenG application) for Windows takes string input (and similarly returns a string output).

    In the below attempts, I use a named pipe created by LabVIEW to test what can be read as I wrote my order for the named pipe. At this point, I was not able to get the 3 rd party software to respond to one of these commands, so I set the channel control named and listen to the output of the channel named, but I can type a channel named, successfully providing information (read only) house-keeping.

    Try 1: cast

    See Screenie 1. I threw each of the values in a string and it concatenate to send through named pipe. One of the problems here is that, in my view, type casting 0 creates a NULL character, who does not intend. The other problem is that I can not actually the 3rd party software to recognize that I sent an order!

    Attempt 2: Flatten the cluster chain

    Screenie see 2: I create a cluster and flatten it into a string to be sent by the named pipe. Here a number of characters represented is apparent in the output. Again, I fear that these are not representative of what I'm trying to send (wCmd and bYte [2]). Yet once, none charged with receipt of the 3rd party software that I sent an order.

    Thoughts:

    Should I change the channel named call library function node to accept clusters/structs to send what I want? This will break something else down the line? My "gibberish" (Screenie 3) return attempt, but same "gibberish" regardless of whether I used method 1 or 2 above, indicating that maybe I don't know how to read what is returned? (Could say "fool you, stop this")

    Thank you very much in advance for all your comments!

    Nicolai

    If your named pipes pass binary data - and it seems that they are - so don't expect to get an ASCII string. You will also need to send binary data. The wCMD is setting a WORD (2 bytes, or 16 bits) - so why do you send 15 bytes (PIPE_CMD_EXAMPLE length)? Moreover, since the data is an array of 2 elements of fixed size, it would be preferable to use a 2-element cluster for byte element, and not a picture of LabVIEW. Who's going to flatten properly, while a painting may not (depending on whether you set the flag to prepend to the size of the array). For data read back, you will need to unflatten it in a cluster of 3 values double precision, and it is possible that you will need to reverse the order of each element byte to get the correct values.

  • try to uninstall MS SQL Server 2008 the Profession of XP 64

    Has anyone experience this problem that can help?

    When I uninstall MS SQL Server 2008, I get some errors:

    (1) "input string is not in the correct format.

    (2) "there was an error trying to delete the configuration of the product that prevents any other action."  The current configuration of the product is being canceled as a result. »

    see you soon

    Hello

    Your question of Windows7 is better suited in the TechNet forums. Please post your question in the TechNet forums.

    You can follow the link to your question:
    http://social.technet.Microsoft.com/forums/en-us/category/SQLServer/

  • Incompatibility of fix SQL: installed in the PDB but not in the CDB - how to fix?

    I have a 12.1.0.1 database in which I wanted to migrate a number of PDB files in the AL32UTF character set. To do this I created a second database (temporary) with the character OK, unplugged and re plugged each PDB and ran the DMA you to migrate the PDB files - all right.

    Then, I dropped the first database and built another one with the correct character set.

    When I disconnect and reconnect the PDB from temporary to the new database, I get the PDB next violation:

    PDB_ACPT_CLONE SQL patch 19648840 offset: installed in the PDB but not in the CDB.

    This patch had been applied to the original and then rolled database before the new and temporary databases have been created.

    datapatch says:

    C:\oracle\product\12.1.0\dbhome_1\OPatch > datapatch-verb

    Patching SQL tool version 12.1.0.1.0 Wed Jan 21 09:43

    Copyright (c) 2012, Oracle.  All rights reserved.

    Connecting to the database... Ok

    Determine the current state...

    SQL patches currently installed:

    PDB CBD$ ROOT:

    PDB PDB$ SEED:

    PDB_ORCL12C OF THE PDB:

    PDB_ACPT_CLONE OF THE PDB:

    C patches currently installed:

    For the following PDB files: PEH$ ROOT

    Nothing to roll back

    Nothing to apply

    For the following PDB files: APB$ SEEDS

    Nothing to roll back

    Nothing to apply

    For the following PDB files: PDB_ORCL12C

    Nothing to roll back

    Nothing to apply

    For the following PDB files: PDB_ACPT_CLONE

    Nothing to roll back

    Nothing to apply

    Patching SQL tool Wed Jan 21 09:43:44 2015

    C:\oracle\product\12.1.0\dbhome_1\OPatch >

    PDB_ORCL12C has been created in the new database.

    Moved PDB is now stuck in RESTRICTED mode.

    Any ideas on how to solve this problem?

    Looks like the restoration of the original patch in CBD was not perfect.

    Option could be applying the fix to the PIC and try to plug in the PDB.

    If critical instances raise SR

    concerning

    Pravin

  • [ADF, JDev12.1.3] What is the right approach to manage the Value property of a Date of entry through a bean?

    Hallo,

    I created a custom search form by dragging on the CIU af:inputText and af:inputDate.

    I have some difficulties in the treatment of af: inputDate CIU.

    I've linked the Value of each af:inputDate property to a Date variable in a range backingBean bean.

    It is the correct type of Date or can I use the String type?

    When the user clicks the button to search for the form of the search_action in the bean creates the query with parameters (identified by (?) because I am using SQL Server as DBMS).

    Then, I need programmatically check the values of af: inputDate CIU and then use them to define the query parameters.

    Are there property should I settle for FA: inputDate CIU to "do a good job? For example Valdiator, converter...?

    I see that when I use the calendar of af: inputDate, the field is entered in the format dd/mm/yyyy is good for me but I'm not able to uderstand how to treat the value to check by program and then use it to set a parameter to the query of VO.

    I also want to set the initial value of some CIU af:inputDate in the bean. It takes for example the 1st of the month 6 months ago. What code would I use to do this?

    You could you kindly help me (better if give me a simple example)?

    Thank you

    Federico

    I've linked the Value of each af:inputDate property to a Date variable in a range backingBean bean.

    It is the correct type of Date or can I use the String type?

    Date type is correct.

    Are there property should I settle for FA: inputDate CIU to "do a good job? For example Valdiator, converter...?

    Well, if you need validate the date, then you will need validator (or check the value in managed bean)

    It goes the same for the converter.

    I see that when I use the calendar of af: inputDate, the field is entered in the format dd/mm/yyyy is good for me but I'm not able to uderstand how to treat the value to check by program and then use it to set a parameter to the query of VO.

    In your beans, you will get the Date value, so no matter how it is displayed on the user interface.

    To date handling, you can use standard java api as java.util.Calendar

    I also want to set the initial value of some CIU af:inputDate in the bean. It takes for example the 1st of the month 6 months ago. What code would I use to do this?

    Use standard java api to calculate the new date, then assign accessor value in your bean (for example, in the constructor of the bean)

    Dario

  • SQL solution to the hierarchy of nested game difficulty

    I have a good job pl/sql solution to my problem and I am just curious to know if there is an a sql

    I have a structure of tree for example:
    one
    b and c
    d e f
    g h i j k


    create table tree
    (key primary number (6) ID)
    , number (6) parent_id
    , root_id number (6) not null
    -, lft number 4 not null
    -GTA 4 number not null
    );

    create the table tree_update
    (key primary number (10) ID)
    , lft number (10) not null
    , number (10) of the GTA
    );
    Insert the values of Apple ('a', null, 'a');
    Insert Apple values ('b', 'a', 'a');
    Insert Apple values ('c', 'a', 'a');
    Insert the values of the Apple trees (a ',' b', 'a');
    Insert Apple values ('e', 'c', ' a');
    Insert the values of the Apple trees ('f', 'c', ' a');
    Insert the values of the Apple trees ('g' 'd', 'a' ");
    Insert the values of the Apple trees ('h' 'd', 'a' ");
    Insert the values of the Apple trees ('i', 'e', ' a');
    Insert the values of the Apple trees ('j', 'f', ' a');
    Insert the values of the Apple trees ('k', 'f', ' a');

    The product that uses it also uses 'left' and 'right' value to browse. In this way, that descendants of a node can be calculated using

    Select *.
    tree
    where lft >: node_left
    and GTA are: node_rgt;

    See http://en.wikipedia.org/wiki/Nested_set_model for more details

    Unfortunately the lft and rgt value can get corrupt, especially during simultaneous updates in the rows in the tree. So I need to apply periodic corrections

    I did it using the pl/sql recursive. It's my pl/sql:

    create or replace procedure setLeftRight
    (ParentId in full
    CurrLeft in out integer
    )
    as
    nLeft integer: = CurrLeft + 1;
    Start
    for r in
    (select id
    tree
    where parent_id = ParentId
    or (parent_id is null and ParentId is null)
    order by id
    )
    loop
    insert into tree_update
    (id
    lft
    )
    values
    (r.id
    nLeft,
    );

    setLeftRight
    (r.id
    nLeft,
    );
    end loop;

    Update tree_update
    define the GTA = nLeft
    where id = ParentId
    return of the GTA + 1 in CurrLeft;
    end setLeftRight;
    /
    Sho err

    and it is called with:


    number of GTA var
    exec: GTA: = 0
    exec setLeftRight(null,:rgt)

    leaving the correct answers as

    ID lft GTA

    ------- --- ---

    a 22 1

    2 9 b

    3 8 d

    4 5 g

    6-7 pm

    10 21 c

    11 14 e

    I have 12 13

    f 15 20

    16-19 j

    17 18 k

    Again, I am just curious to know if there is a sql solution. I can assign a sequential value to each line using the factoring of the subquery recursive and scope of research first, in both directions. But doing so, then join, then reassess the values lft and rgt seems heavy.

    You should also note that rgt - lft = 2 x < number of descendants > + 1, if they are assigned in the order (which is not really necessary because one order is important). I use this to check my values before committing.

    So is there a solution of elegant sql, in any version of db, but I am currently on 11.2.0.3.

    Thank you

    Ben

    Hi, Ben.

    Yes, you can do it in pure SQL.  See the last answer in the following thread:

    https://community.Oracle.com/thread/2603314

    You don't need a table like tree_update just to cool left and GTA (and root_id, if it gets corrupted, too).  You can use a MERGE statement to derive the correct values and update the table tree directly.

    In the sample data that you have published, all values are strings, but all the columns are numbers.

    You know exactly when the lft and rgt columns are getting corrupted?

    If so, it would be more logical to fix this.

    If you don't know when these columns are getting corrupted, so it seems that these columns would be useless, since you can be sure that the results based on these columns are accurate.

  • Redirect to an Apex Pl/Sql by using the page

    Hello

    I want to redirect it to a page of the apex using pl/sql.

    I m using the following code.

    Begin

    htp.p (utl_http.request (": http://application-tier server: port/apex /'"));

    End;

    Get the following error: parsererror - syntax error: token Unexpexted.

    Help, please.

    Concerning

    Far87 wrote:

    Fac586 thank you very much for your reply,

    Sorry for the unclear issue, I will make you understand.

    My requirement is to navigate between the pages.

    I have a form with field x and a button to send in the same region.

    whenever you press submit, it should check

    If x = 1 then

    GoTo page 3

    elsif x = 3 then

    GoTo page 4

    on the other

    GoTo page5

    end if;

    To do this, I created a dynamic action using the code below.

    Begin

    If: P5_x = 1 then

    HTP.p (utl_http.request (": http://application-tier server: port/apex/f?")) p = 159:3'));

    elsif: P5_x = 3 then

    HTP.p (utl_http.request (': http://application-tier server:port/apex /f? p = 159:4'));

    on the other

    HTP.p (utl_http.request (': http://application-tier server:port/apex /f? p = 159:5'));

    end if;

    end;

    Get the following error: parsererror - syntax error: token Unexpexted.

    I replaced the htp.p (utl_http.request (": http://application-tier server: port/apex/f?")) p = 159:3"))

    with owa_util.redirect_url (": http://application-tier server: port/apex/f?") p = 159:3');

    apex_application.stop_apex_engine ();

    Always make the same mistake.

    This is completely the wrong approach for normal inter-page navigation in the APEX. The use of dynamic action is not here. In this situation use branches for navigation, with conditions to control which branch is used according to the logic that you need...

  • What are the requirements for the use of Sql Developer with MS SQL Server via the JDBC MS driver?

    I tried to add

    sqljdbc_4.0\enu\sqljdbc4.jar

    or

    sqljdbc_4.0\enu\sqljdbc.jar

    or both

    in part 3d driver JDBC list in properties, but there is no tab in the connection dialog box create.

    Just for a test, I added IBM's JTOpen driver and a new tab of the DB2 appeared immediately.

    What should I do to be able to create connections to MS SQL?

    Use the correct driver, jTDS 1.3

    http://www.Oracle.com/technetwork/database/migration/JDBC-migration-1923524.html

Maybe you are looking for

  • Colors of strange display on the Satellite A30 101

    The last time the monitor with my A30-101 started showing color strange that white is black, rose is green, etc. When I connect the computer to an external monitor, everything is OK. Is it possible that a problem with the connection from the monitor

  • iPad app pro will not download

    I have a Pro iPad with iOS 9.2.1 succeeding an iPad 2 air. A few applications I had on my iPad Air just won't download on my iPad Pro: The Cloud button is to be grayed out (when I search the app in the appstore) or a download button is missing (using

  • Restore the default file on Windows 7 association

    Original title: open with default values When you change a file to open it with the windows photo viewer some how chaged all files on my computer to open with the photo viewer there are no restore points, or backups is there a way to cancel it or fix

  • BitmapFields CENTER alignment

    Hi all Please help me more. I have created several BitmapFields and put them in HorizontalFieldManager. But these BitmapFields are always left aligned. I want to be focused on these fields. How can I do this? Examples? Thank you DK.

  • Cannot use my Lexmark printer

    My husband used my laptop and for some reason any failed to connect. We did not have a password to make it easier to open, but for some reason it has become locked. So he decided to use the restoration and re - install Windows 7, 'Without' back up my