problem with the query insert masking character @.

Hi the gems...

I do through xml schema, run... means using a batch file, I'll call the xml files and the xml file contains the names of files containing all the DDLs and LMD...

No problem with the DDL...

now when I run the LMD, all are working well except a few insert scripts...

Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
'Hi,
Order details:
@Order_ID #.
@Instrument_ID #.
This is an automated email. Please do not reply.',
"executed");

This kind of scripts insert failed with the error "[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.

This problem is due to the @ character before the data...

problem doesn't happen when I run the script explicitly, xml perform only the origin of the problem

So, I need to know if there is a way to hide the sign @...

Please help... Thanks in advance

user12780416 wrote:
"[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.

In SQL * more the @ character means: run a script. That would explain the error message.
The real problem is that your chain is written on several lines. A string like this might work:

{code}
Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
"Hi," | Chr (10)
||' Order of details :'|| Chr (10)
|' @Order_ID #' | Chr (10)
|' @Instrument_ID #' | Chr (10)
||' This is an automated email. Please do not respond. »
"executed");
{code}

But it might not be a usable workaound.
As you create the string insert sort, you might be able to replace all line breaks in the present with you own custom lines.

Replace (yourEventMessage, Chr (10), "' |) Chr (10): "')

Tags: Database

Similar Questions

  • Problems with the button "INSERT."

    Hello

    I have a problem in my homework. I need to do the following:

    "original numbers" table contains zeros. Let LabVIEW fill a table 'original numbers' by random integers from 10 to 90 at a rate 1 number/0.5 seconds by replacing each zero both from top down. (FACT)

    the user fills out 10numbers in a 'numbers inserted without doubt' table. The user then decides if it needs to change a generated number that he dislikes changing table "insert."

    Then he presses the button INSERT and a resulting table appears containing the items that the user has changed...

    This video could clarify:

    http://www.YouTube.com/watch?v=dDXo2ABqNM4

    The problem I face is the button INSERT. In the video, at the moment he is passed the program will continue until the last part.

    I enclose the vi. I think that there is no logical errors in the program except the INSERT box structure.

    Thank you.
    PS version is LabView2010; I get error when trying to save in the desolate previous versions.

    A.A.A. wrote:

    1. What does it mean to turn off automatic indexing?
    2. I did not understand why we used the palette table to remodel. What are the dimensions of the entry and exit? Very nice way how you did a length of 10 zero array. (I'll use when I guess that the solution to the problem of dimension.)
    3. Have you used the expectation of 100 ms to do not affect the performance of the computer or for another reason?
    4. How where you can link the table Palette not equal 'changed' numbers?
    5. Where did you get the button "replace"? I think that my button "insert" is the oppositeof he needs to do.

    Your code still has major flaws. Your questions are very basic, and I recommend doing a few tutorials.

    1. If wire you an array through a loop limit, the tunnel can have two modes (plain (solid square) or autoindexing (contains a small set of brackets)). In your case, you are autoidenxing the table 1 d, creating a 2D (two lines) table at the end of the first loop. You generate 10 x too much data! (create a KPI 10 x 10 on the 2D table to see what you actually do!). You can right click on a tunnel to switch between the modes of indexation. A simple tunnel carries the unchanged data in the table. A tunnel exit autoindexing, creates an array to a higher dimension, in your case a table 2D of a table 1 d with a new line by iteration. If you autoiindex one scalar value, you get an array of 1 d with a single element by iteration. A tunnel entrance of autoidexing does the opposite. If wire you a table 1 d to a loop FOR using autoindexing, you get a scalar by iteration and the loop FOR stops once the table runs out of elements. Is equavalent (with some differences) for wiring without autoidenxing, then using "index Board" with the index wired to [i] as you currently do. In your case, you should get the table 1 d since the shift of the first loop register, it has all the information (!) and autoidexing on the edge of the second loop off, and the result would be the same, except that you use only 10% of the memory.
    2. Once you are autoidexing to a loop limit, a number of loop iterations FOR will be determined by the size of the smallest table autoindexing. It would be a problem if you later want to modify the code to work on for example of 20 elements, because the other two tables in my code would force the loop to stop after 10 iterations. 'Resize the table' can be used for upholstery/trimming tables and in this case we are accommodating to the length on the main Board to ensure that the loop FOR does not stop prematurely. In your case, the berries to replace and switch are empty by default, if the loop would not turn at all unless you enter values. "resize the table" brings them up to the waist.
    3. Yes, you need a small wait inside the other case, or elsewhere in the while loop. Without delay, the essentially empty loop will turn millions of times per second, consuming all CPU in the process while doing nothing. No human can click a button with this kind of temporal resolution, so a wait 100 ms is not noticeable, but will fall CPU utilization to a negligible level. Your computer has dozens of processes running at any given time. Imagine how it would work if all programs would consume all CPU, they can possibly get?
    4. I compare two tables, and the result will be an array of Boolean. You are comparing only two scalars and you won't get a table. Also, you do not have the 'AND', because if the values are different, it must be true anyway. In your case, you will need to wear a similar table of Boolean in the table number, replacement of the elements as you go.
    5. A button is a button a button. There should be no difference. You can change the label text Boolean, default value, and mechanical action to match your needs.

    A.A.A. wrote:


    I had to initialize the tables full of zeroes but the way you did much simpler.  How to initialize them to zero? (where did you get the pallets? I've attached a picture clarifing my question.

    Here are the local variables. You don't need to find them in the palettes. Simply right click on a terminal and 'create the local variable '. Voila!

    (Local variables can serve as an indicator of reading or writing to a control. However, because they break the flow of data, you can generate dangerous racing conditions. They also force copies of additional data in the memory. Do not use them as "variables" in the text according to the code. Except for the interface initialization interactions and the user, they should be used sparingly and are rarely needed. In principle, my code has a theoretical condition because the order of operations is not determined between three sections of the code are independent. For example if the initializion would happen after the execution of the second loop, you will get an unexpected result. This will never happen in this particular case, but in other scenarios, it could be a problem.)

  • Problem with the query in the form of customization mode

    Hi all

    Can you please help me I'm getting problem while doing the customization form

    Scenario:

    Marter dot org form that I need to display the default value in the field of the unit of MEASURE value is null

    I succeed while doing all the steps below

    Condition tab:
    ----------------------
    Trigger the same: ONCE - NEW - ITEM - INSTANCE
    Trigger object: MTL_SYSTEM_ITEMS. INVENTORY_ITEM_MIR

    Action tab:
    ------------------
    Type: property
    type of object: agenda
    Trigger object: MTL_SYSTEM_ITEMS. PRIMARY_UNIT_OF_MEASURE_MIR
    Property name: VALUE
    Value: null

    but the problem is when I try to query (F11) the form, I'm not able to ask please help me with the of this

    Thank you
    EABR

    The problem is, you assign a value to an element when the form is opened, so the form will update mode, so the system not allowing you to make the request (f11). If you clear the value that has been missed, you'd be able to F11.

    So instead set the VALUE, try the INITIAL_VALUE property and let me know if this worked for you.

    Thank you
    Pradeep

  • problem with the locking insert and delete between two linked tables help please.

    Hi guys I have a problem with a table of locking in Oracle forms, but when I try in SQL happens here too many users. I was wondering if anyone can shed some light on this?

    I created two scenerios one that works and is not based on the primary key and foreign key constraints (but one that works is not possible for us because it would mean change design table that we can not do).

    I've hardcoded in 1127,1128 number to make it easier (in reality it is a sequence)

    OK scenerio one (our scenerio)

    two tables
     CREATE TABLE testSFLABPR 
       (     LABP_REF_IRN VARCHAR2(25 BYTE), 
         LABP_REF_REF VARCHAR2(30 BYTE), 
         LABP_REF_SL NUMBER(8,0), 
         LABP_CONFIG_ID NUMBER(8,0),
          CONSTRAINT PK_testLABPR_IRN_SL PRIMARY KEY (LABP_REF_IRN,LABP_REF_SL)
       ) ;
    
     CREATE TABLE testSFLABP 
       (     LABP_IRN VARCHAR2(25 BYTE), 
         LABP_OPNO NUMBER(3,0), 
         labp_no NUMBER(8,0),
          CONSTRAINT PK_testSFLABP PRIMARY KEY (LABP_IRN, LABP_OPNO, LABP_NO) ENABLE, 
          CONSTRAINT testFK_SFLABP_SFLABPR FOREIGN KEY (LABP_IRN,labp_no)
           REFERENCES TESTSFLABPR (LABP_REF_IRN,LABP_REF_SL) ENABLE
       ) ;
    OK now session is done the following
    DELETE FROM      testSFLABPR     WHERE   LABP_CONFIG_ID            = 1127;          
                   
    INSERT INTO testSFLABPR(
            LABP_REF_IRN,
            LABP_REF_SL,
            LABP_REF_REF,
            LABP_CONFIG_ID
            )
            VALUES
            (
            'SOPENSHELVING',
            1127,
            1127||'CF Route',
            1127
            );
            
    INSERT INTO testSFLABP
          (
          LABP_IRN,
          LABP_OPNO,
          LABP_NO)
    VALUES (
    'SOPENSHELVING',
    1,
    1127);
    session one remains in this State.

    second session now does the following
    DELETE     FROM testSFLABPR     WHERE   LABP_CONFIG_ID            = 1128;     
    second session is now locked until a commit or rollback occurs.

    If I run the exact scenerio even with only a primary key on the table without locks held
     CREATE TABLE testSFLABPR 
       (     LABP_REF_IRN VARCHAR2(25 BYTE), 
         LABP_REF_REF VARCHAR2(30 BYTE), 
         LABP_CONFIG_ID NUMBER(8,0),
          CONSTRAINT PK_testLABPR_IRN_SL PRIMARY KEY (LABP_REF_IRN)
       ) ;
    
     CREATE TABLE testSFLABP 
       (     LABP_IRN VARCHAR2(25 BYTE), 
         LABP_OPNO NUMBER(3,0), 
         labp_no NUMBER(8,0),
          CONSTRAINT PK_testSFLABP PRIMARY KEY (LABP_IRN, LABP_OPNO, LABP_NO) ENABLE, 
          CONSTRAINT testFK_SFLABP_SFLABPR FOREIGN KEY (LABP_IRN)
           REFERENCES TESTSFLABPR (LABP_REF_IRN) ENABLE
       ) ;
    INSERT INTO testSFLABPR(
            LABP_REF_IRN,
            LABP_REF_REF,
            LABP_CONFIG_ID
            )
            VALUES
            (
            'SOPENSHELVING',
            1127||'CF Route',
            1127
            );
            
    INSERT INTO testSFLABP
          (
          LABP_IRN,
          LABP_OPNO,
          LABP_NO)
    VALUES (
    'SOPENSHELVING',
    1,
    1127);
    DELETE     FROM testSFLABPR     WHERE   LABP_CONFIG_ID            = 1128;
    I hope I posted all the information that is relevant... version of DB were is Oracle Database 10g Release 10.2.0.3.0 - Production

    Any help is appreciated...

    Creating indexes on columns of the FK. Something like:

    CREATE INDEX testFK_SFLABP_SFLABPR_IDX
    ON testSFLABP(LABP_IRN,labp_no)
    /
    

    SY.

  • Problem with the query.

    I created these queries, but is based on the number of files w_Candidates_Pending, w_Candidates_Pending_Revoked this status I have to set one flag either 1, 2 or 3.

    1 = when 1 or more records for a candidate given pending status,.

    2 = when 1 or more records for a candidate given awaiting status revoked.

    3 = in another State.

    Can u please help me add County in the query and count on the basis, I put 1 one flag.

    WITH w_Pending AS

    (SELECT resource_status_id

    OF ems.resource_status

    WHERE resource_status_desc = 'pending '.

    ),

    w_Pending_Revoked AS

    (SELECT resource_status_id

    OF ems.resource_status

    WHERE resource_status_desc = 'revoke pending. "

    ),

    w_Candidates_Pending AS

    (SELECT DISTINCT ec.ems_candidate_id,

    Eres.resource_status_id,

    Eres.candidate_id

    Of ems_candidate ec,.

    employee_resources eres

    WHERE ec.ems_candidate_id = eres.candidate_id (+)

    AND eres.resource_status_id = (SELECT resource_status_id FROM w_Pending)

    AND eres.through_date IS NULL

    ),

    w_Candidates_Pending_Revoked AS

    (SELECT DISTINCT ec.ems_candidate_id,

    Eres.resource_status_id,

    Eres.candidate_id

    Of ems_candidate ec,.

    employee_resources eres

    WHERE ec.ems_candidate_id = eres.candidate_id (+)

    AND eres.resource_status_id = (SELECT resource_status_id FROM w_Pending_Revoked)

    AND eres.through_date IS NULL

    )

    SELECT DISTINCT CND.ems_candidate_id,

    CND. Name,

    EEJ.ems_job_id,

    (SELECT CASE WHEN COUNT (1) = 0 THEN ELSE 'ADD' END 'n')

    OF wCP w_Candidates_Pending

    WHERE wCP.candidate_id = cnd.ems_candidate_id) pending_flag;

    (SELECT CASE WHEN COUNT (1) = 0 'N' THEN ELSE 'REVOKE' END)

    OF w_Candidates_Pending_Revoked wCPR

    WHERE wCPR.candidate_id = cnd.ems_candidate_id) pending_revoked_flag

    OF ems.ems_candidate cnd.

    EMS.employee_resources err,

    EMS.ems_jobs EJE,

    Rsg EMS.resources_group,

    EMS. Groups grp

    WHERE cnd.ems_candidate_id = err.candidate_id

    AND eej.ems_job_id = cnd.ems_job_id (+)

    AND err.resource_group_id = rsg.resource_group_id

    AND rsg.group_id = grp.group_id

    AND err.through_date IS NULL

    AND IN grp.group_id

    (SELECT DISTINCT grpe.group_id

    Groups_employee grpe, employee emp

    WHERE grpe.person_id = emp.person_id

    AND grpe.person_id = i_logged_in_person_id);

    Maybe

    Select ems_candidate_id,

    name,

    ems_job_id,

    cases where count_pending > 0 and count_pending_revoke is null

    then 1

    When count_pending_revoke > 0 and count_pending is null

    then 2

    When count_pending > 0 and count_pending_revoke > 0

    then 3

    end indicator

    (Select cnd.ems_candidate_id,

    CND. Name,

    EEJ.ems_job_id,

    RSS.resource_status_id,

    RSS.resource_status_desc,

    ROW_NUMBER() over (partition of cnd.ems_candidate_id

    order of rss.resource_status_desc

    ) rn,.

    sum (case rss.resource_status_desc when 'waiting' then 1 end) on

    (cnd.ems_candidate_id order of value null partition

    lines between unbounded preceding and following unlimited

    ) count_pending,.

    sum (case rss.resource_status_desc when 'pending Revoke' then 1 end) on

    (cnd.ems_candidate_id order of value null partition

    lines between unbounded preceding and following unlimited

    ) count_pending_revoke,.

    Count (*) over (partition by order cnd.ems_candidate_id by null

    lines between unbounded preceding and following unlimited

    ) count_candidate_rows

    of ems.ems_candidate cnd.

    EMS.employee_resources err,

    EMS.ems_jobs EJE,

    Rsg EMS.resources_group,

    GRP EMS. Groups,

    EMS.resource_status rss

    where cnd.ems_candidate_id = err.candidate_id

    and eej.ems_job_id = cnd.ems_job_id (+)

    and err.resource_group_id = rsg.resource_group_id

    and rsg.group_id = grp.group_id

    and err.through_date is null

    and grp.group_id in (select distinct)

    GRPE.group_id

    of groups_employee grpe.

    employee emp

    where grpe.person_id = emp.person_id

    and grpe.person_id = i_logged_in_person_id

    )

    and err.resource_status_id = rss.resource_status_id

    )

    where rn = 1

    Concerning

    Etbin

  • Lightroom 3 - problems with the function of masking

    Hello!


    To start, I used PSE for some time and have recently started using LR, which I LOVE.  But, as in any learning new software, I hit a few bumps.


    I looked at a few tutorials on how o use the hide feature (using the adjustment brush), that, as far as I know, I'm doing everything correctly, but it doesn't seem to work.  At least not in the way that I thought he was supposed to.


    What I try to do in this case, is, in the treatment of a portrait of a baby, there are some extra noise due to an ISO high.  I am trying to reduce that by using the tool of the Luminance in the "Détail" section  But, I would try and keep the detail in his eyes.  Then... I'm trying to hide the central part of the eye while reducing noise in the rest of the portrait.  Pretty simple, right?


    But I tried several times, in several different ways, to hide the eyes and reduce noise in the rest of the photo, but it's still soften the eyes as well.


    What I am doing wrong?  Do I have the wrong impression of how this masking thing is supposed to work?  AFAIK, LR does not layers like PSE, t - it?


    Thanks for any help!

    sweetcheeksphotography wrote:

    What I try to do in this case, is, in the treatment of a portrait of a baby, there are some extra noise due to an ISO high.  I am trying to reduce that by using the tool of the Luminance in the "Détail" section  But, I would try and keep the detail in his eyes.  Then... I'm trying to hide the central part of the eye while reducing noise in the rest of the portrait.  Pretty simple, right?

    Laughing out loud. It is not. The only parameters that you can use for the adjustment brush are 7 control string parameters in the adjustment brush and noise reduction isn't one of them. It is therefore no way to do what you do unless you cut down on the noise reduction to simply 'help' with the overall noise, then try to use a negative the sharpness setting in the adjustment brush. If you set the sharpness or less-50, you can actually paint a blur effect that should be able to do what you are trying to accomplish. You can also try a little less clarity as well.

  • Problem with the query and date

    I'm trying to show only the specific results in my query based on the following:

    If the 'agreedate' is greater than today's date, less than 60 days, show it. Otherwise I don't want results.

    I always get the results of the last year and I don't know why.

    Here is my code:

    <!-the value date today less than 60 days. This works and shows the correct date->

    < cfset invitelimit = #now () # >
    < cfset invitelimit = #DateFormat (DateAdd (would be ', - 60, invitelimit), 'dd-mm-yyyy') #.

    <! - query items from the db and try to catch only to those with a more agreedate then the invitelimit date - >


    < name cfquery = "qinvite" datasource = "#Application.ds #" >

    SELECT DISTINCT * from team a

    INNER JOIN followed b ON a.id = b.team_id
    INNER JOIN termsagreement c ON a.login = c.login

    WHERE c.agreedate > #invitelimit # AND b.comp_id = 0

    Group By a.teamname

    < / cfquery >

    First of all.  Confirm that the "argeedate" column is a datetime column.  Not another type of data that would be much more difficult to work with.

    Secondly, you should provide an appropriate database datetime value.  The easiest way would be with the tag.

    I.E.

    WHERE

    c.agreedate > AND

    b.comp_id =

  • Problem with the query result set * STILL a QUESTION *.

    Summary

    What I am tring to do is to return output to the data points that currently have no values.

    * Here it is sample data for reasons explaining my question (my data set is MUCH bigger)

    xTable
    YEAR    PEOPLE    ITEMS    TYPE_NUMBER TYPE_DESC    CLASS
    2010       1                 1              REG              1 
    2010        2        3         2             MISC             1
    2010        5        4         3             WEEK           1
    2010                             1             REG              2
    2010                             2             MISC             2
    2010                             3             WEEK           2
    2009       1                 1              REG              1 
    2009        2        3         2             MISC             1
    2009        5        4         3             WEEK           1
    2009                             1             REG              2
    2009                             2             MISC             2
    2009                             3             WEEK           2
    
    ... (there's over 100 other unique CLASS values)
    Desired output
    YR     PEOPLE   ITEMS   TOTAL PEOPLE  TOTAL_ITEMS
    2010         -            -            -                        -                         --  (Class 2 result set)
    
    /* FYI, If i wanted the class 1 result set it would look like this:
    YR     PEOPLE   ITEMS   TOTAL PEOPLE  TOTAL_ITEMS
    2010        8       7             16                    14                       -- (Class 1 result set)*/
    Oracle: 10.2 G
            select 2010 as yr,
                         nvl(f.people,'-') as people
                         nvl(f.items,'-') as items  
                         nvl(to_char(sum(f.people)),'-') as total_people,
                         nvl(to_char(sum(f.items)),'-') as total_items,
                         from Xtable,
                              (2010 as yr,
                              sum(items)as items
                              sum(people) as people
                              from xTable
                              where person_id = 99999
                              and   type_number in (1,2,3)
                              and year = 2010
                              and class = 2 
                              or class = 1
                              ) f
                         where person_id = 99999
                         and type_number in (1,2,3)
                         and yr = f.yr
                         and (year <= 2010 or year = 2010)
                         and (class = 2 or class = 1)
                         group by 
                         f.people,
                         f.items
    Currently, the query above will return no rows.

    Published by: user652714 on February 2, 2010 13:04

    How about this?

    SQL> WITH    xTable AS
      2  (
      3          SELECT 2010 AS YEAR, 1 AS PEOPLE, 0 AS ITEMS, 1 AS TYPE_NUMBER, 'REG' AS TYPE_DESC, 1 AS CLASS FROM DUAL UNION ALL
      4          SELECT 2010 AS YEAR, 2 AS PEOPLE, 3 AS ITEMS, 2 AS TYPE_NUMBER, 'MISC' AS TYPE_DESC, 1 AS CLASS FROM DUAL UNION ALL
      5          SELECT 2010 AS YEAR, 5 AS PEOPLE, 4 AS ITEMS, 3 AS TYPE_NUMBER, 'WEEK' AS TYPE_DESC, 1 AS CLASS FROM DUAL UNION ALL
      6          SELECT 2010 AS YEAR, NULL AS PEOPLE, NULL AS ITEMS, 1 AS TYPE_NUMBER, 'REG' AS TYPE_DESC, 2 AS CLASS FROM DUAL UNION ALL
      7          SELECT 2010 AS YEAR, NULL AS PEOPLE, NULL AS ITEMS, 2 AS TYPE_NUMBER, 'MISC' AS TYPE_DESC, 2 AS CLASS FROM DUAL UNION ALL
      8          SELECT 2010 AS YEAR, NULL AS PEOPLE, NULL AS ITEMS, 3 AS TYPE_NUMBER, 'WEEK' AS TYPE_DESC, 2 AS CLASS FROM DUAL
      9  )
     10  -- END SAMPLE DATA
     11  SELECT  YEAR
     12  ,       NVL(TO_CHAR(SUM(PEOPLE)),'-')    AS PEOPLE
     13  ,       NVL(TO_CHAR(SUM(ITEMS)),'-')     AS ITEMS
     14  ,       CLASS
     15  FROM    xTable
     16  WHERE   CLASS IN (1,2)
     17  AND     YEAR = 2010
     18  GROUP BY YEAR
     19  ,       CLASS
     20  ORDER BY CLASS DESC;
    
                    YEAR PEOPLE ITEMS CLASS
    -------------------- ------ ----- -----
                    2010 -      -         2
                    2010 8      7         1
    
  • Problem with the option of masking

    Hello

    I make a design image in photoshop and I want the background will be visible trought the letters, but when I do that, the letters are transparent, but I can't see the bottom.

    Why? What I am doing wrong?

    It is the image with the transparent letters 1. PNG - Google Drive

    There are all the files in the project 2. PNG - Google Drive

    There are the options of the letters 3. PNG - Google Drive

    Thank you

    One way is to make the background a layer Layer background real by going to layer > New > layer background.

  • Problem with the query parameter

    Hi,
    I have data some thing like 
    
    SQL> select * from temp_tabr;
    
    INSTITUTE  STUDNAME   GR     MARKS
    ---------- ---------- -- ---------
    xxxx       abc        A        500
    xxxx       pqq        A        550
    xxxx       zzz        B        300
    xxxx       sss        B        400
    yxxx       abc        A        500
    yxxx       pqq        A        550
    yxxx       zzz        B        300
    yxxx       sss        B        400
    
    
    
    I want a query to retrive the data based on 3 parameters
    Institue is mandatory
    GR and MARKS are optional
    
    user may pass any one of the Optional parameters GR or MARKS not both
    
    example he may pass Intitute and get all 8 records
    if he pass Institue and grade it should retrive only those matching
    if he pass institute and marks it should retrive only those matching
    
    only grade or marks will be passed or neighter of them will be passed.
    
    
                                 
    
    
    
    create table temp_tabr(institute varchar2(10),
                      studname  varchar2(10),
                      grade     varchar2(2),
                      marks      number);
    
    insert into temp_tabr values
    ('xxxx',             'abc',           'A',       '500');
    insert into temp_tabr values('xxxx',             'pqq',           'A',       550);
    
    insert into temp_tabr values('xxxx'  ,          'zzz' ,          'B'  ,     300);
    insert into temp_tabr values('xxxx'  ,          'sss' ,          'B'  ,    400);
    
    
    insert into temp_tabr values
    ('yxxx',             'abc',           'A',       '500');
    insert into temp_tabr values('yxxx',             'pqq',           'A',       550);
    
    insert into temp_tabr values('yxxx'  ,          'zzz' ,          'B'  ,     300);
    insert into temp_tabr values('yxxx'  ,          'sss' ,          'B'  ,    400);

    Like this?

    select * from temp_tabr
    where
    institute='&a'
    and grade = nvl('&b',grade)
    and marks = nvl(to_number('&c'),marks)
    

    If you pass parameters using the variable, you do not have to use to_number, you can directly pass the name of the variable. I have provided for you to test it in sql * more.

    HTH,
    Prazy

  • Problem with the query operation using less

    Hi all

    I have the dataset of all organization numbers like as below

    DataSet:

    ('528801', '528802', '536101', '536102', '100601 ', '536401', ' 536402 ', ' 530701',' 536501', ' 536502 ', ' 540501',' 599101 ', ' 133301',)
    ('531101', '143101', '536601', '536602', '534401 ', '535501', ' 535401', ' 536801 ', ' 536802',' 531001 ', ' 537501',' 537502 ', ' 540601',' 540801 ', ' 528401')

    And I also have a W_INT_ORG_D table where in a column like ORG_NUM that contains the figures of the Organization in the database, now I'll try to find the numbers of the exclusive organization in the value data that does not exist in W_INT_ORG_D using an oracle sql query.

    Here is the sql code I wrote well that my request is wrong you could probably understand what I'm trying to say or do, I'm not ok with creating another table and filled in the data and compare two tables later, I want to do it without creating any additional table. Please let me know if you have an idea to do this, appreciate your time.

    Request:_
    WITH ABC AS
    ('528801', '528802', '536101', '536102', '100601 ', '536401', ' 536402 ', ' 530701',' 536501', ' 536502 ', ' 540501',' 599101 ', ' 133301',)
    ('531101', '143101', '536601', '536602', '534401 ', '535501', ' 535401', ' 536801 ', ' 536802',' 531001 ', ' 537501',' 537502 ', ' 540601',' 540801 ', ' 528401')
    SELECT DISTINCT ORG_NUM
    OF W_INT_ORG_D, ABC
    WHERE DATASOURCE_NUM_ID = ' 211 '.
    AND ORG_NUM IN
    ('528801', '528802', '536101', '536102', '100601 ', '536401', ' 536402 ', ' 530701',' 536501', ' 536502 ', ' 540501',' 599101 ', ' 133301',)
    ('531101', '143101', '536601', '536602', '534401 ', '535501', ' 535401', ' 536801 ', ' 536802',' 531001 ', ' 537501',' 537502 ', ' 540601',' 540801 ', ' 528401')
    LESS
    SELECT * FROM ABC
    Thank you
    Sam

    This wil give a list of numbers of overall organization of data that are not present in the view:

     SELECT column_value org_num
       FROM TABLE(sys.odciVarchar2List(
                                       '528801',
                                       '528802',
                                       '536101',
                                       '536102',
                                       '100601',
                                       '536401',
                                       '536402',
                                       '530701',
                                       '536501',
                                       '536502',
                                       '540501',
                                       '599101',
                                       '133301',
                                       '531101',
                                       '143101',
                                       '536601',
                                       '536602',
                                       '534401',
                                       '535501',
                                       '535401',
                                       '536801',
                                       '536802',
                                       '531001',
                                       '537501',
                                       '537502',
                                       '540601',
                                       '540801',
                                       '528401'
                                      )
                 )
    MINUS
     SELECT  DISTINCT ORG_NUM
       FROM  W_INT_ORG_D
       WHERE DATASOURCE_NUM_ID='211'
    /
    

    SY.

    Published by: Solomon Yakobson, June 29, 2009 10:49

  • Problem creating a hierarchical tree in the generator of forms [problem with the query]

    Hi all

    I have 2 tables.

    box (box_id, box_name)

    point (item_id, nom_element, box_id)

    There are several items in a box.

    I want to create a HIERARCHICAL tree to display items that are present in each box.

    AS:

    | - BOX1
    | |-ITEM 1
    | | - ITEM 2
    |
    | - BOX2
    | |-ITEM 1
    | | - ITEM 2

    I'm trying this query:

    SELECT-1 State, box_name, box_id, "icon" val
    in zone b, point i;

    I don't know what the value for upgrade, I don't know how the code part "connect by front.

    Could you please tell me?

    Michael.

    PS. then I'll eventually use this query in the form designer.

    Hi MichaelR

    I'm getting the FRM - 47321 error in forms Builder...

    That's why In order to fill a tree, the select must recover 5 columns:
    STATUS, LEVEL, LABEL, ICON, u-VALUE should be noted this command in your application, this will resolve the error and pls notice that the...

    My advice is to use the online help in your form generator to help u in this...

    Initial state : number
    Node tree depth : number
    Label for the node : varchar2
    Icon for the node : varchar2
    Data : varchar2
    

    This must be a TIME NEW FORM INSTANCE trigger to fill your tree...

    Another thing why do you think of building your tree I've done here in the following example... Pls take a look here....

    I hope this helps...

    Kind regards

    Amatu Allah.

  • Problem with the simple query.

    Hi all

    I am facing problem with the query below

    Select A.COL1, A.COL2

    B.COL1, B.COL2

    FROM TABLE1 A

    TABLE 1 B

    WHERE A.header = '123'

    AND B.header = '123'

    AND nvl (A.COL6, 'ABC') = 'ABC '.

    AND NVL (B.COL6, 'DEF') = 'DEF '.

    Basically, my requiremenyt is: I have only one table, TABLE1 here, which has a line two lines (for the same header) as "ABC" and another is "DEF". Table 1 has two columns (col1, col2) that should be displayed for both lines.

    When the header has two records in table1 top query works. and but if I do not have a record for any header example there are a record for "abc" in col6 only. so my query above does not work because there is no record for 'DEF' in col6. But I want to again request to fecth the output (for b.col1 and b.col2 should have null values)

    could you pls suggest me how to get the 4 columns.

    Thanks in advance

    Kind regards

    UVA.

    Try to place the status of outer join on column: analytical_criterion_code as

    and nvl (AUDIT.analytical_criterion_code, 'AUDIT2') = 'verification2. '

    .

    .

    and nvl (TRANS.analytical_criterion_code, 'TRANS2') = 'TRANS2.

    In the sub query based on the opinions that you have given in post # 1, although there is no value "DEF * ' for col6 due to the condition of outer join on b.col6 (+) line is extracted with b.col [1,2,3] as NULL values. Try to remove the (+) sign b.col6 and test.

    with t as)

    Select 111 col1, col2 'aaa', 'ABC' col6 123 header of all the double union

    Select 222 'bbb', 'DEF' col6, 123 double header

    )

    q as (select 123 double header)

    Select A.COL1, A.COL2, A.COL6

    B.COL1, B.COL2, b.COL6

    q.header

    T a

    t b

    q

    where a.col6 (+) = 'ABC '.

    and b.col6 (+) = "DEF."

    and q.header = a.header (+)

    and q.header = b.header (+)

  • Problem with the input query mode. FRM 41009, 40301

    Hi all

    I have a problem with the mode of input query. What can I say, I'm in the mode of input query, and I click on a button. I get the error THAT FRM-41009 displayed.

    Now, I've wanted handled. So I created a trigger of error in order to handle the error.

    IF ERR_CODE = 41009 THEN
    NULL;
    END IF;

    A problem is that when you use the null value, it will not terminate the mode of input query, and then I get frm-40301 error.

    Second, it's that I can't use exit_form in a trigger of the error.

    I am aware that I can press F4 to exit this mode, but I don't want to do whenever I'm sure I'll get the user complaints.

    Another solution would be to put the following code in the trigger when key pressed for each button in the form:

    If: system.mode = "ENTER-QUERY" then
    exit_form;
    end if;

    But I don't want to reproduce this code in my form.

    Please can you give me an idea how to handle this correctly?

    Thank you
    Michael

    PS: Version of the form = > ORACLE FORMS 10g (Forms [32 bit] Version 10.1.2.3.0)

    I have a problem with the mode of input query. What can I say, I'm in the mode of input query, and I click on a button. I get the error THAT FRM-41009 displayed.

    What is the code in the trigger of your button When-Button-Pressed (WBP)? Maybe you should check to see if the form is in the Mode query in your WBP rather than try and remove the error? In other words, eliminate error - do not delete it. :)

    If you want instead to remove the error, there is a technique to built-ins call restricted to a trigger that does not allow them. Do this by the use of a millisecond zero Timer. For example:

    /* Sample On-Error Trigger */
    DECLARE
      n_err_cd   NUMBER := ERROR_CODE;
      t_on_error TIMER;
      ZERO  NUMBER := 0;
    BEGIN
      IF ( n_err_cd = 41009 ) THEN
        /* Create Timer to execute Exit_Form() */
        /* to Cancel Query-Mode. */
        t_timer := Create_Timer('ON_ERROR', ZERO, NO_REPEAT);
      ELSE
        /* Handle all other errors here... */
      END IF;
    END;
    
    /* Sample When-Timer-Expired Trigger */
    DECLARE
      v_Timer  VARCHAR2(30);
    BEGIN
      v_timer := Get_Application_Property(TIMER_NAME);
    
      IF ( v_timer = 'ON_ERROR' ) THEN
        /* Notice, the timer name is case sensative! */
        Exit_Form;
      END IF;
    END; 
    

    I am aware that I can press F4 to exit this mode, but I don't want to do whenever I'm sure I'll get the user complaints.

    Well, it's just standard features of Oracle Forms. If you switch the Mode request form - you must run a query or cancel the query Mode! This is how it works. Your users need to understand that and accept it - just as they accept the functional also for other programs. ;) Another option would be to add a "Cancel request" button to your form and make it so it is enabled only when the form is placed in Query Mode. Just a thought...

    I personally prefer to prevent the occurrence of an error rather than remove the error. :)
    I hope this helps.
    Craig...

  • Problem with the help of oraext: query-database in the transformation (XSLT 2.0)

    Hello!
    I m facing a problem with the help of oraext: query-database.

    In my transformation im try the following (Simplified):
    <xsl:template match="*">
      <xsl:variable sqlQuery="select ....."/>
      <xsl:variable name="storeSec" select="oraext:query-database($sqlQuery,true(),true(),'jdbc/xref')/>               
        <xsl:choose>
         <xsl:when test="string-length($storeSec/ROWSET/ROW[1]/STORE_PART_SECTION) > 0">
              <xsl:value-of select="$storeSec/ROWSET/ROW[1]/STORE_PART_SECTION"/>
         </xsl:when>
           <xsl:otherwise>
                <xsl:value-of select"some other val"/>
           </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    {code}
    
    This always results in +some+ +other+ +val+ !!
    I´v checked the output from oraext:query-database by using getcontentAsString and if I instead test putting the expected output from oraext:queryDatabase in my variable it gives me A100 which is what i expected.
    
    {code}
    <xsl:template match="*">
      <xsl:variable sqlQuery=select ....."/>
      <xsl:variable name="storeSec">
        <ROWSET>
         <ROW num="1">
           <STORE_PART_SECTION>A100</STORE_PART_SECTION>
         </ROW>
         <ROW num="2">
           <STORE_PART_SECTION>XXm</STORE_PART_SECTION>
         </ROW>
        </ROWSET>
      </xsl:variable>               
        <xsl:choose>
         <xsl:when test="string-length($storeSec/ROWSET/ROW[1]/STORE_PART_SECTION) > 0">
              <xsl:value-of select="$storeSec/ROWSET/ROW[1]/STORE_PART_SECTION"/>
         </xsl:when>
           <xsl:otherwise>
                <xsl:value-of select"some other val"/>
           </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    How to get the correct value when you use oraext:query - database?

    How should you exit? Several item ID with each having a value of the result set?
    If Yes, then you can try following:

     
                        
                            
                        
                             
                                  
                             
                        
                            
    

Maybe you are looking for