Create sequence numbers when importing data

Hi, I am looking to insert data into a table that already has data in.

I have a 2-sequence numbers that I need to include in the statement. The first (RSC_RDSS) must be pulled from another field of SRS_RDS table RDS_SEQ2 where the RDS_SCJC is the same on both records. The second RSC_SEQN must increment by 1 for all existing records.

I currently have a basic script:

INSERT INTO SRS_RSC (RSC_SCJC, RSC_FTIT, RSC_RDSS, RSC_SEQN, RSC_BEGD, RSC_ENDD, RSC_NOTE)
VALUES (' 0848633'/ 2 ', ' ELC100/10: University grammar ', '1', '50', to_date (April 4, 11 '), to_date (April 4, 11 '), 'Test topic' ");

How can I get the RSC_RDSS to another table and how can I get the RSC_RDSS to look at what is in the picture in terms of number of records for this person (RSC_SCJC) and increment by one?

Thanks in advance.

Jonathan

Hello

I'm not sure I understand all your requirements, but here's an example of what you can do:

INSERT INTO SRS_RSC (RSC_SCJC, RSC_FTIT, RSC_RDSS, RSC_SEQN, RSC_BEGD, RSC_ENDD, RSC_NOTE)
select
    '0848633/2' as RSC_SCJC,
    'ELC100/10: Academic Grammar' as RSC_FTIT,
    (select RDS_SEQ2 from SRS_RDS where RSC_SCJC ='0848633/2') as RSC_RDSS ,
    (select max(RSC_SEQN)+1 as RSC_SEQN from SRS_RSC) as RSC_SEQN,
    to_date('04-Apr-11') RSC_BEGD,
    to_date('04-Apr-11') RSC_ENDD,
    'Test heading' RSC_NOTE
from dual;

Please note that each of the 2 subqueries must return only one row.

Hope it helps.

Kind regards
Sylvie

Tags: Database

Similar Questions

  • View failed when importing data mover

    HII,
    IAM HRMS and CS9.0 review-1 installation. When the loading of the peoplesoft using import database in the data mover. I had 1 error in the view. It's as follows:
    Create view SAD_SL_PHONE_VW
    -SQL error. Position of the error: 239 return: 905 - ORA-00905: lack of keyword
    CREATE VIEW PS_SAD_SL_PHONE_VW (EMPLID, PHONE_TYPE, COUNTRY_CODE, PHONE, EXTENSION, PREF_PHONE_FLAG) AS SELECT A.EMPLID, B.PHONE_TYPE, B.COUNTRY_CODE, B.PHONE, B.EXTENSION, B.PREF_PHONE_FLAG OF (PS_PERSON A LEFT OUTER JOIN PS_PHONE_VW B WHERE A.EMPLID = B.EMPLID)
    Error: Unable to process create for SAD_SL_PHONE_VW statement
    Views rest: 2212

    So, how can I continue with it... pls help me.

    Probably bug in forum, wire double
    View failed when importing data mover

    Nicolas.

  • Barcode EPS now lack of numbers when imported CC2015

    We are facing a problem with CC2015 and bar codes.

    When import us codes bar in inDesign CC2014 everything works well. The bars and numbers are visible

    When we import the same file in inDesign CC2015, the numbers the bar beneith disappears. We can also more open the EPS with Illustrator file. (No errors, program just stops)

    We are using Mac OS Yosemite 10.10.5

    We could try another generator of barcodes, but since we have years of 'old' files that we need to be reprinted regularly, we are really just use the same EPS files.

    Also, it seems odd that CC2014 can work with the EPS, but can not CC2015.

    I downloaded an EPS here example: http://edweb.dk/temp/Hannibal2_VSTDVDDK_EAN.zip

    Help, please

    None of these answers were acceptable

    However, the last update of indesign resolves the issue.

  • Cards disappear when importing data

    I configured a FDM location and import format to load directly to Hyperion Enterprise data via a .csv file. My problem came after I try to import the data FDM file. The import is successful, but at the stage of 'Validate', I see that my entire account card mysteriously disappeard FDM, causing no rows of my import data to map correctly. No error messages are displayed. data valid not simply against the previously downloaded account plan. I tried to reconstruct the locations and formats of import from scratch and reupload cards via models, with no luck. Any suggestions are appreciated!

    Thanks in advance.

    You have event scripts?

    FDM would never delete the maps as part of the data load. I think that there is a script. Check your events.

  • LR5 creating unwanted files when importing

    Hello

    first of all I would like to say that I have worked with LR for several years, began with LR3, now 5 and 4; so I would call myself a little lived with her, that's why this problem is driving me crazy! I just got a new computer, PC to imac and so installed the trial versions of LR and PS CC on my new iMac to get everything set up before upgrading to the cloud for the new system. On my old pc, I am running LR 4 and before had 3 and never had this problem before. I took a page that I will attach here. Basically, when I want to import photos from the camera or a card, I select the source, then copy, then the folder that I created on my hard drive, make sure that nothing else is selected if I want to change the name... and in the Destination area, it shows me with the selected images, it will create two new folders. I did not create these files, nor do I want them! Where did they come from? I can't remove them, and if I uncheck mark them all my photos selected will be also unchecked. So I guess there are program some that I'm missing, but for the life of me, I can't find and it drives me crazy! I double checked all my preferences many times. I even made sure that I ticked the box in the general tab - ignore the file names generated by the camera when you name files. What Miss me? I use the iMac with OS X Yosemite10.10.1 5K. Help, please!LR5FileProblem.jpg

    Lightroom is do what you ask, creating folders by date.

    Look at the Options here:

    I think you want "in a folder.

  • LR3 will automatically transfers the keywords of photos created in PSE when importing photos

    Hi eveeryone.

    I'm new to LR3. I would like to import all of my photos in LR3 and all of these photos have keywords tags that have been made to post-secondary studies. LR3 will automatically import the key word tags too? If this is not the case, how would I do?

    Very much appreciate your comments.

    The answer is 'NO', because the import is the WRONG thing to do here.

    The procedure is to have the LR3 to update your PSE catalog. In Lightroom, file-> upgrade of PSE catalog. All your tags will appear in Lightroom as keywords. Couldn't be simpler!

    http://help.Adobe.com/en_US/Lightroom/3.0/using/WS217DEA0F-2A78-4445-89CB-4CED1AFA450E.htm l

  • Mac Mail will not create a file to import when importing .mbox files

    I've recently moved from an old Mac Pro (2008) a new (end of 2013). Both are running El Capitan (OSX 10.11.2) and the latest version of the mail (9.2). My old machine was old enough, so I skipped using Migration Assistant and performed a clean installation.

    I'm a graphic designer and, in the past, I always saved my emails into folders for each customer. When I finished work, I export it as a .mbox and check it in case I need to reference it later. If I need it later, I use "file > import mailboxes," select "import data since: Apple Mail," find the archived .mbox file and select it. " Mail lets know me that he has created a 'Import' folder, and there are my files.

    When I migrated to my new Mac Pro, I exported all my open work files, copied to a drive can be removed and added to the new machine. When I use the method "file > Import Mailboxes" I have just detailed, the import dialog box reads: "You can find boxes imported into the folder named 'Import' in the list of mailboxes mailbox." However, no 'Import' folder is created.

    I tried to leave Mail and reopening so to restart my Mac. I also tried to use "import data from: files in mbox.» In this case, I get a message that says: "error. No valid mbox file was found. »

    Here's the kicker: I created a new folder of email on my new Mac Pro, email at random from being dumped and exported it. When I re-imported, Mail created a new 'Import' folder, just as it is supposed to. It seems that the problem only affects files that I brought over my old camera.

    Any ideas I can try? I can still access my old Mac Pro if necessary.

    Please launch the Console application in one of the following ways:

    ☞ Enter the first letters of his name in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    The title of the Console window should be all Messages. If it isn't, select

    SYSTEM LOG QUERIES ▹ all Messages

    in the list of logs on the left. If you don't see this list, select

    List of newspapers seen ▹ display

    in the menu at the top of the screen bar.

    Click on the clear view icon in the toolbar. Then take an action that does not work the way you expect. Select all of the lines that appear in the Console window. Copy to the Clipboard by pressing Control-C key combination. Paste into a reply to this message by pressing command + V.

    The journal contains a large amount of information, almost everything that is not relevant to solve a particular problem. When you post a journal excerpt, be selective. A few dozen lines are almost always more than enough.

    Please don't dump blindly thousands of lines in the journal in this discussion.

    Please do not post screenshots of log messages - text poster.

    Some private information, such as your name or e-mail address, can appear in the log. Anonymize before posting.

    When you post the journal excerpt, an error message may appear on the web page: "you include content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the forum software. Thanks for posting the text on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

  • Import data from a spreadsheet on the web to the Numbers worksheet

    How can I import data from a spreadsheet on the net in a Numbers spreadsheet, keeping its original format? It is not a problem when you use Microsoft Excel or OpenOffice spreadsheet and had no problem when I was with Appleworks6. When I try in number, however, the data which is along a line on the original worksheet comes to the bottom of the left column, which is completely useless.

    copy the line then pasted in numbers (command C and V command) has always worked well.

    The line of values must be copied from a continuous row of cells.

    If you provide a link to a spreadsheet, I can test it on my machine.

  • Import data to Oracle database when to deploy a CRS using CIM, error!

    Hi all

    I followed the instructions on this page, http://IAM-saminda.blogspot.com/2013/06/Oracle-ecommerce-ATG-102.htmland the CIM console show success when I create the schema and import the data to the Server publication, but when I open the log of the CIM, and show me the following error:

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager Ignoring SQLException when running

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager ' create table (srch_site_cntnt_pri)

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager asset_version number (19) not null,

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager workspace_id varchar2 (40) not null,

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager varchar2 (40) branch_id not null,.

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager is_head number (1) not null,

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager version_deleted number (1) not null,

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager version_editable number (1) not null,

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager pred_version number (19) null,

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager checkin_date timestamp null,.

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager id varchar2 (40) not null,

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager varchar2 (40) content_id not null

    WARNING kills Jul 08 22:43:40 1404877420288 2014 COT/atg/dynamo/dbsetup/database/DatabaseOperationManager, primary key constraint srch_site_cntnt_pp (id, asset_version))'

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager

    WARNING Tue Aug 08 22:43:40 COT 2014 1404877420288/atg/dynamo/dbsetup/database/DatabaseOperationManager to oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)

    If anyone can help me, I'd really appreciate

    Best regards!

    I solved the problem, the regional settings Windows My was "es" for Spanish, and when I mentioned on the CIM, that my locale was 'en', and English, the CIM cannot match the formats and that's why show me this error. Just indicate on the CIM from the local right or just use an English version of your S.O. XD

    Roger

  • File of incorrect date when importing devices

    Hi all

    I have Photoshop elements 10.0, I use this software since version 6, but I have a problem after installing the latest version (10):

    When I use IMPORT from-> camera MEMORY

    I've already selected CREATE a subfolder WITH the DATE OF CAPTURE-> FORMAT yyyy mm gg

    Now I have the same setting, the program saves an incorrect date, so he spends abdelkader gg mm too if I'm delivering yyyy mm gg

    The strange thing is renamed it correctly the single image so gg mm yyyy is really yyyy mm gg

    It's a very big problem because I have to rename every single folder manually; o

    I think that it is a bug in the program (it happens now on a new pc and before on another pc).

    Someone noticed this thing?

    Thank you

    Chiara - Italy

    Cattura.JPG

    Cattura2.JPG

    Cattura3.JPG

    Hello

    Try this fix

    http://helpx.Adobe.com/Photoshop-elements/KB/subfolders-have-incorrect-date-format.html

    Brian

  • Why import data if ready schema and index create, increase in Undo TableSpace

    I have a problem importing data.
    When I export data don't have schema import include the index schema.
    And then I import the schema ready.
    When I import data, I find this Undo TableSpace increase very fast.
    I have therefore two tests.
    1. IMPORT of data and index, every thing ok look
    2 import a schema includes index
    and then import data. Undo Tablespace very rapid increase

    If you mean undo tablespace increase in order to read consisten read.

    N ° cancel space use increases due to the DML. (requests for consistent readings read undo, they generate no cancellation to grow)

    so you're saying that redo log appear, rollback undo segment will increase.

    N ° increase in written cancellations results increase in roll forward.

    IF we import large data, we must export data with the index and import data right now

    If you import large data, you must create the indexes after the data is imported. If the index definitions are included in the export, the default behavior is that import will create them once the data is imported. To do this, undo lower for indexes.
    Note This will generate redo for the creation (but does not cancel and therefore not generate recovery for cancellation). You can avoid this by manually running CREATE INDEX... NOLOGGING - but it means you need to get and modify the scripts CREATE INDEX.

    Hemant K Collette

  • import data into the table with the triggers of the sequence

    Hello

    I'm on oracle 11G on OS SPARC.

    I need to import a table from a dump using "imp."

    At the destination table where I have to import a 'insert before' with the sequence as the primary key.

    Suppose if I am importing data that has the sequence from 200... then when I imported the data into the new table, I have to define the sequence to be the same as the boot sequence for the source or it will automatically use this source sequence.


    Please suggest

    concerning
    Kkurkeja

    Disable the trigger prior to importation.

    Thank you

  • Can we import data to the server target directly without creating a dump file

    Hi all...

    We choose to pass patterns to the target server using the data pump in Import/export.


    in the normal case, I use that way


    1. export the drawings required in the dump by customer 10 g file.
    target 2 - required import patterns directly to the server.



    but when I'd rather pump data is faster and easier.


    but I have a problem here when I export the file from the server only and this file is large (schematics size 80 GB) of data.


    then I need move this file to the target. I don't like it. It will take more time.



    I heard of network link. Can I use this function to import data directly to the target server.


    My big concern here time.




    Thanks in advance

    Yes, if you use the option NETWORK_LINK that no dump file is created on the source server or destination. I would say that the time to complete the task is directly related to the infrastructure of network between the source and destination hosts.

  • insufficient privileges when you create sequence using the procedure

    CREATE OR REPLACE PROCEDURE schema1.proc1 AS
    BEGIN
    EXECUTE IMMEDIATE 'DROP SEQUENCE schema1.add_ins_seq';
    EXECUTE IMMEDIATE 'CREATE SEQUENCE schema1.add_ins_seq MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 1000 NOORDER  NOCYCLE';
    END;
    

    This procedure is created to schema1 by schema1.

    Schema1 boasts a CREATE SEQUENCE privilege.

    When I run this procedure through SQL Developer after the Cup to schema1, the error is thrown in insufficient privilege to CREATE SEQUENCE, however, DROP SEQUENCE is executed. I can create the sequence without the procedure call.

    If I add AUTHID CURRENT_USER so I don't get the error of insufficient privileges.

    Why it gives this error when the owner and the applicant of the procedure is schema1?

    Hello

    1st thing to know: when a procedure is defined (and updated), any privileges granted through ROLE is not taken into account. This is because these privileges can be active or not at the level of the session (as happens if for example a user has active 'role A' in session 1 but not in session 2 and if this role has been used to define a procedure?) The proecedure must at the same time be VALID in session 1 and INVALID session 2? Is not possible.

    Thus, for instance in a situation of 'standard': user SYSTEM has 'DBA Rôle', so you can for example make a sqlplus session "SELECT * v $ instance;", but you would write a procedure owned by system making instance_name SELECT INTO l_variable OF v$ instance;  "then"surprise": the procedure cannot be compiled because of the ORA-904 Table or view does not exist..." To be able to create the procedure, a DSS system needs to be done.

    2nd thing for your special case, a little more complex: default for a procedure is 'AUTHID DEFINE', but once more: it means "privileges of the author creating the procedure", so without taking into account the acquired privileges through roles... Your user name is 'sequence create' through a role, it cannot use the privilege within the procedure.  But... but when you define the procedure with AUTHID CURRENT_USER, privileges are evaluated at run time, and thanks to the active ROLE in the session by calling the procedure, at this time, the user can create the sequence.  If try again you but with 'The VALUE NONE ROLE' in the session before the call, you will again have the question.

    Conclusion: If you need to do the action, you must grant the user the necessary privilege directly.

    Best regards

    Bruno Vroman.

  • How to avoid to create images when importing duplicate?

    I doubt that it is the correct method or better to import/organize my photos, because it creates additional work I would like to avoid.  I'm looking for a solution.

    I do the following:

    • Copy all my photos from my SD card in my folders organized on my external hard drive.
    • Open Lightroom and import photosfrom my external hard drive.

    What happens is that Lightroom creates an image duplicated on my Mac in my pictures folder. At this point, he referred to this directory and not my external hard drive. What I end up doing deletes the pictures in my photos folder.  So I connect all my photos in Lightroom on my external drive.

    As you can imagine, it becomes tedious to do this every time I have import in Lightroom.

    My idea situation is Lightroom NOT to reproduce images or put them in any folder, but simply refer to those that I chose when importing to my external hard drive.

    Any help would be much appreciated.

    It's probably because you select the option COPY the top of import dialog when you should be by selecting the Add option.

    COPY the images of copies from one place to another and to import them.

    ADD add just the images in the LR catalog where they are currently.

    There is also the possibility of "make the second copy to:" on the side right of the dialog import but this option is only available with either COPY it, MOVE or COPY as DNG options. You need to add the option to add images in the catalog file LR in the place where they are already on your external drive.

Maybe you are looking for