error in the instruction box

How to select something in a statement in pl/sql block box in a variable plsql?

It returns the error ORA-00903 invalid tablename.

I have to use sql to perform this validation

Why? In your first post you talked about"a pl/sql block '?

In any case - performs the following work for you:

SQL> declare
  d1        date := sysdate;
  d2        date := sysdate;
  d3        date := sysdate;
  d4        date := sysdate;
  myvavar   varchar2 (1);
begin
  select case
           when extract (year from d1) != 0000
            and d1 < d2
           then
             'X'
           when (extract (year from d3) != 0000)
            and (d3 > d2)
           then
             'X'
           when (extract (year from d4) != 0000)
            and (d2 < d3)
           then
             'X'
           else
             'y'
         end
    into myvavar
    from dual;

  dbms_output.put_line (myvavar);
end;
/
y
PL/SQL procedure successfully completed.

?

Tags: Database

Similar Questions

  • Svchost.exe - Application error. The instruction at "0x7d4caa9b" reference memory at "0x00000010". The memory cannot be: "read"

    Hi, I get the error message after my system boots - svchost.exe - Application error. The instruction at "0x7d4caa9b" reference memory at "0x00000010". The memory could not be "read".

    And then after a few minutes it stops and restarts.
    I'm also not able to use the mouse.
    I need help with this problem
    Thank you and best regards

    Hi GeorgeMotaung,

    ·         Did you do changes on the computer before the show?

    ·         Are you able to boot to the desktop?

    Follow these methods.

    Method 1: Start your computer in last known good configuration.

    How to start your computer by using last good known Windows XP Configuration

    http://support.Microsoft.com/kb/307852

    Method 2: Follow these steps:

    Step 1: Start the computer in safe mode and check if the problem persists.

    A description of the options to start in Windows XP Mode

    http://support.Microsoft.com/kb/315222

    Step 2: Perform a clean boot to see if there is a conflict of software like the clean boot helps eliminate software conflicts.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Note: After the boot minimum troubleshooting steps, follow section How to configure Windows to use a Normal startup state of the link to return the computer to a Normal startupmode.

    After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.

    (a) click Start and then click Run.

    (b) type msconfig and click OK.

    (c) the System Configuration Utility dialog box appears.

    (d) click the general tab, click Normal Startup - load all services and device drivers and then click OK.

    (e) when you are prompted, click on restart to restart the computer.

  • Problem with variable referencing of presentation (KEY Date) in the instruction box

    Hello

    I'm trying to reference variables of presentation created on a Date column in the instruction box to one of the columns in the query, as shown below:

    -case when '-citation details. "" "Created" between ' @{of} {1999-1-1}' and ' @{until} {2999-1-1} "then"-quote Metrics. " "" end of number of citations.

    I m getting a view displays error message with the following error message:

    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 17001] Oracle error code: 1861, message: ORA-01861: literal does not match the format string to the call of the OIC OCIStmtExecute

    SQL issued: SELECT "-quote Types '." Name of level 2 Saw_0', case when '-citation details. "" Created "between" 01/04/2009 ' and ' 15 / 04/2009 ' then '-quote Metrics ' "." number of citations"end saw_1"(unit) - CATALOGUE of quotes"WHERE"-citation details "". "" Date of creation"BETWEEN timestamp ' 2009-04-01 00:00:00 ' timestamp AND ' 2009-04-15 00:00:00 ' ORDER BY saw_0


    When I created the prompt on the date field, I put the following in the command prompt:
    Cast ("-time".) Day)

    When I apply a filter on the query using these variables, it works fine.

    If anyone has faced this kind of question earlier and have a resolution, please help me.

    Thank you
    Kitenge

    Hello.

    Select the double - A NON-VALIDE MONTHS TO_DATE('1999-1-1','mm/dd/yyyy')

    Try this:

    OLD: EVALUATE ('TO_DATE (%1, %2)', ' @{of} {1999-1-1} ", mm/dd/yyyy)
    NEW: EVALUATE ('TO_DATE (%1, %2)', ' @{of} {01/01/1999} ", mm/dd/yyyy)

    and

    OLD: EVALUATE ('TO_DATE (%1, %2)', ' @{of} {2999-1-1} ", mm/dd/yyyy)
    NEW: EVALUATE ('TO_DATE (%1, %2)', ' @{of} {1, 1, 2999} ", mm/dd/yyyy)

    and if not ok after that, after an error in query SQL of NQQuery.log.

    Kind regards

    Goran Ocko

    http://108obiee.blogspot.com/

  • Svchost.exe - banner of error application the instruction at 0x5ba0ddae referenced memory at 0x00000000.

    Svchost.exe - banner of error application the instruction at 0x5ba0ddae referenced memory at 0x00000000. The memory could not be written.  Banner returns after you press ok to complete the program and cancel without debugging.  Machine will not now stop down. Tried system restore to previous date does not resolve.  Some applications work, that some do not, machine shuts himself often.  Windows Update will not work.  Operating system is Windows XP media center edition with Service Pack 3.  A short of ideas.

    It seems that my hard drive is faulty and it is originally this and quite a few other questions, I'm going to change and upgrade the operating system.  Thanks for the help.

  • Distinct count in the instruction box

    -------------------------------------------------------------------------------------------------
    SELECT A.P_ID,
    B.P_NAME,
    C.P_DESC,

    SUM (CASE
    WHEN A.DATE BETWEEN TRUNC (ADD_MONTHS (LAST_DAY (SYSDATE),-4) + 1) AND ADD_MONTHS (LAST_DAY (TO_DATE (SYSDATE)),-1)
    AND A.M_ID IS NOT NULL
    THEN 1
    0 OTHERWISE
    END) AS COUNT,
    SUM (CASE
    WHEN A.DATE BETWEEN TRUNC (ADD_MONTHS (LAST_DAY (SYSDATE),-4) + 1) AND ADD_MONTHS (LAST_DAY (TO_DATE (SYSDATE)),-1)
    AND A.M_ID IS NOT NULL
    THEN COUNT (DISTINCT A.M_ID)
    0 OTHERWISE
    END) AS UNIQUE_COUNT, / * is not possible * /.
    SUM (CASE
    WHEN A.DATE BETWEEN TRUNC(SYSDATE,'YEAR') AND ADD_MONTHS (LAST_DAY (TO_DATE (SYSDATE)), - 1).
    THEN A.AMT_1
    0 OTHERWISE
    END) AS TOTAL_AMT_1,
    SUM (CASE
    WHEN A.DATE BETWEEN TRUNC(SYSDATE,'YEAR') AND ADD_MONTHS (LAST_DAY (TO_DATE (SYSDATE)), - 1).
    THEN A.AMT_2
    0 OTHERWISE
    END) AS TOTAL_AMT_2

    FROM TABLE_A A,.
    TABLE_B B,.
    C TABLE_C


    WHERE A.P_ID = B.P_ID
    AND B.PT_ID = C.PT_ID
    A.P_ID GROUP,
    B.P_NAME,
    C.P_DESC

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

    Hello

    It is a simplified version of my request.
    I'm doing 4 things here,
    1. the County A.M_ID
    2 County has separate .M_ID, is where I have a problem.
    3 and 4. It is just the sum of 2 diff columns.

    Note that the dates for the County and the amt are different and I can't hard-code the.
    Can someone help me step of distinct count?
    This query runs also a bit slow.
    So all suggestions, comments are welcome.
    Note: TABLE_A REB 700 million, TABLE_B 4 million and TABLE_c is located only 500 RECS
    Thank you!

    Advantage of the fact that aggregate functions more ignore nulls, you could do something like:

    SELECT a.p_id, b.p_name, c.p_desc,
           COUNT(CASE WHEN a.date BETWEEN TRUNC(ADD_MONTHS(LAST_DAY(sysdate),-4) + 1) AND
                                          ADD_MONTHS(LAST_DAY(TO_DATE(sysdate)),-1) AND
                           a.m_id IS NOT NULL THEN m_id END) AS countall,
           COUNT(DISTINCT CASE WHEN a.date BETWEEN TRUNC(ADD_MONTHS(LAST_DAY(sysdate),-4) + 1) AND
                                        ADD_MONTHS(LAST_DAY(TO_DATE(sysdate)),-1) AND
                         a.m_id IS NOT NULL THEN a.m_id END) AS unique_count, /* entirely possible */
           SUM(CASE WHEN a.date BETWEEN TRUNC(sysdate,'YEAR') AND
                                        ADD_MONTHS(LAST_DAY(TO_DATE(sysdate)),-1) THEN a.amt_1
                    ELSE 0 END) AS total_amt_1,
           SUM(CASE WHEN A.DATE BETWEEN TRUNC(sysdate,'YEAR') AND
                                        ADD_MONTHS(LAST_DAY(TO_DATE(sysdate)),-1) THEN A.AMT_2
                    ELSE 0 END) AS TOTAL_AMT_2
    FROM table_a a, table_b b, table_c c
    WHERE a.p_id = b.p_id and
          b.pt_id = c.pt_id
    GROUP BY a.p_id, b.p_name, c.p_desc
    

    The two statements inside the COUNTY box return a.m_id or NULL. A simplified test case is:

    SQL> WITH t as (
      2     SELECT 1 m_id, 9 dt FROM dual UNION ALL
      3     SELECT 1 m_id, 6 dt FROM dual UNION ALL
      4     SELECT 2 m_id, 9 dt FROM dual UNION ALL
      5     SELECT 2 m_id, 6 dt FROM dual UNION ALL
      6     SELECT 1 m_id, 5 dt FROM dual UNION ALL
      7     SELECT 2 m_id, 5 dt FROM dual UNION ALL
      8     SELECT null m_id, 9 dt FROM dual)
      9  SELECT count(CASE WHEN dt BETWEEN 6 and 9 THEN m_id end) cid,
     10         count(distinct CASE WHEN dt BETWEEN 6 and 9 THEN m_id end) cdid
     11  FROM t;
    
           CID       CDID
    ---------- ----------
             4          2
    

    I'm not entirely sure that you really need the IS NOT NULL predicate a.m_id in the instructions BOX, but I left it for more security.
    John

  • Enum cohersion Dot on the instruction box

    Eveining.

    I've been modifying the vi attached today to add the ability to manage several different Enum U16.

    Previously, it there was only a single typedefed enum U16 in controls [] controls entry and the typedef Enum constant was so in the case of U16 Enum.

    Because there are now 2 different typedefed Enum U16 in a new control that is passed in the [input controls, I had to change the vi as Variant data function was causing an error when the variant does not correspond with any one of the types. To do this, I added the new deal structure and wired the exit TypedeInfo of the fuction Type Variant via a Unbundel by name to the case switch terminal. Inside of each case, I put a constant of the Typedef Enum, which must be transmitted to the data vi Variant. Unfortunately as one of the Enum constants are not of the same type, the tunnel exit of the new structure of matter is cohursts so that the data on the screen of the Enum Digtal and not the name of the element.

    This therfore means that the output of the variant of the data function now returns the digital display number and not the name of the element. Unfortunately this messing things downstream.

    He he not cohurst and the collar of the element names instead of the digital display. I guess it would be possible to do with a funtion Selector, but then it does not changes possible futher.

    All ideas

    Concerning

    M

    If you use "format string" or "type cast" with an enum, it converts it into a string that you can wire in the selector box structure. Because your type definitions are different, you will always get the coercion.

    Your VI, you need to move the variant to the data inside the structure of the case and then put inside the case of the Enum U16. Something like this should work:

    Oh, there's also an OpenG function called "Get Strings of Enum" that returns the enum value currently selected and all the strings of the enum.

  • OfficeJet Pro 8600 pro, I can not scan to a NAS or my linux box. The error of the Linux box is:

    OfficeJet Pro 8600 pro, I can not scan to a NAS or my linux box.  Web browser for the Linux of the error box is: "you can't use this feature because it has been disabled."  For more information, contact your network administrator or the person who set up the printer. When I try to send the file to a NAS by IP address, password, and account name it tells me that the file is not found.  I can get on the site by copying the ip address and the path to my dir browser.

    In the Linux box, I can print to the printer.

    Sorry, but HP does not support the Linux operating system.  The only thing that HP offers for Linux support can be found here.

  • Error message: "the instruction at oxo656edab referenced memory at oxo6d20e8. The memory could not be read', play Pogo games.

    Original title: Pogo games

    I'm playing a game on pogo and when I try to activate a games, this warning comes up and won't let me play a game.  The warning States the following, "the instruction at oxo656edab referenced memory at oxo6d20e8.  The memory could not be read.   Help!  What should I do

    Hello Barb,

    1. you are trying to play games online?

    2 are you facing this problem when you play Pogo games?

    3. what web browser do you use?

    If you use Internet Explorer, then try the work around described in the following article:

    You may receive an error "memory could not be read" message when you click certain Web site links in Internet Explorer 6

    You can also read the following article and check if it helps.

    Internet Explorer is slow? 5 things to try

  • need help in the instruction box

    Dear experts,

    IM using oracle 11g

    CREATE TABLE PAYLOG

    (

    ID VARCHAR2 (20).

    DESCRIPTION VARCHAR2 (20)

    );

    INSERT INTO PAYLOG VALUES ("1, ' NOT CAPTURED");

    INSERT INTO PAYLOG VALUES(2,'CAPTURED');

    INSERT INTO PAYLOG VALUES(3,'APPROVED');

    Here is the example output query example, I needed to know.

    SELECT THE CHECK BOX

    WHEN DESCRIPTION = 'CAPTURED' and 'APPROVED' - THEN when the captured data are currently it should display approved

    Where description = 'CAPTURED or APPROVED' then 'approved' - when the data "CAPTURED or APPROVED" is present then display approved

    When the description not in ("CAPTURED", "NO CAPTURE", "APPROVE") then 'rejected' - not in all these 3 data and then display rejected

    ) alias_name

    END

    OF PAYLOG;

    Now, I want to apply the same logic to query below

    with the temp as

    (

    Select

    (CASE

    DESCRIPTION = "NOT CAPTURED" THEN "rejected by the question.

    DESCRIPTION = "CAPTURED or APPROVED" then "APPROVED."

    WHEN NOT IN DESCRIPTION ("CAPTURED", "CAPTURED", "APPROVE") THEN 'OTHERS '.

    )

    snapshot_detail,

    Count (*) NTC, sum (payment_amnt) total

    of PAYLOG

    )

    Select snapshot_detail, sum (NTC) TOTAL_COUNT, sum (total) TOTAL_VALUE, round ((sum (NTC) / sum (NTC) over()) * 100.2) PERCENTAGE

    temp

    Group total, snapshot_detail, cnt

    Union of all the

    Select 'Total', sum (cnt), sum (total) TOTAL_VALUE, round ((sum (NTC) / sum (cnt)) * 100.2)

    temp

    Please help experts.

    What of this

    with temp as
    (
    select snapshot_detail, sum(cnt) cnt , sum(total) total
    from (
        select
          CASE
            WHEN DESCRIPTION        = 'NOT CAPTURED'                      THEN 'Rejected by Issue'
            when DESCRIPTION        = 'CAPTURED' or DESCRIPTION='APPROVED'            THEN 'APPROVED'  ----------------------------i want only one condition to be satisfied here
            WHEN DESCRIPTION NOT IN ('NOT CAPTURED','CAPTURED','APPROVED')THEN 'OTHERS'
          end snapshot_detail,
          count(*) cnt,
          sum(payment_amnt) total
        from paylog
        group by description )
    group by snapshot_detail
    )
    select snapshot_detail, sum(cnt) TOTAL_COUNT,sum(total) TOTAL_VALUE ,round((sum(cnt) / sum(cnt) over()) *100,2) PERCENTAGE
      from temp
     group by snapshot_detail ,total,cnt
    union all
    select 'Total', sum(cnt), sum(total) TOTAL_VALUE,round((sum(cnt) / sum(cnt)) *100,2)
    from temp;
    
  • Error with an instruction box in a region of report

    Hello

    I have a report, when I use the case in the source of the region, I have an error message.

    There are three fields in the report: from, to, resident

    Before the deal, it works very well and as follows:

    Select count (t1.id) pcount, c5, c6, seqnum

    from t1, t2 tablename tablename1 2

    where t1.ID = t2.pid

    and (t1.resident =: P251_RESIDENT)

    or t1... resident2 =: P251_RESIDENT)

    and t1.pdate between to_date(:P251_FROM,'mm/dd/yyyy')

    and to_date(:P251_TO,'mm/dd/yyyy')

    Group of c5, c6, seqnum

    After having added the condition of 'case', I

    1 error has occurred

    • Query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the generic "columns" box below the source of the region without analysis. ORA-00933: SQL not correctly completed command.

    Select count (t1.id) pcount, c5, c6, seqnum

    from t1, t2 tablename tablename1 2

    where t1.ID = t2.pid

    case

    When: P251_RESIDENT is not null then

    and (t1.resident =: P251_RESIDENT)

    or t1.resident2 =: P251_RESIDENT)

    end

    case

    When: P251_FROM is not null and: P251_TO is not null then

    and t1.pdate between to_date(:P251_FROM,'mm/dd/yyyy')

    and to_date(:P251_TO,'mm/dd/yyyy')

    end

    Group of c5, c6, seqnum

    can anyone help?

    Thank you

    Jen

    If you want SQL to return all the lines when the value of the element is zero, you test as part of the WHERE clause directly and adjust your Boolean logic accordingly.

    for example

    WHERE T1.ID=T2.PID
      AND
        ( :P251_RESIDENT IS NULL OR
              ( T1.RESIDENT = :P251_RESIDENT or T1.RESIDENT2 = :P251_RESIDENT )
         )
      and ( :P251_FROM is null OR
                to_date( :P251_FROM, 'mm/dd/yyyy' ) < T1.pdate
            )
      and ( :P251_TO is null
               or T1.pdate < to_date( :P251_TO, 'mm/dd/yyyy' )
       )
    

    Your SQL required so much P251_FROM than P251_TO in order to work.

    It will work with one or the other or both.

    MK

  • Receive the error message "the instruction at"0 x 00424590"referenced memory at"0 x 00000004", the memory could not be"written"." Error is received before the Windows logon prompt

    Receive the error referenced memory before you receive the logon prompt Windows session during the boot process.  Have replaced the RAM on the computer.  Windows Xp SP3.

    If anyone can identify the update that they think that may be the cause of the problem, you can navigate to the uninstall folder and determine what files have been updated.  If they can not start (except in the Recovery Console), you can also sort updates the date by using the dir command in the folder c:\windows (all $NtUninstall records).

    Problem is who writes all updates with Patch Tuesday comes around (say... it's today!-be prepared for positions "broken Windows my computer updates" start coming!).

    For example:

    When you install an update, first installation makes a copy of the files he wants to replace in the $ $NtUninstallKBnnnnnn... folder.

    That's why you can uninstall the update later.  Running uninstall the update will sometimes remove the updated files, then copy the original return files.  Sometimes uninstalling copy just the original preupdate on top of the most recent files.  It can also remove some registry keys, so Windows Update do not think you have more (look at the spuninst.inf file).

    Look at this update of security for example (KB950762) that updates c:\windows\system32\drivers\rmcast.sys:

    If you have installed, it will create this folder:

    c:\windows\$NtUninstallKB950762$

    You will have the front update file c:\windows\system32\dllcache\rmcast.sys in this folder since the installation of the update makes a copy of the original file for you.

    Then look at the file spuninst.txt spuninst folder and you will see what will happen if you need to uninstall the update:

    DEL "c:\windows\$hf_mig$\kb950762\sp3qfe\rmcast.sys".
    COPY 'C:\WINDOWS\$NtUninstallKB950762$\rmcast.sys' 'c:\windows\system32\dllcache\rmcast.sys '.
    COPY 'C:\WINDOWS\$NtUninstallKB950762$\rmcast.sys' 'c:\windows\system32\drivers\rmcast.sys '.
    COPY 'C:\WINDOWS\$NtUninstallKB950762$\spuninst\spuninst.txt' 'C:\WINDOWS\$NtUninstallKB950762$\spuninst\spuninst.tag '.

    In this case, uninstalling just copy the original file on top of the files that have been applied in the update, the spunint.inf updates registry tips and that's all.

    Notice that it also replaces the file in the dllcache folder too - c:\windows\system32\drivers\rmcast.sys is one of the 3498 drop that PAM cares everything (it's number 2500 in the list).  In dllcache files are backup files.

    If you were to access your drivers folder and rename c:\windows\system32\drivers\rmcast.sys to rmcast.lem, almost before you can Flash the 'missing' file will be replaced with the copy in the dllcache folder and you will see this in the event log:

    Event type: Information
    Event source: Windows File Protection
    Event category: no
    Event ID: 64002
    Description:
    File replacement was attempted on the protected system file c:\windows\system32\drivers\rmcast.sys. This file was restored to the original version to maintain system stability. The file version of the system file is 5.1.2600.5598.

    It is WFP in action and this means that WFP is working!

  • Error message: the instruction at oxo5e32570 (or0x05e32570) Ref. 0x0000006c memory could not be written. -What it means and how to fix it?

    Appear when I restart and shut down my computer

    Hi Gary,.

    This error is pretty generic, and can have several causes. However, this is a potential resolution to your question, which is an article that deals specifically with this issue. The link also includes a fix.

    "Error message when you try to shut down Windows Vista:" education to... the memory could not be written "

    http://support.Microsoft.com/kb/937381

    Hope this helps and let us know how it works for you,

    Steve <> Microsoft Partner

  • update with the instruction box

    Hello

    I need to do something like this:

    update my_table set (prelucrat, err) = (select case
                                                             when r.id is not null then
                                                               ('D', null)
                                                             else
                                                               ('N', 'Nu exista persoana cu marca '||r.marca)
                                                           )
    where marca = r.marca and ctiserver = r.ctiserver
    

    But I got an error 'missing right parenthesis.

    'r' is a cursor variable, so this update is nested in one 'for r in (...) ". loop. "

    What I am doing wrong? Is it possible to update both the two columns, then select in this use case?

    Thank you.

    for r in loop (select...)

    Update my_table

    Set prelucrat = nvl2(r.id,'D','N')

    , err = nvl2 (r.id, null, 'Nu exista person cu marca' | r.marca)

    where marca = r.marca

    and ctiserver = r.ctiserver;

    end loop;

    ----

    Ramin Hashimzade

  • Calculation of measurement using the division and the instruction box

    Hello Experts

    I have a measure that calculates the percent of sales by State - "sale by States" / "Total sales" * 100 and the requirement is when the numerator of the measure is < 11 then it should be set to 0. I tried to write a next case statement case when sales by State < 11 THEN 0 ELSE sales by State / "Total sales" * 100. I get an error of syntax ideas how I can make it work.

    Thank you
    RC

    RC,

    It is always useful in the forum when you post your code and the associated error. Of what you provided; It seems that your case statement is missing from the end clause and it should look like this:

    SELECT CASE
              WHEN sales_per_state < 11 THEN 0
              ELSE sales_per_state / "Total Sales" * 100
           END
      FROM your_table
    

    Jeff

  • How to use the instruction box in where clause

    Hi all


    I need to use cases where clause guide me please how I can do it.


    AND WHEN BOX: KAPCO = "KAPCO" THEN cla. CLASS_NAME LIKE '% KAPCO % '.
    WHEN: KAPCO = "NON_KAPCO" THEN SUPERIOR (cla. CLASS_NAME) NOT LIKE '% KAPCO % '.
    WHEN: KAPCO = 'ALL' GOLD: KAPCO IS NULL SO SUPERIOR (cla. CLASS_NAME) LIKE '% '.
    END



    Concerning

    Published by: user10941925 on March 4, 2012 22:31

    Hello

    CASE expressions return a single value, for example a VARCHAR2. They do refer to code fragments.

    You usually don't need (or want) an expression BOX in a WHERE clause, or any other condition. I think that you were trying to do the equivalent of:

    AND     (     (:KAPCO = 'KAPCO'          AND cla.CLASS_NAME       LIKE '%KAPCO%')     -- Don't you want UPPER on this line?
         OR     (:KAPCO = 'NON_KAPCO'           AND UPPER(cla.CLASS_NAME) NOT LIKE '%KAPCO%')
         OR     (NVL (:KAPCO, 'ALL') = 'ALL'       AND cla.CLASS_NAME IS NOT NULL)
         )
    

    If you would care to post some sample data (CREATE TABLE and INSERT statements) and the results desired from this data, I was able to test this.

Maybe you are looking for