Using Sequence in ODI

Hi I am very new to this tool can anyone tell me how to use sequence and populate Primary key in my Oracle target table. I am doing File to Oracle Mapping.
I am using ODI sequence but i am getting errors like:
933 : 42000 : java.sql.SQLException: ORA-00933: SQL command not properly ended
and also delete previous check sum in Session Control
Need ur reply asap

Thnx Madha!
I have change my KM to IKM SQL Control Append but the problem still persists.
I am getting the same error message in the control workflow (~Operator Window).
1] Control-<TGT_SECURITYSEGMENT_DIMENSION>-Create Check Table and also
2] Control-< TGT_SECURITYSEGMENT_DIMENSION>-delete previous check sum
The Description of the same is:
create table Exception getObjectNameDefaultPSchema("L", "SNP_CHECK_TAB", "W") :
CATALOG_NAME VARCHAR2(100 CHAR) NULL ,
SCHEMA_NAME VARCHAR2(100 CHAR) NULL ,
RESOURCE_NAME VARCHAR2(100 CHAR) NULL,
FULL_RES_NAME VARCHAR2(100 CHAR) NULL,
ERR_TYPE VARCHAR2(1 CHAR) NULL,
ERR_MESS VARCHAR2(250 CHAR) NULL ,
CHECK_DATE DATE NULL,
ORIGIN VARCHAR2(100 CHAR) NULL,
CONS_NAME VARCHAR2(35 CHAR) NULL,
CONS_TYPE VARCHAR2(2 CHAR) NULL,
ERR_COUNT NUMBER(10) NULL
and error is :
922 : 42000 : java.sql.SQLException: ORA-00922: missing or invalid option
[Note: The above create table script is generated by CKM Oracle Knowledge Module].
I am using CKM Oracle KM for the Primary key constraint in My target Oracle Table. I think the Problem is somewhere else.
Please Help.

Similar Messages

  • Using native database sequences in ODI

    Hi,
    I am using ODI 11.1.1.7.0 on windows 64 bit machine.
    I have written the following queries:
    create table sequence_src (EmpName varchar(20), salary int);
    create table sequence_tgt( CustId int, CustName varchar(20));
    create sequence emp_sequence
    minvalue 101
    maxvalue 999
    start with 101
    increment by 1;
    insert into sequence_src values('abc',1000);
    insert into sequence_src values('sdsd',2000);
    insert into sequence_src values('ress',3000);
    insert into sequence_src values('zzx',4000);
    insert into sequence_src values('dsw',5000);
    commit;
    So as you see i have created sequence named emp_sequence in my database
    When i map the target column i.e EmpID with the following implementation
    EMP_SEQUENCE.NEXTVAL
    I get an error when the interface runs saying  " EMPID" is an invalid identifier on target connection oracle
    how to solve this error?
    can anyone tell how to use database native sequences in ODI       
    EDIT: This is complete error log
    ODI-1228: Task native_sequence (Integration) fails on the target ORACLE connection all_oracle11g_server.
    Caused By: java.sql.SQLSyntaxErrorException: ORA-00904: "EMPID": invalid identifier
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
      at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1115)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3954)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1539)
      at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
      at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
      at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
      at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
      at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
      at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
      at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
      at java.lang.Thread.run(Thread.java:722)

    Hi,
    SaichandVaranasi
    This is error log
    insert into ODIWR.I$_SEQUENCE_TGT
      CUSTNAME,
      IND_UPDATE
    select
    CUSTNAME,
      IND_UPDATE
    from (
    select 
      SEQUENCE_SRC.EMPNAME CUSTNAME,
      'I' IND_UPDATE
    from ODIWR.SEQUENCE_SRC   SEQUENCE_SRC
    where (1=1)
    ) S
    where NOT EXISTS
      ( select 1 from ODIWR.SEQUENCE_TGT T
      where T.CUSTID = S.CUSTID
      and ((T.CUSTNAME = S.CUSTNAME) or (T.CUSTNAME IS NULL and S.CUSTNAME IS NULL))

  • How to use Sequence in Forms

    Hi,
    I have an Empno Column, At the time of Opening a Form The Empno Will be displayed by using Sequence.
    If the User doesn't save the Form Then the Empno Generated number will be changed.
    How to write the code to get sequence numbers at Empno columns by using Sequence?
    Thanks & Regards,
    Hari Babu

    Ok, I understand now your question. Since the oracle sequence is commited in a separate transaction, it is not possible to get the no-gap sequence, considering your example. In the other hand, if you don't commit immediately, than two concurrently opened forms could use the same sequence number, so you'll get the duplicate key!
    If you're sure that this couldn't happen, you can manage your own sequencing, storing them in another table. Let's say you reached seq 999: entering the form, you'll read from your sequence table 1000, increment to 1001, and assign it to empno, but without commiting. Next time, you'll get the same number, until you commit form, and at the same time, change in seq table. So another will get 1001.
    Downside of this approach are, as mentioned before, concurrent sessions, which will get the same sequence.

  • Comenting code - style - how to keep coments where you want them - without using sequences

    Silly question maybe about style of commenting.
    Basically i like to use sequence boxes to keep comments on my diagram beside the bits of code that they refere to - otherwise when you use diagram cleanup (which i'm afraid i use all the time) they go anywhere.  This is good - except that i found especially when doing FPGA programming the sequence boxes reduce the amount of parralelism that can go on - since the 'box' needs to finish before any of the outputs can be used.  Is there some other method i should be using instead of sequence boxes to keep text beside elements - without enforcing that a set of elements are fixed in one place?
    Solved!
    Go to Solution.

    I usually use labels of structures (loops, cases, etc) and labels of diagram constants, etc. for comments. In newer versions, we also have wire labels.
    (see also)
    What is your LabVIEW version? Also the LabVIEW 2011 cleanup does a better job keeping diagram comments together with the related code compared to earlier version.
    LabVIEW Champion . Do more with less code and in less time .

  • Error Using Sequence in Weblogic

    I tried to use Sequence object in weblogic to generate auto-imcremental integers
    for my db insert keys. I first create a mydbsequece in oracle database. Then,
    I built a class in which I obtain a dataSource using jndi to look for my dataSource.
    And then use the ds to getConnection. After I had the connection, I do the following:
    Sequence sequence = new Sequence(con, "mydbsequence");
    int i = sequence.nextValue();
    When I call sequence.nextValue() method, I got the following error message: NullPointerException
    at Weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:65).
    Does anyone know what causes this error? and How do I fix it? Please advise me
    on this. Thank you very much.
    Qin

    Qin Ding wrote:
    >
    I tried to use Sequence object in weblogic to generate auto-imcremental integers
    for my db insert keys. I first create a mydbsequece in oracle database. Then,
    I built a class in which I obtain a dataSource using jndi to look for my dataSource.
    And then use the ds to getConnection. After I had the connection, I do the following:
    Sequence sequence = new Sequence(con, "mydbsequence");
    int i = sequence.nextValue();
    When I call sequence.nextValue() method, I got the following error message: NullPointerException
    at Weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:65).
    Does anyone know what causes this error? and How do I fix it? Please advise me
    on this. Thank you very much.
    QinSequence is a non-standard JDBC object. It is an Oracle-specific class, which presumably
    takes a standard java.sql.Connection in it's constructor. Oracle has repeatedly created
    such new classes with methods claiming to take java.sql.* arguments, but in fact they
    require an Oracle-specific class. In this case, however, we might succeed anyway if
    we dig some. Can you show me the entire stacktrace of the exception?
    Please take the attached jar file, and put it in front of all the weblogic stuff
    in the server's classpath, and repeat the problem and show me the new exception.
    From the line, I am assuming you're on the 6.1 version of WebLogic. If not, forget the
    jar, and let me know.
    Joe
    [61rmicon.jar]

  • Using sequence  in view

    hi gurus
    SQL> create view v1 as select s1.nextval from dual;
    create view v1 as select s1.nextval from dual
    *+
    ERROR at line 1:
    ORA-02287: sequence number not allowed here
    Are there only workaround?
    Thank you!

    There are some restrictions on using sequences you will want to know about
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/views.htm#sthref3092

  • USING SEQUENCE IN PACKAGE SPEC

    I Want to Use Sequence.NEXTVAL & Sequence.CURRVAL throughout the package. How can i declare the global sequence variable and make them available for all the stored procedures inside the package ?
    Any help highly appreciated..
    Thank you all in advance

    Data Boy wrote:
    No i know that but using directly SEQUENCE.CURRVAL inside the Insert statement is not a good practice.
    We need to declare inside the procedure a variable and then fetch the SEQUENCE.CURRVAL into that variable
    and use that variable inside the insert statement. But we that variable scope will be available only inside that procedure.
    if i want the same CURRVAL in another stored procedure. How can i get it ..that is my Question.What exactly are you trying to achieve?
    If it's a case of needing to know the value of the sequence number assigned to an inserted record you would typically use the RETURNING clause on the insert statement...
    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>

  • Using sequence in sqlldr

    hi
    can we use already existing db sequence in sqlldr control file
    regards
    kedar
    attached is control file but i want to use nextkey_seq to populate client_id
    LOAD DATA
    INFILE 'COMM.csv'
    APPEND
    INTO TABLE COMMUNITY_REGISTER
    FIELDS TERMINATED BY '~' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (CLIENT_ID,
    SURNAME,
    DATE_OF_BIRTH DATE "YYYYMMDD" ,
    SEX,
    DATE_LAST_UPDATED DATE "YYYYMMDD" ,
    CURRENT_STATUS,
    DATE_OF_CURRENT_STATUS DATE "YYYYMMDD" ,
    INITIAL_STATUS,
    DATE_OF_INITIAL_STATUS DATE "YYYYMMDD" ,
    GP,
    GPTYPE,
    LEAD_HCP,
    STAFF_TYPE,
    NHS_NUMBER,
    COMMUNITY_ID,
    MOTHERS_ID,
    PREVIOUS_SURNAME,
    FORENAME,
    TITLE,
    ALIAS,
    STREET_NO,
    STREET,
    LOCALITY,
    TOWN,
    COUNTY,
    POSTCODE,
    HEALTH_AUTHORITY,
    PHONE_NUMBER,
    INITIAL_SECTOR,
    CURRENT_SECTOR,
    REG_DISTRICT,
    OPCS_BIRTH,
    OPCS_RESIDENCE,
    ETHNIC_ORIGIN,
    CHANGED_BY_ID,
    CHILD_HEALTH_EXISTS,
    DIAGNOSES_EXISTS,
    TEXT_EXISTS,
    SPECIAL_NEEDS_EXISTS,
    ADMISSION_EXISTS,
    CHILD_PROTECTION_EXISTS,
    NEXT_OF_KIN_ID,
    NOK_RELATIONSHIP,
    NHS_TRACE_RESULT,
    PAS_NUMBER,
    REGISTRATION_ORIGIN,
    NBH_STATUS,
    SECTOR,
    MOBILE_NO,
    AUDIT_TIMESTAMP DATE "YYYYMMDD" ,
    AUDIT_ID,
    AUDIT_ORIGIN,
    TRANSFER_CHECKED,
    LAST_ACTION,
    RECORD_STATUS,
    TRACE_RESULT_DATE DATE "YYYYMMDD"
    )

    Kedar,
    You sure can use sequence nextkey_seq.nextval in your control file (don't remember the exact syntax, but you can find it in Utilities manual for SQL*Loader

  • How to use sequence in MS sql server?

    In Oracle DB we use sequence like that:
    SequenceImpl s = new SequenceImpl("customer_seq", getDBTransaction());
    Integer next = (Integer)s.getData();
    setId(new Number(next.intValue()));
    But there is no sequence in sql server ,how can I do?
    Thank you~~

    MS SQLServer have a IDENTITY column property and UNIQUEIDENTIFIER data type that is somewhat similar to Oracle's sequence. I don't know whether your table contain either of these, or you just want to set sequential number to a column.
    Below is some info about IDENTITY and UNIQUEIDENTIFIER you may already know since they are in SQLServer Book.
    IDENTITY property: You can define IDENTITY property on a numeric column. You can set the seed and increment on this column property very much like Oracle's sequence. The only thing I think it does not have is the "nextval". You can use IDENT_CURRENT function or @@IDENTITY after an INSERT or SELECT INTO to get the last value generated. Of course you can use this value and add the increment to get the next
    value but it not the same as seqname.nextval which keep incrementing each time you call it. Getting the current identity value and adding the increment your self will not work for multiple sessions with pending
    insert. Another thing about column with IDENTITY property is that you cannot insert value into this column (i.e, omit it in your insert statement values) unless IDENTITY_INSERT is on, but only one table in a
    session can have IDENTITY_INSERT to be turned on.
    If you don't need to know the next seq value, then IDENTITY work similar to Oracle sequence. Execute select after postchanges or commit will have system generated values. If you need to get next value before insert, Sung suggest using SEQ_TABLE and managing the next value (write a database function to mimic Oracle'
    s nextval).
    UNIQUEIDENTIFIER datatype: UNIQUEIDENTIFIER is a 16-byte hexadecimal number indicating a globally unique identifier (GUID). The GUID is useful when a row must be unique among many other rows. You could use NEWID() to create a value of type uniqueidentifier or calling some API function that returns a GUID. The advantage of using uniqueidentifier is that the values generated by NEWID function or application GUID are guaranteed to be unique throughout the world. The disadvantage of using uniqueidetifier is that it is long and obscure, random, difficult for user to remember or type correctly. It is 16 byte, which is large compare to other datatype such as 4-byte integer.
    Thanks,
    Yvonne

  • How to Use Sequence in Oracle Views

    Hi ,
    I have created a view which gives the information about the access rights which a Resource has got. for ex -
    Res1 - GYM access - member
    Res1 - Swimingpool Access - member
    I need to identify a Primary Key for this data set. So i thought that i'll use a Sequence to generate an extra column in this view.
    But when i'm using the Sequence i'm getting the following error - "ORA-02287".

    you can use sequence within view it doesnot returned error;
    create sequence t1_seq MAXVALUE 150
    START WITH 39 INCREMENT BY 1;
    SQL> insert into t1_view values(t1_seq.nextval,'dd');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
    ID NA
    10 aa
    20 bb
    30 cc
    40 dd
    4 rows selected.
    SQL> insert into t1_view values(t1_seq.nextval,'ee');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
    ID NA
    10 aa
    20 bb
    30 cc
    40 dd
    41 ee
    5 rows selected.

  • Bug when using Sequencer.setTickPosition() ?

    HI,
    I created a Track and added a few ControlChange events in ticks 0,96,192,288,384.
    This corresponds to beat indicators in a resolution of 96 (PPQ).
    I set the sequencer for a loop, starting at tick 0, and ending at tick 384.
    While the sequencer is running, I sometimes set back the tick position using Sequencer.setTickPosition(...) to one of the beat points.
    I also added a ControllerEventListener  using Sequencer.addControllerEventListener(...) which listens on the mentioned ControlChange events.
    What I see in debug logs printed by my listener, is that when I set the tick Position to say, 96, both the 0 and 96 events are being dispatched. I expected only the 96 one to fire. The 0 one is extra...
    In fact, setting the tick position to any value from 1-96 (inclusive), causes the event created with tick 0 to fire.
    If this is a feature and not  a BUG, it is implied that a ControlChange has some kind of "sustain" until the next ControlChange, than at least I expect that setting the tick position to 0-95 (inclusive)  would fire the 0 event, but at tick 96 there is already a different event.
    BTW:
    I am differentiating between the event but having them created with corresponding data1 argument set to (0,1,2,3,4).
    Can anyone explain this weird behavior?

    HI,
    I created a Track and added a few ControlChange events in ticks 0,96,192,288,384.
    This corresponds to beat indicators in a resolution of 96 (PPQ).
    I set the sequencer for a loop, starting at tick 0, and ending at tick 384.
    While the sequencer is running, I sometimes set back the tick position using Sequencer.setTickPosition(...) to one of the beat points.
    I also added a ControllerEventListener  using Sequencer.addControllerEventListener(...) which listens on the mentioned ControlChange events.
    What I see in debug logs printed by my listener, is that when I set the tick Position to say, 96, both the 0 and 96 events are being dispatched. I expected only the 96 one to fire. The 0 one is extra...
    In fact, setting the tick position to any value from 1-96 (inclusive), causes the event created with tick 0 to fire.
    If this is a feature and not  a BUG, it is implied that a ControlChange has some kind of "sustain" until the next ControlChange, than at least I expect that setting the tick position to 0-95 (inclusive)  would fire the 0 event, but at tick 96 there is already a different event.
    BTW:
    I am differentiating between the event but having them created with corresponding data1 argument set to (0,1,2,3,4).
    Can anyone explain this weird behavior?

  • Want to use sequence object of oracle when loading data in sql loader

    Hi,
    I want to use sequence when loading data in sqll loader, but the problem is i could not use sequence object of oracle to load the data by sql loader, i can use sequence of sql loader.
    I want to use sequence object because in later entries this sequence object will be used.If i use sequence of sql loader how can i use oracle sequence object
    Is there any other option

    I have a simillar problem, I also want to use a sequence when loading data by the SQL Loader.
    My control file is:
    load data
    infile '0testdata.txt'
    into table robertl.tbltest
    fields terminated by X'09'
    trailing nullcols
    (redbrojunos,
    broj,
    dolazak,
    odlazak nullif odlazak=blanks,
    komentar nullif komentar=blanks)
    And the datafile is:
    robertl.brojilo.nextval     1368     17.06.2003 08:02:46     17.06.2003 16:17:18     
    robertl.brojilo.nextval     2363     17.06.2003 08:18:18     17.06.2003 16:21:52     
    robertl.brojilo.nextval     7821     17.06.2003 08:29:22     17.06.2003 16:21:59     
    robertl.brojilo.nextval     0408     17.06.2003 11:20:27     17.06.2003 18:33:00     ispit
    robertl.brojilo.nextval     1111     17.06.2003 11:30:58     17.06.2003 16:09:34     Odlazak na ispit
    robertl.brojilo.nextval     6129     17.06.2003 14:02:42     17.06.2003 16:23:23     seminar
    But all records were rejected by the Loader, for every record I get the error:
    Record 1: Rejected - Error on table ROBERTL.TBLTEST, column REDBROJUNOS.
    ORA-01722: invalid number

  • Generating value of column using sequence in Toplink

    Hi
    I have a toplink pojo table, say SamplePojo. I need to automatically generate a value for the primary key field, say id. Is it possible to insert only the name field into the table and let toplink generate a value for id field using sequence?
    I try the following code from my client class
    Project project = XMLProjectReader.read("META-INF/tlMap.xml", Thread.currentThread().getContextClassLoader());
    DatabaseSession session = project.createDatabaseSession();
    session.shouldLogMessages();
    session.login();
    String query = "insert into SAMPLE_POJO(NAME) values('SAMPLE NAME')";               
    session.executeSQL(query);
    session.logout();If i execute the above code i get a error like "Internal Exception: java.sql.SQLException: ORA-01400: cannot insert NULL into ("MYSCHEMA"."SAMPLE_POJO"."ID")"
    This is how my SamplePojo class looks like
    @Entity
    public class SamplePojo iimplements Serializablel {
        @Id
        @GeneratedValue(generator = "sampleSequence")
        @SequenceGenerator(name = "sampleSequence", sequenceName = "SAMP_SEQ", allocationSize = 1)
        private BigDecimal id;
        private String name;
        public SamplePojo(BigDecimal id, String name) {
            this.name = name;
            this.id = id;
    //getters and setters for class variables
    }

    Are you trying to use JPA, or the native TopLink API?
    Your annotations are JPA, but your code is the native API, using the XMLProjectReader.read("META-INF/tlMap.xml"), either use one or the other.
    With JPA, you will just have a persistence.xml, and optionally an orm.xml (you will not use the Mapping Workbench).
    To insert an object you just create an instance of the class and call persist(), no SQL.
    i.e.
    EntityManager em = factory.createEntityManager();
    em.getTransaction().begin();
    SamplePojo pojo = new SamplePojo();
    pojo.setName("SAMPLE NAME");
    em.persist(pojo);
    em.getTransaction().commit();
    James : http://www.eclipselink.org

  • Using Sequence with Data Warehouse Table

    I am working on a Uni exercise on data warehousing and am trying to create and populate a table with a sequence on one database with data located on another database.
    For this particular table, I have to reset the primary key (primary keys on operational table start from 4000). In my notes, I have been told to create a sequence first and use yoursequence.nextval in the sub query. I am not very experienced with using sequences and am not sure what a subquery is in relation to them.
    I tried the following but it didn't work. Hopefully it will give you an idea as to what I am trying to achieve:
    create table Region as select region_id_seq, Region_Name, Management_area, Country from dw_op.Sales_Region@q_link;
    Any help with this would be great.

    Thanks again, Justin.
    My instructions tell me to use the schema name along with the db link and it created the table correctly so I'll just have to keep my eye on it.
    Do oyu know how I could use the function initcap to ensure all data is of the same format? I did a bit of research and found that I should be using column aliases which I duly tried but I received an error saying the following line needs a column alias:
    initcap(s.region_name),
    Just thought you may know how this can be done.
    Thanks.

  • Using sequence on db link

    Hi All,
    version - Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    I have created a database link as mentioned below-
    create database link db_link_test connect to 'schema' identified by 'password' using 'tns name';
    I am able to access table like -
    select * from table_name@db_link_test;
    Now I am trying to acess and use sequence
    select schema.test_seq.nextval from dual@db_link_test;
    it is giving error -
    +ORA-02289: sequence does not exist
    02289. 00000 - "sequence does not exist"
    *Cause:    The specified sequence does not exist, or the user does
    not have the required privilege to perform this operation.
    *Action:   Make sure the sequence name is correct, and that you have
    the right to perform the desired operation on this sequence.+
    Could you please help me out here on this..
    Regards,

    Use:
    select schema.test_seq.nextval@db_link_test from dual;For example:
    SQL> connect scott@orcl
    Enter password: *****
    Connected.
    SQL> create sequence seq1;
    Sequence created.
    SQL> connect scott
    Enter password: *****
    Connected.
    SQL> select seq1.nextval@orcl from dual;
       NEXTVAL
             1
    SQL> SY.

Maybe you are looking for

  • After Funds Management activation we got error in travel managment

    Hi All,   After activating funds management in the system, while creating a travel request we got the following error. Anyone can help on this, for idenifying the problem. In the travel request portal we are getting this error : " com.sap.tc.webdynpr

  • PS CC - Apple error message when 'quitting'.

    Hello Everyone, Your help is needed by a someone starting out with PS. When closing PS I get and error message, 'Could not save Preferences because the file is locked-.' I have read other communities entries and tried changing 'library' (not sure whi

  • Telnet not working i need help : Could not open connection to the host !!

    hello all im back today with big problem with telnet i dont know why !! i have to computers one of them in my home and the other one in my office both of them use windows 7 so  home PC internet IP : 82.205.100.161 office PC internet IP : 82.102.237.1

  • NIO SocketChannel Re-Connection problem

    Hello all, I am developing poker game. in that i am using socketchannel. if any client have some problem and if it disconnects i have to reconnect the client and i have to establish a new connection. means i have to create another socketchannel. mean

  • Renaming and Joining Clips

    The instructions in iMovie Help clearly state it is possible rename clips in the Clips Pane, not just the Clip Viewer. In iMovie 3.0.3 which I am using, it lets me rename them in the Clip Viewer just fine by selecting and retyping the name. Once in t