AutoNumber?

Is there a way to create an auto incrementing ID field in Oracle for a PK field?
Using SQL Developer on 10g
Thanks!

Or see (output "Search" function):
http://forums.oracle.com/forums/search.jspa?threadID=&q=auto+increment&objID=&dateRange=all&userID=&numResults=15&rankBy=10001

Similar Messages

  • Can you change a story or text frame's index? (re autonumbering)

    Does anyone know if there is a way to change the index of a text frame or story without changing the actual visual layout of an InDesign document? So far all I can come up with is to cut the frame and repaste it into the document. You can move a story within the index list of a document, but that visually cuts and pastes the story text.
    actDoc.stories.item(1).move(LocationOptions.BEFORE, actDoc.stories.item(0));
    I can't see any method to change the index of a text frame (other than cutting and repasting).
    I want to put together some tests. I have a bunch of questions. Each question is a single story in a single text frame in an InDesign document. The text frame is linked to an InCopy document. The first paragraph of the question has a "QuestionNumber" style but the para style has no numbering. I want to have only one version of each question (the InCopy story) but to put the questions into different tests in different orders with different numbering. What I do is to create an InDesign template for the tests that has a QuestionNumber para style that includes autonumbering with the "Continue Numbers across Stories" option checked. This works beautifully and the questions are numbered in the order in which the text frames (and stories) are (via a script) copied from the question document and pasted into the test paper document. When the same question/story/textframe is used in two tests it is numbered in the order in which it is pasted into each test paper (but the original stays the same because it has no numbering).
    The next step would be to be able to reorder the question numbers within the test paper (if you wanted to, say, swap questions 18 and 20). To do that you have to change the index of the story because the autonumbering across stories seems to depend on the index of the story.
    What seems to happen is that stories are indexed in the order in which they are pasted into a document, but text frames are indexed in the opposite order. If you paste a text frame with one story into a new document, it is textframe.item(0) and story.item(0). If you then paste a second one into the document it is story.item(1) but textframe.item(0). The first text frame becomes textframe.item(1). When you cut a text frame and repaste it, it is reindexed as if you were pasting it for the first time.
    The autonumbering also seems to be segregated by page. If you have questions 1 and 2 on page 1 and questions 3 and 4 on page 2, you can move around the text frames for 1 and 2 on the page but the numbering stays the same. Likewise for 3 and 4. If you drag 3 across to page 1 it stays as 3 but if you drag question 4 across to page 1 it becomes 3, and the original question 3 on page 2 becomes question 4. It is confusing but makes sense in a weird way once you get the hang of it.
    Anyway, I have probably answered my own question and the best way to renumber the questions in a test is to run the script again and create a new document using a new question order.
    But any other ideas are welcome.
    Thanks.

    hi Brian
    which version of InDesign you have ?
    I have checked these steps on CS3 and CS4:
    first I've set ON to option in preferences to preserve links when placing
    then I've placed DOC file as AnchoredTF in new Story
    then I've copied this AnchoredTF and pasted it on page, and then I've pasted it as another AnchoredTF - each time there was new lick created to the same DOC file
    then I've set OFF to option in preferences to preserve links when placing
    and even when I again copied and pasted this AnchoredTF with placed DOC file - it still add new link on Links palette
    so maybe with InCopy stories there is next bug or next "feature" ...
    [edit]
    ok - I've checked InCopy file - after exporting TextFrame as InCopy Story
    and it's like you've said - pasting on page - new link is created - pasting as Anchored - link isn't created ... no matter if option in preferences is set or not ...
    verdict - we've found new bug
    BUT ... if you link it again - by CTRL+D method - link is preserved even if option in preferences is set to off so you can have more than one InCopy Story placed as AnchoredTF in same parent Story ...
    robin
    www.adobescripts.co.uk

  • Autonumber hassle---------

    m yproblem is that i hav autonumber field user_id in my oracle table;
    wen i insert sequence seq.nextval from oracle ide it workz fine...bt now i hav user profil nd i hav to make entries thru java code...nd wen i use
    pt=con.prepareStatement("insert into user_basic(user_id,f_name,m_name,l_name,email,password,pet_name,age,gender,mari,citizen) values(seq.nextval,?,?,?,?,?,?,?,?,?,?)");
    it gives null pointer exception....
    i hav tried:
    1.
    "insert into user_basic(user_id,f_name,m_name,l_name,email,password,pet_name,age,gender,mari,citizen) values(?,?,?,?,?,?,?,?,?,?,?)");
    pt.setString(1,null);
    2.
    "insert into user_basic(f_name,m_name,l_name,email,password,pet_name,age,gender,mari,citizen) values(?,?,?,?,?,?,?,?,?,?)");
    pt.setString(1,fname);
    pt.setString(2,mname);
    ans so on all entries
    bt diz way oracle leavez user_id blank.....
    kindly help regarding usage of autonumber in prepared statement....thanxx....
    code:
    public boolean validate() throws Exception
    Connection con=null;
    PreparedStatement pt=null;
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:ds;Uid=SYSTEM;Pwd=manager");
    pt=con.prepareStatement("insert into user_basic(user_id,f_name,m_name,l_name,email,password,pet_name,age,gender,mari,citizen) values(seq.nextval,?,?,?,?,?,?,?,?,?,?)");
    pt.setString(1,fname);
    pt.setString(2,mname);
    pt.setString(3,lname);
    pt.setString(4,em);
    pt.setString(5,pwd);
    pt.setString(6,petname);
    pt.setInt(7,ag);
    pt.setString(8,gender);
    pt.setString(9,marital);
    pt.setString(10,citizenship);
    x=pt.executeUpdate();
    pt.close();
    catch(ClassNotFoundException ex)
    {System.out.println(ex);
    //out.println("Couldn't load database driver: " + ex.getMessage());
    catch(SQLException ex){
    System.out.println(ex);
    //out.println("SQLException caught: " + ex.getMessage());
    catch (Exception ex){System.out.println(ex);
    // out.println(ex);
    finally {
    // Always close the database connection.
    try {
    if (con!= null)
    con.close();
    catch (SQLException ignored){
    System.out.println(ignored);
    if(x==1)
    return true;}
    else
    {return false;}
    }

    You stinking crossposting SMS-speaking twit!
    http://forum.java.sun.com/thread.jspa?threadID=5244487

  • FrameMaker 9 - Autonumbering of Tables/Figures not working correctly

    I have a multi-chapter book. My autonumber paragraph definitions for "Figure Title" and Table Title" are:
         F:Figure <$chapnum>-<n+>
         T:Table <$chapnum>-<n+>
    My other autonumber tags are:
         C:Chapter <n+>
         A:Appendix <A+>:
         L:<a=1>)\t
         L:<a+>)\t
         N:<n=1>.\t
         N:<n+>.\t
         •\t
         NOTE:
         Syntax:\t
         Output:\t
    My numbering formats in the file and the book file are:
    Chapter 1:
         Volume tab: Volume1 # 1
         Chapter tab: Chapter # 1
         Page tab: First Page # 1
         Paragraph tab: Restart Paragraph Numbering
    Chapter 2 (etc.):
         Volume tab: Volume1 # 1
         Chapter tab: Continue Numbering From Previous Chapter in Book
         Page tab: First Page # 1
         Paragraph tab: Continue Numbering From Previous Chapter in Book
    What I get when I update the book is:
    In Chapter 1:
         Figure 1-1
         Figure 1-2
         Table 1-1
    In Chapter 2:
         Figure 2-3
         Table 2-2
    In Chapter 3:
         Figure 3-4
         Table 3-3
    It's obvious I'm doing something wrong, but I can't for the life of me figure out what. Does anyone have any ideas?

    You didn't say how you want it to be, but FM appears to be numbering exactly
    how you've set it. The number before the dash is the chapter number and
    continues numbering from the previous chapter in the book. The number to the
    right of the dash is also numbering (as a paragraph) from the previous
    chapter in the book.
    If you want the figure number (the part after the dash) to restart in each
    chapter, you need to go to the book file, right click and choose Numbering.
    Then set  "Restart paragraph numbering" on the Paragraph tab. This will
    restart the number after the dash to 1 at the beginning of each chapter.
    I would also add that it is confusing to the reader to have Table 1-1 come
    after Figure 1-2. Check out this document, "The Case for Simple Numbering:"
    http://www.techknowledgecorp.com/nonum.html
    Mike Wickham

  • Autonumber and text in separate frames affects PDF bookmarks

    Since making a forced return in an autonumber specification does not work, I tried the solution of making the chapter heading span two text frames. The first frame is very small to handle only the one or two digits of the chapter number and a space, while the second frame is the normal text column where the chapter title is displayed. This setup allowed me to make the chapter number and heading right-adjusted on the page so that users scanning through pages can more easily find the beginning of a chapter at the outer right edge. I connected the two text frames so that they are part of the same Flow A. The autonumbering for the chapter heading was unchanged. I used the specification:
    H:<$chapnum>\sn
    Basically, this is a heading series with the <$chapnum> followed by an en space, which, after testing, provided the proper spacing after the number to force the chapter title to the next frame.
    The solution looks good in the document, in references to the chapter title, and in the TOC. The only problem is that when I print the book to PostScript and use Distiller to generate the PDF file, the PDF bookmarks have a doubled chapter number, as in:
    1 1 Introduction
    2 2 Getting Started
    3 3 Using the Interface
    I can delete the duplicated numbers manually, but I would like a way to prevent them from appearing. I don't understand why Acrobat is adding the extra chapter number when it appears nowhere duplicated within the FrameMaker process.
    Any solutions?
    Susan Self

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Output autonumber as text in xml-file

    Hi All,
    just wanted to know if it is possible to take the autonumber that is created via the EDD or a paragraph format in the application template and put it in some attribute or - even better - output it as text in the xml-file.
    Btw: I'm still using FM8, if that makes any difference.
    Thanks for all suggestions,
    Anna

    Hi Anna,
    Generally, an autonumber is considered part of the document's formatting so it is not normally exported to XML. I am not sure if there is a built-in way of assigning it to an attribute in FrameMaker, but you could do this with FrameScript if necessary.
    Rick

  • Autonumber Format. 01, 02, 03...

    Hello ,
    Simple question;  can you format numbering in the Paragraph Design, Autonumber Format to count 01, 02, 03... 10, 11 etc.?

    bowen192 wrote:
    Hello ,
    Simple question;  can you format numbering in the Paragraph Design, Autonumber Format to count 01, 02, 03... 10, 11 etc.?
    You might be able to fake it with a new paragraph format whose numbering prefix contains the text character zero, and the number counter (placeholder) that begins at 1; use it for numbers below 10. Use a separate paragraph format whose numbering sequence begins at 10, and continues from the previous paragraph (9).
    This might take some fiddling.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Separate table title autonumbering for two named table styles?

    I believe this very same question whizzed by a few weeks ago but I'm having no luck searching for it.
    I have two named table styles.  I want the autonumbering for the table titles to be separate.  More specifically, one will autonumber as "Table t", while the other will autonumber as "Example e".
    I have redefined the autonumbering counter for the second of the two TableTitle para style, and if I apply that style while in that table's title, I get the new autonumbering.  But I can't transmit (a) selectively update the Table Title style to this format to other tables in the chapter.  By extension, I can't copy the  wonderful new table format to other chapters in the book.
    I next tried creating a new para style "ExampleTitle", then in the Table Designer trying Update All.  Nope, other tables of type example do not receive the new title style.
    This is fully-patched FM8.  The document is structured but I don't (want to) care about that -- I simply need to get the two different named table styles
    to autonumber sequentially.
    This is probably pretty easy once I learn the "trick"...(?)
    Cheers & thanks,
    Riley

    Arnis:
    Thanks.  For some reason I couldn't get my table to update, so I went through and manually create a second table title paragraph style, then manually applied that.  (I also created a second x-ref format so that I could x-ref to "Example n:" without including the colon in the x-ref, but that's another story...)
    So for now I've worked around the problem.  After I get this document out I'll revisit the issue.  (Why do I have a vague recollection that there's a known idiosyncracy where FM6+ table styles don't update properly...?)
    Cheers & thanks 'gain,
    Riley

  • Autonumbering corrupted when converting RoboHelp HTML 5 to 8.

    everal problems:
    1 RH 8 "created" multiple definitions in my .css file for a each style.
    2 Autonumbered procedures (nested <ol> </ol> in original Help project was stable, but is not correct in RH8
    3 User documentation for Font Family is incorrect/incomplete
    4 Numbers in steps are Times Roman 12, text is Verdana 10.
    1
    css file has 3 "versions" for defined styles, p, kadov, and another one with a rh prefix. I've explicitly called out font family using text editor, but wonder which definition is being picked up in RH 8 project, and if I can/should delete the redundant definitions
    2
    The numbered list selection in the dialog box does not have an example for what I'm looking for:
    1 Step one
    2 Step two
       a. Substep one
       b. Substep two
    3 Step three
    The conversion automagically renumbered procedures with mixed <ol> and <ul> as well as nested <ol>. The result is a procedure that looks like:
    1. Step one
    2. Step two
        1. Substep one
        2. Substep two
    A. Step three
    3
    Font Set  and setting numbers to same size as paragraph text...looking for adequate documetnation on these two problems.
    Font Set documentation is obtuse, on the same page as "Font" instructions. There is no Font Set in the menu.

    1
    The fact that your CSS still contains kadov indicates that for some reason it did not upgrade properly.
    Do you have another project using the same CSS so that you could take a copy and upgrade that to see if it works second time around?
    If not, backup the CSS and edit it manually. Try www.bradsoft.com and use the free lite version of TopStyle.
    2
    Are you looking at multi level numbering? Pretty sure that simple layout is there.
    It is beginning to sound like what you you had various styles that effectivley gave you multi level numbering. What RH8 provides is different and I think you need to check it out. There is some information about it on my site. http://www.grainge.org/pages/authoring/rh_tour/index.htm
    3
    Sounds like you have the LI configured to Verdana but OL not configured so it is taking your browser default or you have that defined as Times.
    4
    You have four items in the heading of your post but only three in the body.
    See www.grainge.org for RoboHelp and Authoring tips

  • Autonumber for Heading

    I am currently setting up a RH8 project that should generate a CHM and a PDF from a single source. I do not want to do any post processing for the printed documentation so I am prepared to accept the drawbacks the default behavior might have.
    So far I have not been able to get autonumbering on the headings in the PDF, and by headings I mean the items that appear in the PDF TOC. I have tried to activate autonumbering for the "Heading X" styles and have created a multilevel List Class and made the connections back and forth, but no luck.
    Is it possible to get autonumbering for headings in the PDF without manual post processing?

    Hi,
    I think that some tweaking in your style mapping.dot may solve this. Open style mapping.dot and change al the heading styles, so they have numbering.
    Greet,
    Willam
    This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.

  • Autonumber paras across chapters

    Hello,
    I want to have a multi-chapter book, each chapter of which has standard numbered headings at various levels. So far, no problem.
    In addition to this, I want to add a second set of numbers which run across the entire book and are independent of the other numbering system. Heading1 paras should be numbered sequentially (§1, §2, etc.) and other, lower level paras should be alphabetised (a, b, etc.) within that. I want these numbers to appear in mirrored margins.
    (This is a standard system used in grammars in my field.)
    Seems that the mirroring suggests I use side heads. But after that, I'm unsure what to do. Can I set up counters at the book rather than chapter level? Or do I have to do it all by hand once the book is finished?
    Thanks for any help you can offer.
    K

    That would be the method you should use for the side head numbering, yes. This step controls the action of the counters -- whether they're incremented, restart, or contain a custom text message.
    The counters are actually invoked by the paragraph tags, which also control the formatting and the way the counters are presented in the document. One thing that you should do when setting up numbering in your paragraph tags, that is often overlooked, is to specify a numbering stream. Frame has 57 streams that can be assigned to track different things. A particular stream is invoked by starting the autonumbering string with a letter and colon -- A: or a:, for instance -- and then the numbering counters. Some people might use c: or C: for chapters, H: for heads, or S: for a sidehead.
    So two steps, with different purposes.
    Art

  • Autonumber a specific paragraph heading for all Book files

    I'm hoping I'm missing something simple again, but here goes: (Using FM 9.237)
    I have a book containin several documents, each of which are part of a single outline. Here is my numbering setup as it currently stands.
    Control Process 1.0: Lorem Ipsum <n+>.<n=0>:\t
    Control Objective 1.1: Lorem Ipsum  <n>.<n+>: \t
    Control 1.1.a: Lorem Ipsum. <n>.<n>.<a+>.\t
    Control 1.1.b: Lorem Ipsum. <n>.<n>.<a+>.\t
    Control Process 2.0: Lorem Ipsum <n+>.<n=0>:\t
    Control Objective 2.1: Lorem Ipsum  <n>.<n+>: \t
    Control 2.1.a: Lorem Ipsum. <n>.<n>.<a+>.\t
    Control 2.1.b: Lorem Ipsum. <n>.<n>.<a+>.\t
    And so on...
    I need the Control Process Paragraph to Autonumber across all the files in my book. Thus, in my Doc 1 I may have Control Process 1-4, and then in Doc 2 I want the Control Process to start at 5. I've tried using <$chapnum>, but no matter what I do, the Control Process paragraph restarts at 1. I cannot figure out how to tell FM that I want it to start based on the numbering in the previous file. I've used autonumbering successfully for years, but for some reason I'm stumped on this.
    Any help would be more appreciated that I can relate.
    Jeff

    Jeff,
    As you have it set up in your post, the number building blocks refer to paragraph numbering. So, in your book file, select all chapter files after the first chapter, right-click, and select Numbering. Then in the Paragraph tab, select Continue from previous.
    If you want to use the <$chapnum> building block, then replace the appropriate <n> with <$chapnum> in the autonumbering for the paragraph format. Then do  the same as in the first paragraph, but select the Chapter tab and select continue from previous. In the book file, select the first chapter, right-click, and select Numbering. Then in the Chapter tab, select start at 1.
    The important thing is to set the numbering from the book file, not within each chapter file. It is the book file that controls things.
    Van

  • Autonumber bug in headings following a procedure

    Hoping someone has an answer to this...
    I'm on Frame 11 (11.0.0.380) on Windows 7.
    I'm running into a strange issue with headings that are autonumbered. Everything works as expected... until I include a proccedure that has autonumbered steps and sub-steps. The heading immediately following the procedure renumbers from the beginning. The image below shows an example. There are three headings, which are numbered correctly. Then I inserted a subheading with a procedure and the heading below it has incorrect numbering. This only happens in headings that follow a procedure.
    The autonumbers for the paragraphs are:
    Heading1: <$chapnum>.<n+>
    Heading2: <$chapnum>.<n>.<n+>
    Numbered: S:<n+>/\t
    NumberedCont1 (sub-step): <a=1>.\t
    Is there something incorrectly set up in the autonumber format or is this a bug?

    Take a look at this. http://help.adobe.com/en_US/FrameMaker/9.0/Using/WSF176D8C8-8133-4860-88E3-AF69262623F0.ht ml
    The problem is in this paragraph with this numbering:
    NumberedCont1 (sub-step): <a=1>.\t
    You reset the numbering of the main paragraph back to 1, when you used the <a=1> tag since you did not preface it with S:.

  • Autonumber (sequencenumber) variable

    Hi,
    we're working on IP and we're trying to find a way to add a sequence number to our planning function. The idea is that one can do planning on a combination of Cost center and Cost element, whereby it is possible to plan more than 1 line on such a combination using the mentioned sequence number (possibly in combination with a copy function-e.g. one can copy a line and a new sequence number is automatically added).
    Now I saw a post on this forum with regard to an autonumber variable, however the problem in that post didn't really regard the variable itself, and the solution was not explained. Is there anybody who knows the mentioned solution or has onother one?
    Regards

    Not exactly,
    what should happen is that every combination of cost center and cost element has a sequence number. For example:
    COST CENTER    COST ELEMENT    SEQ NR
    1000______________400100_________1
    1000 _____________ 400120_________1
    1000 _____________ 400120_________2
    2000 _____________ 400100_________1
    2000 _____________ 400100_________2
    2000 _____________ 400100_________3
    Edited by: Jesse Brock on Sep 22, 2009 12:18 PM
    Edited by: Jesse Brock on Sep 22, 2009 12:19 PM

  • AutoNumber data type

    Hello.
    First of all, I need to tell you that I am a newbie to Oracle and I am not even sure if I am at the right place...
    Here is my question anyhow.
    I am trying to convert a MS Access table to that of Oracle and was wondering what would be the equivalent data type in Oracle for "AutoNumber" data type in MS Access? I heard that I can use sequence object and trigger to do this but I am interested in knowing whether or not there is an equivalent data type for "AutoNumber" is in Oracle.
    Thanx.
    SK
    null

    No, there is no Access-equivalent autonumber in Oracle. If you want automatic key generation, create an oracle Sequence and increment it using an insert trigger. Front end applications will see no difference - i.e. you add the new record, then you can read back the generated key.

  • Autonumber setting overwritten

    I have over 100 tables in an oracle database where each of them has a corresponding sequence generator. For each of the physical services corresponding to these tables, I have gone to the trouble of setting the autonumber property so that the corresponding sequence generator gets "fired". (thank you to Igor for this guidance). My problem is: When I update my metadata (whenever there is a database change), these properties in the physical layer get "wiped" clean. What tricks are there out there that can be used to keep this from happening? Is there a batch utilitiy that can be run so that if a table is called "foo", the the sequnce "foo_seq" gets associated with it in the corresponding physical data service (as an autonumber property)?
    Thanks in advance.
    SCott

    Please open an enhancement request. Be sure to ask for both of
    1) When databases tables are imported, that autogenerated columns are detected and the appropriate metadata is created (this may not be possible as the jdbc metadata may not provide sufficient information); and
    2) When database metadata is updated, that user-modified information be preserved. This gets a little tricky as your database modification might involve removing the autogenerated aspect of those columns, thus keeping the autogenerated metadata would be incorrect. Hopefully (1) is possible.
    - mike

Maybe you are looking for