problem using sequences of a diagram to another diagram

My current application is schema1 and now we have another scheme called schema2 where we created our new tables and sequences. But the new pages that we created in the earlier application only. To access the new schema tables we saw grant insert, update, delete, select on schema2.table_name to schema1.table_name. By doing this, we are able to create the page using the new schema tables. But when you try to create the form on the table or view, we use the new sequences created in the new scheme. but it is the error to launch
ORA-06550: line 5, column 23: PL/SQL: ORA-02289: sequence does not exist ORA-06550: line 5, column 16: PL/SQL: SQL Statement ignored ORA-06550: line 8, column 16: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 8, column 9: PL/SQL: Statement ignored
 Error Unable to get primary key item value.  
OK 
 
Concerning

How are you the access to the content of the sequence?

SQL> connect alex/alex@localhost/orcl11
Connected.
SQL>
SQL> drop sequence seq
  2  /

Sequence dropped.

SQL>
SQL> create sequence seq
  2  /

Sequence created.

SQL>
SQL> grant select on seq to scott
  2  /

Grant succeeded.

SQL>
SQL> connect scott/tiger@localhost/orcl11
Connected.
SQL>
SQL> select seq.nextval
  2    from dual
  3  /
select seq.nextval
       *
ERROR at line 1:
ORA-02289: sequence does not exist

SQL>
SQL> select alex.seq.nextval
  2    from dual
  3  /

   NEXTVAL
----------
         1

SQL> 

Prefix in the sequence with the schema name or create a synonym for it

(you have not need to grant ALTER privileges in order to to use)

Tags: Database

Similar Questions

  • Problem using sequence.nextval in java prepared statement

    Hi guy,

    Has anyone tried to put sequence.next in the prepared statement in java? I have a few questions to use.


    example below


    private static final String SQL_insertEQFCYPRICE = "INSERT INTO TABLE ()"
    + "col1, col2, col3.
    + "VALUES (seq1.nextval,?,?,?)"; "


    Kind regards
    John

    'keycol' was something I composed for an example, because youre statement tried to insert 4 values but had only specified 3 columns...

    If you have a table, and the sequence as follows:

    Command > create table t1 (pk1 number, c2 char (10));
    Command > create sequence s1;

    and you run this statement:

    Command > insert into t1 values (s1.nextval, 'abc');
    1 row inserted.

    You get the correct result:

    Command > select * from t1;
    < 1,="" abc="">
    1 row found.

    To do this in Java you would prepare the following statement:

    insert into t1 values (s1.nextval?),

    then, before each execution of the prepared statement you would use the 'set' method to set the desired parameter 2 input value. Works very well.

    Chris

  • Problem using state diagram in labview 8.6

    Hi all

    I have a toolkit of state diagram that come with lv7.1.

    But after that I installed in the lv8.6 folder, there is a problem.

    I can't change the schema that I create in front lv7.1.

    Thank you.

    Robert

    I was using the Toolbox state diagram for several years. Unfortunately, this free kit is no longer supported (at least 2 years) by OR due to the much more powerful - but also much more expensive - Statechart Module.

    Fortunately, this toolkit still work with current versions of LV. I currently use it with LV2009. The bad news is that unless miss me workaround, you can install it only for one version of LV as a result, it will be possible to use it after you install with LV8.6 with LV7.1.

  • In my adf application, I use sequences, the problem that I face, is that this sequence break at 2:21 or three insertions. Any reason?

    Mr President

    In my adf application, I use sequences, the problem that I face, is that this sequence break at 2:21 or three insertions. Any reason?

    Concerning

    How can I correct this situation?

    Well, look at your definition of the sequence and correct

    There are CACHE 20 then change or recreate your sequence and use NOCACHE

    Dario

  • I'm having a problem using the slideshow module in LR 6.3. The slideshow contains the background image as one of the images to display. Earlier, I had created a slideshow of practice and the background image was not displayed as an image in itself. How to

    I'm having a problem using the slideshow module in LR 6.3. The slideshow contains the background image as one of the images to display. Earlier, I have created a slideshow of practice and the background image was not displayed as an image in itself. How to make it behave?

    Another approach, perhaps a little more elegant (?). Create a collection that includes images for the slideshow. Include the background image in the collection. Drag the background image in the Panel to designate. Then, remove this image from the collection and create the slide show. I just tried and it works, too.

  • problem of sequences

    Hi all

    I have a large table that contains the 3810986 lines. We have sequences generated on the primary key column (chr_val_id).

    When we do the following query

    SELECT CHR_VAL_ID_SEQ. NEXTVAL FROM DUAL we can see that the nextval is 1615. However in the table already a record is here with the same identifier. I guess another operation loading data without using sequence.

    Now my question is, how do I reset or set the value of sequence CURRVAL and NEXTVAL? while I can point it (NEXTVAL) to the max (chr_val_id) last?

    I gave the structure of the table below for your reference...
    CREATE TABLE CHR_VAL_T
    (
      CHR_VAL_ID         NUMBER                     NOT NULL,
      CHR_VAL_CODE       NUMBER                     NOT NULL,
      CHR_ID             NUMBER                     NOT NULL,
      NUMRC_VAL          NUMBER,
      UOM_ID             NUMBER,
      DT_VAL             DATE,
      DSCR_ONLY_FLG      VARCHAR2(1 CHAR)           DEFAULT 'N'                   NOT NULL,
      CMRCLY_SNSTVE_FLG  VARCHAR2(1 CHAR)           DEFAULT 'N'                   NOT NULL,
      CPY_ITEM_VAL_FLG   VARCHAR2(1 CHAR)           DEFAULT 'N'                   NOT NULL,
      INTRNL_USE_FLG     VARCHAR2(1 CHAR)           DEFAULT 'N'                   NOT NULL,
      EXCLUDE_FROM_HDNG  VARCHAR2(1 CHAR)           DEFAULT 'N'                   NOT NULL,
      AUTO_DFLT          VARCHAR2(1 CHAR)           NOT NULL,
      AVAILABLE_FROM_DT  DATE                       NOT NULL,
      AVAILABLE_TO_DT    DATE                       NOT NULL,
      CRTD_BY            VARCHAR2(50 CHAR)          NOT NULL,
      CRTD_DTTM          DATE                       NOT NULL,
      UPD_BY             VARCHAR2(50 CHAR)          NOT NULL,
      UPD_DTTM           DATE                       NOT NULL,
      LCK_NUM            NUMBER                     NOT NULL,
      DEL_IND            VARCHAR2(1 CHAR)           DEFAULT 'N'                   NOT NULL,
      CNSLDTD_ITEM_MOD   VARCHAR2(1 CHAR)           DEFAULT 'N'                   NOT NULL,
      MOD_TYP            VARCHAR2(1 CHAR)           DEFAULT 'S'                   NOT NULL
    )
    
    ALTER TABLE CHR_VAL_T ADD (
      CONSTRAINT CHR_VAL_PK_IDX
     PRIMARY KEY
     (CHR_VAL_ID));

    Hello

    First, understand what niumber should be to generate the sequence:

    SELECT  MAX (chr_val_id)
    FROM    chr_val_t;
    

    Let's say the result is 3810986.
    Subtract the value of the sequence: 3810986-1615 = 3809371.
    Change the sequence, it is its value incement, then select NEXTVAL:

    ALTER SEQUENCE chr_val_id_seq  INCREMENT BY 3809371;
    
    SELECT  chr_val_id_seq.NEXTVAL
    FROM    dual;
    

    At this stage, the sequence is higher than any number in the table.
    Redefine the increment to 1 (or whatever it was before):

    ALTER SEQUENCE chr_val_id_seq  INCREMENT BY 1;
    
  • USING SEQUENCES IN PACKAGE SPEC

    I want to use Sequence.NEXTVAL & Sequence.CURRVAL in the package. How can I report the sequence of global variable and make them available for all procedures stored inside the package?

    Any help much appreciated...

    Thank you all in advance

    Data Boy wrote:
    No, I know who, but directly using SEQUENCES. CURRVAL inside the Insert statement is not a good practice.

    We need to declare a variable in this procedure and then extract the SEQUENCE. CURRVAL in this variable
    and use this variable within the insert statement. But we have this scope variable will only be available within this procedure.
    If I want the same CURRVAL in another stored procedure. How can I get... That is my Question.

    What exactly are you trying to achieve?

    If it is a case of needing to know the value of the sequence number assigned to an inserted record, you would normally use the RETURNING clause on the Insert...

    SQL> create table temp (id number, val varchar2(20));
    
    Table created.
    
    SQL> create sequence temp_seq;
    
    Sequence created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create trigger trg_temp before insert on temp
      2  for each row
      3  begin
      4    select temp_seq.nextval into :new.id from dual;
      5* end;
    SQL> /
    
    Trigger created.
    
    SQL> set serverout on
    SQL> declare
      2    v_num number;
      3  begin
      4    insert into temp (val) values ('Fred') returning id into v_num;
      5    dbms_output.put_line('ID inserted was: '||to_char(v_num));
      6  end;
      7  /
    ID inserted was: 1
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from temp;
    
            ID VAL
    ---------- --------------------
             1 Fred
    
    SQL>
    
  • Problem using multiple declarations

    I'm having a problem using several WITH instructions. Oracle seems to be waiting for a SELECT statement after the first. I need two to refer to things from each other in another query.

    Here is my code:

    < code >
    WITH calculate_terms AS (SELECT robinst_current_term_code,
    CASE
    WHEN robinst_current_term_code LIKE ' %' 60' THEN robinst_current_term_code - 40.
    WHEN robinst_current_term_code LIKE ' %' 20' THEN robinst_current_term_code - 100.
    END first_term

    CASE
    WHEN robinst_current_term_code LIKE ' %' 60' THEN robinst_current_term_code - 100.
    WHEN robinst_current_term_code LIKE ' %' 20' THEN robinst_current_term_code - 160.
    END second_term

    OF robinst
    WHERE robinst_aidy_code =: sanra)

    / * Use the terms of calculate_terms to generate attendance periods * /.
    WITH gen_attn_terms AS
    (
    SELECT
    CASE
    WHEN first_term AS '60% ' THEN 'fall'. substr (first_term, 0, 4)
    WHEN first_term LIKE '% 20' CAN 'spring'. substr (first_term, 0, 4)
    END first_attn_period

    CASE
    WHEN second_term AS '60% ' THEN 'fall'. substr (second_term, 0, 4)
    WHEN second_term LIKE '% 20' CAN 'spring'. substr (second_term, 0, 4)
    END second_attn_period

    OF calculate_terms
    )

    SELECT *.

    OF gen_attn_terms
    < code >

    I get ORA-00928: SELECT key word error absent. What could be the problem?

    You can just separate them with a comma:

    WITH calculate_terms AS (SELECT robinst_current_term_code,
    CASE
    WHEN robinst_current_term_code LIKE '%60' THEN robinst_current_term_code - '40'
    WHEN robinst_current_term_code LIKE '%20' THEN robinst_current_term_code - '100'
    END first_term,
    
    CASE
    WHEN robinst_current_term_code LIKE '%60' THEN robinst_current_term_code - '100'
    WHEN robinst_current_term_code LIKE '%20' THEN robinst_current_term_code - '160'
    END second_term
    
    FROM robinst
    WHERE robinst_aidy_code = :aidy),
    
    /*Use terms from calculate_terms to generate attendance periods*/
    gen_attn_terms AS
    (
    SELECT
    CASE
    WHEN first_term LIKE '%60' THEN 'Fall '||substr(first_term,0,4)
    WHEN first_term LIKE '%20' THEN 'Spring '||substr(first_term,0,4)
    END first_attn_period,
    
    CASE
    WHEN second_term LIKE '%60' THEN 'Fall '||substr(second_term,0,4)
    WHEN second_term LIKE '%20' THEN 'Spring '||substr(second_term,0,4)
    END second_attn_period
    
    FROM calculate_terms
    )
    

    Not yet tested there is no scripts.

  • Hello, my phone pulled from my class at school and it has no data on it, so I did not no how to locate without using find my iphone is there another way I could find as soon as possible

    Hello, my phone pulled from my class at school and it has no data on it, so I did not no how to locate without using find my iphone is there another way I could find as soon as possible

    Go to iCloud.com

    Then sign in with your Apple ID and password, then click the Find iPhone.

    If this does not help, see: If find my iPhone is not activated on your missing device > what to do if your iOS device is lost or stolen

  • Compaq Evo D5pM - problems using this model number, never find what he listed...

    Compaq Evo D5pM - (Pent4 - 1.7 GHz) problems using this model looking for parts or information number.  Serial number has not been useful.

    Someone said "aka Compaq D510." Trying to buy memory model (found on the case) my number wasn't so I tried to use D510 (it was listed). Apparently not the same computer / mine use 168 pins sticks and D - 510 came 188 pins. I did my 'upgrade' purchase by check the number of pins and using the already installed type.

    My computer is a vertical minitower - looks like D - 510-, but like I said the components are different.

    I was wondering if anyone knows a model Compaq Evo w / same components (P4 1.7 GHz; 168 pin memory) I could use for research purposes. The smallest horizontal model Evo often uses different (smaller) maps, etc..

    Tried the Ctrl-Alt-S keyboard shortcut to bring up the model number (etc.), but my keyboard shortcuts do not work on this computer. Run a search for edge came up with nothing to tune.

    I tried HP support and drivers.  With the help of several model numbers and found that absolutely nothing for HP Compaq or "Compaq" is in the list.

    It is a great 3rd computer that I've updated w / spare parts, use it remotely, especially for music. Only problem was the dark model number. If anyone has something useful to add would be most appreciated. Thanks in advance...

    PS I'm currently trying to identify MB for what it's worth, but a number of alternative model that works would be great.

    Hello:

    Your model is a d500 CMT HP.

    1 GB 128 x 64-133 MHz PC133, 168P DIMM, 3.3V, sync

    Type of memory: , (non - ECC)
    Maximum memory: 3 GB
    Slots: 3

    This is the page for support and drivers for your PC.

    http://h20566.www2.HP.com/portal/site/hpsc/public/PSI/home/?cc=us & lang = in & sp4ts. OID = 96294 & Task = & AC.admitted = 1389381517647.876444892.199480143

    QuickSpecs:

    http://h18000.www1.HP.com/products/QuickSpecs/productbulletin.html#spectype=North_America & type = HTML & docid = 10946

    Because nobody does more than the memory, it will be hard to find and very expensive.

    You can plan on paying more $ $70 / 1 GB chip if you do not find the specification above used on a place like eBay.

    You can buy a newer, faster CMT from HP on eBay for less than $70 delivered.  Memory is much cheaper to buy as well.

    http://www.eBay.com/ITM/HP-DC7600-Pentium-4-3-0GHz-40Gb-512MB-DVDRW-XPPRO-30-day-warranty-/281231108334?PT=Desktop_PCs & Hash = item417aae28ee

  • I have problems using the parental control. I want to block facebook from a user account. I have facebook in the ban list, but apparently not block. I have Vista. What should I do to block facebook?

    I have problems using parental controls. I want to block facebook from a user account. I have facebook in the ban list, but apparently not block. I have Vista. What should I do to block facebook?

    Have you followed all the steps like that?

    http://www.howtogeek.com/HOWTO/Windows-Vista/use-parental-controls-to-filter-websites-in-Windows-Vista/

    It is an alternative.

    http://explore.live.com/Windows-Live-Family-Safety?OS=other

    http://Windows.Microsoft.com/en-us/Windows-Vista/protecting-your-kids-with-family-safety

    If this post answers your question, click mark as answer .

  • unknown problem using WMP 12 no sound when played the song in the folder but has sound when he played in the player

    Hi all

    I have a weird problem using WMP (Windows Media Player v12).  When I double-click a song of in my library, the trail seems to play, but didn't have all the sounds.

    However, if I hover over the same path and then click Preview, the pop-up, the track plays with sound.

    When the track (s) do not play, all indications show the way to correctly play through of progress ' Now Playing ' screen, but no sound.

    In the past, when I clicked on any MP3 file, he would play using WMP.  Now, when I click on an MP3 file, it brings just "Now Playing" and looks LIKE he plays, but no sound.

    I have looked & looked for clues as to why it may be of WMP, but I can't understand the problem.  I also searched the Web for 'day' drivers in the Win System Manager, but Win says that pilots are "up to date".

    I have rebuilt the DB Library (twice) by removing the DB files in from WMP to a procedure in a WMP support forum. I also went to check the audio device in Device Mgr Win (mine is one on one). Everything seemed ok.  I also changed the devices to "Win by default" to what I think my onboard audio device is called.  I thought that that can do, but it's not.

    I was struggling with this since the day of the year.  Please help me solve this problem!

    Here is a link to my system features:

    http://Speccy.Piriform.com/results/0JAQshtlODwFxgwHeGb4rfq

    Hi, Pie,

    Welcome to the Microsoft community.

    Appreciate your efforts to try to resolve the problem that you have set so far. I guess that is not a problem with the driver that ultimately, the songs are playable using the media player. It could be a corrupted in Windows Media Player framework that is causing the problem. Let's run the Windows Media Player troubleshooting utility that resets all parameters to the player. Check out the link to do so:

    http://Windows.Microsoft.com/en-za/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Please let us know the results.

  • problems using the snap have amd, playback of Jpeg files

    Original title: I'm having problems using the component feature snap-in.

    Sometimes a single document disappears. When this happens while the document program is managed by then will not work. The document seems to be flying around the office. The last time this happened I had a doc JPEG upward and now I can't see what is JPEG. I don't know why the document wants to fly around, and I don't know how to get my use of the JPEG back.

    Hey Graham,.

    To view all jpeg images in the Viewer Windows photo or any other photo software visualization, you must configure this software as a default value in the default programs.

    Check out the link that allows you to configure the program as default.

    http://Windows.Microsoft.com/en-in/Windows7/change-which-programs-Windows-uses-by-default

    You can try to run the Aero Troubleshooter and see if that makes a difference.

    http://Windows.Microsoft.com/en-in/Windows7/open-the-Aero-Troubleshooter

    If the problem persists, provide us newspapers observer of events, as well as the error message if you receive a message.

    http://Windows.Microsoft.com/en-in/Windows7/open-Event-Viewer

  • If you install and activate your Lightroom on a single computer, and dies from this computer, is it possible that you can use the same serial number on another computer?

    If you install and activate your Lightroom on a single computer, and dies from this computer, is it possible that you can use the same serial number on another computer?

    With most of their applications, you can disable it on a single computer, and then turn on another.  I'm not 100% sure of Lightroom, however.

  • Problem using the REST API by wavemaker

    Hello

    I have a problem using other api with wavemaker. When I do a query GET with the RESTClientin FireFox, everything is fine for example:

    get https://XXX.XXX.XXX.XXX:8281 / vco/api/result:

    1. Status Code: 200 OK
    2. Cache-Control: private
    3. Content-Type: application/xhtml+xml;charset=UTF-8
    4. Date: Sun, 06 Apr 2014 16:50:04 GMT
    5. Expires: Thu, 01 Jan 1970 00:00:00 UTC
    6. Server: Apache-Coyote/1.1
    7. Transfer-Encoding: chunked

    But when I try to connect to the same url using wavemaker I recive: the answer is not in a valid XML Format.

    I use Orchestrator 5.5 and far as I could see the token is no longer required in the header. Anyone know why I get this error message?

    Thank you!

    Well half a day looking, then finally I thought to it:

    The header should be: accept: application/xml

Maybe you are looking for

  • Bluetooth IPad2 &amp; IPhone iOS 9.3.3 6

    or my iPhone or iPad is no longer will pick up all new devices. They worked fine until about 2 months ago I updated to the latest IOS, rebooted, switched Bluetooth turn off on both, but no change. When I search new devices, looks like it is looking (

  • I just new HP Pavilion - 17z product M7e01av.

    Ordered to the blue tooth, but he continues to seek and does not connect to devices that it locates.

  • The A7-40 or the A7-50 has the zoom feature?

    HI there, it is a question before you buy the product, I was hoping that there was a feature of zoom (using the thumb and index fingers), It is mentioned in the manual A10-70 (end of Chapter 2 for internet browsing and connection) but not in the manu

  • How to convert hex 8 bytes floating point double?

    Hello I want to know how to convert a string of 8 bytes of data double floating-point. data (HEX): 40 02 70 40 00 00 00 4F Thank you. DP

  • I can't download important updates - error code 0x800705b4 unknown

    I can and discovered that several important updates have not been installed in my computer - I discovered that the package version of Microsoft 4.02.20110411 (problem of determination that prevent you from updating the windows updates) should take ca