Is there a SEQUENCE object, like in Oracle?

I want to create a table and I have 2 fields, user name and user e-mail. The user e-mail would be the key, but, for performance issues, I think it's advisable to create a 3rd field, simply to assign an ID to each row - a numerical field.
So as to every time a record is inserted in the table, this 3rd ID row is assigned a value automatically, with the next number in the sequence for the current record being added - if there are 11 records in the table and a 12th is being added, then the ID would be automatically set to 12 during the insertion of this 12th record.
I would do this in Oracle through a SEQUENCE object.
There's something equivalent I could use in SAP ?
Thanks,
Avraham

In SAP we have 'number ranges' which serves the same purpose.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/08/51415d43b511d182b30000e829fbfe/frameset.htm
The above link would give you fair amount of knowledge to create your own number range
Cheers,
KD

Similar Messages

  • 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

  • How to dump your database including other objects like views, sequence,etc

    hi.
    is it possible to generate a sql file that contains your database structure including the values in it and other objects. I have tried generating just the tables and that's the only way I know to dump a database using jdeveloper. but is there a way to generate a sql file with your db structure and also other objects like views, triggers, sequences and etc.
    thanks.. :D

    You may need to use utility(which may come with your DB) for creating DB dump

  • Help|| Is there any tool available to register Oracle datasource objects into JNDI

    Is there any tool available to register Oracle datasource objects into JNDI.If so please tell me where can I download.
    Thanks
    shiva

    I'd like to know the answer to this also.
    I just started reading about JNDI 2 days ago and have never used it. I'd like to use DataSource in my application with JNDI. If I can use the database as my JNDI "server", then I'd prefer to do that instead of having a seperate external server.

  • Sequence object in Oracle

    Hello experts, I am using oracle 11g.I have a sequence to generate some ids.If I want that my sequence has been reset like i will start from starting again.It is possible to re initiate a sequence object in Oracle.If it is my client's requirement. Thank You regards aaditya

    You could always use ALTER SEQUENCE
    or simply re-create your sequence. However this may invalidate database objects.
    cheers

  • Sequence diagram lifeline in Oracle BPA Suite

    I try to create sequence diagram in Oracle Busines Process Architect 11g. I use type of model "UML Sequence diagram". But in palette there is no object with type "Lifeline". How can I add lifelines to my sequence diagram?

    i guess you are clicking on file>new>model , or something like that.
    y dont you first go to designer/explorer , make sure you see the navigator frame, and click on "local" in navigator frame to start the local database first. adn then login to any database to create a model/group.
    In case it does not even happen then, and it still says unable to start the local server, check out the logs in <Oracle BPA Suite>\LocalServer\log directory and check what the error is.

  • Sequence object

    Hi,
    I can call Sequence object in application module like this way?
    import oracle.jbo.server.SequenceImpl;
    String SEQUENCE = "ACCOUNT_SEQ";
    //Get the Sequence object
    SequenceImpl accSeq = new SequenceImpl(SEQUENCE, getDBTransaction());
    //Get the Sequence value
    Number accValue = accSeq.getSequenceNumber();
    But this didnot work in jsp page? is there a way i can get sequence value in jsp page since I do not want to use trigger by using DBSequence data type?
    thanks

    ok, here is another way to do it.
    In the Java code for your entity look for the create method for your record and add a piece of code like this:
    protected void create(AttributeList attributeList)
    super.create(attributeList);
    //make sure to change the name of the sequance in this line
    SequenceImpl s = new SequenceImpl("JCAB_COMPANIES_S", getDBTransaction());
    Long next = (Long)s.getData();
    //this line will need to use the set method for your primary key column
    this.setCompanyId(new Number(next.intValue()));
    }

  • PL/SQL Object Type - Java oracle.jbo.domain

    PL/SQL Object Type <-> Java oracle.jbo.domain
    can anybody help me, getting my domains to work?
    Following scenario:
    in pl/sql we have an object type called MULTI_LANGUAGE. This type is used for storing multilingual texts as nested table in one(!) column.
    So the object MULTI_LANGUAGE contains a member variable LANGUAGE_COLLECTION of type LANGUAGE_TABLE, which itself is a nested table of objects
    of the type LANGUAGE_FIELD (this again is only a language id and the corresponding content)
    Also the methods setContent(langID, langContent) and getContent(langId) are defined on Object MULTI_LANGUAGE.
    For example: Table having primary key, 2 other columns and one column of object type MULTI_LANGAGE (=nested table of objects)
    |ID|Column1|Column2|  multilingual Column  |
    |--|---------------------------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | hello         | |
    |  |       |       |  -------------------  |
    |1 | foo   | bar   | | 2 | hallo         | |   <- Row Nr 1
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ola           | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | world         | |
    |  |       |       |  -------------------  |
    |2 | abc   | def   | | 2 | welt          | |   <- Row Nr 2
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ???  ;-)      | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|Now i've tried to modell this structure as an oracle.jbo.domain.
    class MultiLanguage extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("LanguageColl", "LANGUAGE_COLL", 0, oracle.jbo.domain.Array.class, 2003, "ARRAY", -127, 0, false, "campusonlinepkg.common.LanguageField");
    and
    class LanguageField extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("Id", "ID", 0, oracle.jbo.domain.Number.class, 2, "NUMERIC", -127, 0, false);
    attrs[(1)] = new DomainAttributeDef("Content", "CONTENT", 1, java.lang.String.class, 12, "VARCHAR", -127, 4000, false);
    Is there anything wrong with this StructureDef?
    When running the BC-Browser with -Djbo.debugoutput=console -Djbo.jdbc.driver.verbose=true parameters I get suspect warnings when browsing the records
    [196] Executing FAULT-IN...SELECT NR, NAME FROM B_THESAURI BThesauri WHERE NR=:1
    [197] SQLException: SQLState(null) vendor code(17074)
    [198] java.sql.SQLException: Ungültiges Namensmuster: XMLTEST.null
    ...snip: detail of stack...
    [240] SQLException: SQLState(null) vendor code(17060)
    [241] java.sql.SQLException: Deskriptor konnte nicht erstellt werden: Unable to resolve type "null"
    ...snip: detail of stack...
    [280] Warning:No element type set on this array. Assuming java.lang.Object.
    (XMLTEST is the name of the schema)
    Seems as if the framework can't read the TypeDescriptor or does not know which descriptor to read (XMLTEST.null??)
    Do I have to implement my own JboTypeMap?
    Please help, I'm stuck.
    Thanks in advance, Christian

    Thanks for your suggestion, but it seems to me as if there is one level missing.
    in pl/sql I have following structure:
    Struct MULTI_LANGUAGE (Object type) - outermost
      Array LANGUAGE_TABLE (nested table type)
        Struct LANGUAGE_FIELD (Object type simple) - innermostthe reason why i had to wrap another struct around the array was because it is not possible to define methods on a nested table. this is only possible on objects.
    on the outermost object type (which holds the array of language fields) I needed to define following 2 methods for direct access:
    getContent (langId in number) returns varchar2
    setContent (langId in number, langContent in varchar2)
    I would like to rebuild the same structure in java, because newly written java code should live in perfect harmony with legacy pl/sql code ;-)
    Both applications (Java and pl/sql) have to access the same data as long as migration to java goes on.
    Is this nested structure too much for a Domain?
    Any other suggestions?
    Thanks again, Christian

  • How to Use Sequence Object Inside User-defined Function In SQL Server

    I'm trying to call sequence object inside SQL Server user-defined function. I used 
    Next Value for dbo.mySequence  to call the next value for my sequence created. But I'm getting an error like below.
    "NEXT VALUE FOR function is not allowed in check constraints, default objects, computed columns, views, user-defined functions, user-defined aggregates, user-defined table types, sub-queries, common table expressions, or derived tables."
    Is there any standard way to call sequence inside a function?
    I would really appreciate your response.
    Thanks!

    The NEXT
    VALUE FOR function cannot be used for User Defined function. It's one of the limitation.
    https://msdn.microsoft.com/en-us/library/ff878370.aspx
    What are you trying to do? Can you give us an example and required output?
    --Prashanth

  • Oracle forms and reports with object views in oracle 9i

    Can We use oracle 9i Object Views in oracle forms and reports. If yes, then which version?

    MichaelFerrante,Thank you for your help.
    I have already used the HS services to connecto to external databases from our main Oracle database, and the solution works fine.
    But unfortunally for this particular client he cannont have installed a Oracle database due to internal policies restrictions.
    I can not migrate the full application to another technology like ADF in less than 6 or 8 months.
    Do you thifnk that there is any other solution?
    Mensagem editada por: user10660669

  • SEQUENCE Object for Small Tables Only?

    QUOTE from a recent thread: "Long term solution should be to use SEQUENCE with NO CACHE for small tables instead of identity and benefit from performance improvement for large tables."
    Thread:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cf63d145-7084-4371-bde0-eb3b917c7163/identity-big-jump-100010000-a-feature?forum=transactsql
    How about using SEQUENCE objects for large tables? Thanks.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

    Well Erland, either you calm down your manager (with a martini?) or use NO CACHE.
    QUOTE: "This could cause a sequence to run out of numbers much more quickly than an IDENTITY value. It could also cause managers to become upset that values are missing, in which case they’ll need to simply get over it and accept that
    there will be numbers missing.
    If you need SQL Server to use every possible value, configure a cache setting of NO CACHE. This will cause the sequence to work much like the IDENTITY property. However, it will impact the sequence performance due to the additional metadata writes."
    LINK: Microsoft SQL Server: The Sequencing Solution
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Is there table type object in PL/SQL?

    Hi.
    What I'm trying to do is, according to the some conditions, aggregate data as an object type( I am not sure that there's a similar thing)
    There are 5-6 conditions. then at last join those table type object.
    FYI, Here is an example
    Company will give bonus to a person who meet these conditions
    1. Salary is less than 1000$ - salary table
    2. More than 5 persons in his family - staff table
    3. gross sale is over 10000$
    In PL/SQL Package, I'll get those data as an object type and join those object just like in-line query.
    select emp_no
    from sal_tbl , staff_tbl, sale_tbl
    where sal_tbl = staff_tbl
    and sal_tbl = sale_tbl
    In my opinion I can get employee list who get bonus. because they meet all conditions.
    Reason why bonus condition will be updated continuously. I want to make them easy to maintanence. what if I need to add new conditions. Just add a new procedure that calculate new result and pass as an table type object.
    select emp_no
    from sal_tbl , staff_tbl, sale_tbl, new_tbl*
    where sal_tbl = staff_tbl
    and sal_tbl = sale_tbl
    and sal_tbl = new_tbl*
    Is there any thing just like what I think?
    Thanks in advance
    Message was edited by: me
    allbory
    I have read Oracle user guide - Collection, Record, and Cursor. But I can't get anything that I want.
    Give me some clues

    > In PL/SQL Package, I'll get those data as an object type and join those object just like
    in-line query.
    Not the best of ideas. If I'm getting what you're saying, you want to use the following approach:
    SQL> create or replace type TStrings as table of varchar2(4000);
    2 /
    Type created.
    SQL>
    SQL>
    SQL> create or replace procedure BadIdea( collection TStrings ) is
    2 minVal string(4000);
    3 maxVal string(4000);
    4 begin
    5 -- in the procedure we now run SQLs against the collection
    6 select
    7 MIN( column_value ) into minVal
    8 from TABLE( collection );
    9
    10 select
    11 MAX( column_value ) into maxVal
    12 from TABLE( collection );
    13 end;
    14 /
    Procedure created.
    SQL> show errors
    No errors.
    SQL>
    SQL>
    SQL> -- and then we call this procedure to do our "SQL" processing for us
    SQL> declare
    2 list TStrings;
    3 begin
    4 select
    5 object_name bulk collect into list
    6 from user_objects;
    7
    8 BadIdea( list );
    9 end;
    10 /
    PL/SQL procedure successfully completed.A collection of objects resides in (non-sharable and expensive) PL/SQL memory. Running SQL, requires the PL/SQL engine copying the data to the SQL engine into a structure and format that the SQL engine will understand.
    This is slow. This is expensive. This does not scale.
    It makes little sense to copy data from the very fast and hot and good and scalable db buffer cache into an expensive memory structure in the PGA and then run SQLs against that.
    > Reason why bonus condition will be updated continuously. I want to make them easy
    to maintanence. what if I need to add new conditions. Just add a new procedure that
    calculate new result and pass as an table type object.
    The way I read your SQL, your new_tbl* requires dynamic SQL. Which means you also need to dynamically cater for the correct column names to join on, to filter on, and to select from.
    Also not the best of ideas. Dynamic SQL like that requires a lot of code to deal correctly with bind variables. Lot of exception handling as there can easily be run-time errors as the code itself that is executed in turn creates new dynamic code to execute.
    If this is to be truly dynamic, then one approach would be that each rule needs to be executable as a SQL or PL/SQL block. Each rule needs to have an input like an employee number. Each rule needs to returns a boolean like value, saying whether the rule has passed or failed.
    Only when all the rules have been passed, can the bonus be allocated.
    This will deal fine with the "dynamic rule" requirement. Performance wise and scalability wise.. it may not be the best of ideas. 10 dynamic and very slow and expensive rules, could very well be rewritten as a one very fast and very cheap static SQL statement.
    Anyway, the dynamic rule approach can look something like the following:
    SQL> create or replace type TBonusRule is object
    2 (
    3 result# char(1),
    4 member function Passed return boolean
    5 )
    6 not final;
    7 /
    Type created.
    SQL> show errors
    No errors.
    SQL>
    SQL>
    SQL> create or replace type body TBonusRule is
    2 member function Passed return boolean is
    3 begin
    4 return( UPPER(self.result#) = 'Y' );
    5 end;
    6 end;
    7 /
    Type body created.
    SQL> show errors
    No errors.
    SQL>
    SQL>
    SQL> create or replace type TBonusSQLRule under TBonusRule
    2 (
    3 constructor function TBonusSQLRule( empNo number, sqlStatement varchar2 ) return self as result
    4 ) final;
    5 /
    Type created.
    SQL> show errors
    No errors.
    SQL>
    SQL>
    SQL> create or replace type body TBonusSQLRule is
    2 constructor function TBonusSQLRule( empNo number, sqlStatement varchar2 ) return self as result is
    3 begin
    4 execute immediate sqlStatement
    5 into self.result#
    6 using IN empNo;
    7
    8 return;
    9 end;
    10
    11 end;
    12 /
    Type body created.
    SQL> show errors
    No errors.
    SQL>
    SQL> set serveroutput on
    SQL> declare
    2 rule1 TBonusSQLRule;
    3 rule2 TBonusSQLRule;
    4 empNo number;
    5 begin
    6 empNo := 7369; -- we process employee 7369
    7
    8 -- we apply bonus rule 1 that check if the employee is a clerk (of course,
    9 -- we could be reading these rules from a rules table - this example simply
    10 -- creates them dynamically)
    11 rule1 := new TBonusSQLRule( empNo, 'select ''Y'' from emp where empno = :0 and job=''CLERK''' );
    12
    13 if rule1.Passed then
    14 DBMS_OUTPUT.put_line( 'Rule 1. PASSED' );
    15 else
    16 DBMS_OUTPUT.put_line( 'Rule 1. FAILED' );
    17 end if;
    18
    19 -- rule 2 can for example check if the employee has been working for at least 5 years for the
    20 -- company
    21 rule2 := new TBonusSQLRule( empNo, 'select ''Y'' from emp where empno = :0 and (SYSDATE-hiredate)>5*365' );
    22
    23 if rule2.Passed then
    24 DBMS_OUTPUT.put_line( 'Rule 2. PASSED' );
    25 else
    26 DBMS_OUTPUT.put_line( 'Rule 2. FAILED' );
    27 end if;
    28
    29 end;
    30 /
    Rule 1. PASSED
    Rule 2. PASSED
    PL/SQL procedure successfully completed.
    SQL>
    PL/SQL rules can in a similar fashion be subclassed from the base/asbtract class. And rules can be persisted in a table too.
    But even though I did this example to illustrate just how flexible Oracle can be, I would personally think hard before using the above approach myself.
    Why?
    Because rules 1 and 2 resulted in two SQLs being fired. A single SQL could have done the job.
    2 SQLs were used for a single employee. I can use a single SQL to find ALL employees that matches the rule criteria.
    So... not very scalable and not very fast.

  • Is there free jdbc type4 driver for oracle?

    i neen to connect to oracle to develop my application, but there's a problem when tryin' to resolve peoblem of character set. in oracle, as i know, it uses unicode that resulting in the font code, which is not falling into the character set of unicode, whould cause failure in translating user defined font code. beside, for i do not know what kind of license that oracle jdbc type4 driver publishes, hope someone are able to tell me wheather there's any software like freetds in sql2000, because, if necessary, i may need to redistrubite the jdbc driver for my own use!
    thanks in advice,

    Oracle has drivers available from their site (free ones) for java and the specific version of Oracle you are running.

  • HT3053 I have a 13inch MacBook Pro and when I switch it on the apple logo appears then a slot and the circular symbol which is turning and then before opening the home screen it switches off again. Is there a sequence that I can use to force it to load.

    I have got a 13 inch MacBook Pro and it got stuck in a loop so I switched it off by holding the power button down and now when I switch it on the apple logo appears then I get a blank slot at the bottom of the screen then the circle appears and rotates and then it switches off again, I have tried starting it again with the system disc that came with it when it was new but it makes no difference. Is there a sequence that I can use to force it to start.

    Sorry. We can't help you. It's no longer an iPhone. Apple won't touch it.
    Take it to whoever replaced the screen and see if they can help you.
    iPhones are not user servicable and Apple does not sell iPhone parts at all. I'd be surprised if you were actually able to back it up at this point. It sounds like it's completely borked.

  • Is there an "Edit Object Tool" in Acrobat 11?

    Is there an "Edit Object Tool" in Acrobat 11 that is comparable to the Edit Object Tool in Acrobat 10 and earlier versions?  Has it been discontinued, or split into 2 loosely connected tools, the new Edit Text and Images Tool?
    I love the new Edit Text Tool in Acrobat 11, but the old Edit Object Tool in Acrobat 10 and earlier versions was great when I wanted to resize a block of objects.  The old Edit Object Tool would resize both text and graphic objects, but not everything like form fields, although there are limited workarounds like printing the file to pdf to flatten it and then resizing, but doing so will discard the form fields.
    When using the old Edit Object Tool to resize a group of objects that contain text, it will scale the text in proportion to everything else in the selection.  The new Edit Text and Images Tool in Acrobat 11 does not resize or scale the text.  It does change the size of the text containers, but the text does not resize.
    There are situations where it is valuable to resize a group of objects that contain both text and images, but I can't get the new tool to do it, or I'm not operating the tool correctly.  Is this functionality gone in version 11, or am I doing something wrong or using the wrong tool?
    I initially upgraded both of my laptop workstations from Acrobat 10 to 11, but have now gone back to running Acrobat 10 on one machine and Acrobat 11 on the other so I can realize the great new functionality of the new Acrobat 11 Text Tools without losing the valuable functionality of the Edit Object Tool in earlier versions.
    I posted a 5 star positive review on Amazon at:
    http://www.amazon.com/review/R3GAQNISK3WR4S/ref=cm_cr_pr_viewpnt#R3GAQNISK3WR4S
    but I might have to drop it to 4 stars if the old functionality has been discarded
    Clarification or guidance would be appreciated.

    Dave, Thank you for the accurate and effective information.  I added the icon to my toolbar.

Maybe you are looking for

  • How do i sync my iPod touch with my new laptop?

    I use to have a dell computer with my itunes library on it. I downloaded music on the dell and synced it to my ipod touch. But, the dell computer crashed and i am unable to access my original itunes library. Now i bought a new macbook pro and would l

  • Printing more than one photo on a piece of 8x10 paper.

    How do I get multiple photos on a piece of 8x10 paper so the photos are siazed to fill up the 8x10?

  • Fuzzy dip to white..and other issues

    hello every i hope someone can help me with these issues...1st off when i burn my movie on blu ray the dip to white doesnt seem rich...its kinda fuzzy towards the end of the effect....im using windows 7 with inteli7 [email protected] 18gb installed m

  • SSL Server PSE -  loading existing certificate via STRUST

    We are configuring XI ABAP stack (via transaction STRUST) to use HTTP adapter for secure communication with business partners for inbound communication (SAP WAS will take a role of SSL server). We would like to re-use SSL Global Server certificate pu

  • Display Links on welcome screen of SC as per the role in PFCG

    Hi All, We have created a Z ITS service from a Z transcation and want to give the link of this ITS service on welcome screen of EBP only to some specific users. We created a Z role in PFCG and attached the link of this ITS service using the option 'G