Can I recycle / reboot my sequence on a specific date?

Dear all

Can I recycle / reboot my sequence on a specific date? can for example a sequence be recycled on July 1st of each year.

Normally I regenerate my primary key on the beginning of the year for example on July 1, 2013, she became 2014000001, July 1, 2014, it became 2015000001.

So, in this way, is it possible?

Thank you.

Hello

MUmarAli wrote:

A big thank you to you all for your response cooperative.

But I do not understand why is this not good practice?

Isn't better to have a primary key that is more descriptive than just 1,2,3... ? ...

No, it's actually better to have a primary key that doesn't mean anything.  Maybe it's not intuitive, but it's true.

Ever want to change primary keys.  No matter how carefully you fill, errors are always possible.  If a line is created with the wrong year, you will need to change it after you find the error, but you never want to change primary keys.

Tags: Database

Similar Questions

  • Where can I recycle my old iPad?

    I'm ready to recycle my iPad 3rd generation 32GB Black Wi - Fi only and I'm trying to do at home, it's barely cracked. Which websites can I recycle my iPad or my iPad trade? It is fixed so the screen will not eject, and it was to be fix by 3rd party. If it emerges, it would be more probably touch at random, and if I recorded it, he still have wacky touch. I can bring my load cables and Adaptateures to recycle my iPad, it will sell to someone or it will go to Liam?

    At the Apple Store or best buy maybe, if they take it. Try it and see. If this is not the case, there are to many other online recyclers. Delete all, of course.

  • Can I recycle a cracked iPhone or iPad?

    I just bought an iPad Pro on my own money for father's day one iPad replace broken 3 which has split. When I tried recycling with all checked yes, they actually give me a $75 Apple Store Gift card, but when I checked the number, they don't recycle.

    You can probably recycle but can not get money.

  • Update Premiere pro cc 2015.3 - since this update I can't work move my sequence

    Update Premiere pro cc 2015.3 - since this update I can't work move my sequence!

    Any suggestions please?

    Project work is not in 2015.3

  • Update of Windows Vista SP on reboot hangs with an error capilock.dat

    Original title: capilock.dat

    Try to do an update of SP for Vista and after reboot hangs with xxx/xxxxxx capilock.dat

    Can someone advise on a solution or just a picture re the only way to go?

    Peter

    Hi Peter,.

    You can read the following article and try the methods provided to solve the problem.

    http://support.Microsoft.com/kb/949358

    You can also check the link and try the steps to install Service pack.

    How to troubleshoot Windows Vista and Windows Server 2008 service pack installation issues

    http://support.Microsoft.com/kb/947366

    Hope this information is helpful

  • Escape sequence in the encrypted data

    Hello

    I'm trying to read data from a file and write it in another file after encrypting. I use 16-bit AESEncryption thing Key.Every is fine. I am able to encrypt the data correctly. But when the decryption is done BadPaddingException.I lil bit of research and find that it throws a Badpadding Exception, because there are a few escape sequences in the encrypted data, such as \n, \r, \t, \f etc..

    One thing is if I encrypt and decrypt the data immediately without saving it to file it works fine. {But when I encrypt the data and file writing and later, when I decrypt the data, then I'm the exception (as I am reading line by line) if suppose my encrypted data is like this b}@\n<> and when I write file o, b} @ will be written on one line and

    As a quick ground, I tried this if the encryypted data is less than the length of the block which is 16. then I read another line and merge these data of bytes in 2 lines, by adding a 0xA in the meantime and passing this to decipher. Its not working properly. But what of the escape of another sequence like \r,\t and all. Can someone suggest me please how to deal with this.

    Thanks in advance

    I solved this problem by myself. We cannot replace \n, \r with a different value for byte. Because all the values of bytes will come up some or another. For my needs, I should identify each row of data. So here I can't identify each line \n and \r are present in the encrypted data. And I can not put any value to indicate the end of the line. So after working wrapper, I got a medium and it is. I will read the data to the first file, encrypt the byte data and convert each byte in the byte array resulting from float and will write that float one by one in the new file. And when playing I've read a floating point number and converts it into bytes and added to DataBuffer.Here I can identify easily, end of the line by putting my own val (when writing to the file) is not in the range of bytes val (i.e.-128 to 127), so if the defined end of line happens I get the byte of the buffer array and and this byte array data and This process continues until the end of the file is reached. I don't know whether there is a correct approach. But at least it solved my problem. I give this info here because if another is facing the same situation, so at least they will have some info from my exp.

  • Sequence of character and Date

    Hello

    Oracle 11.2.0.1
    Windows

    Is there any way by which I can get next character and date as it takes the sequence number please? Suppose that in my table below is data:
    AA
    AB
    CA
    AD
    ..
    ..
    AX
    AY
    AZ
    BA
    BB
    BRITISH COLUMBIA
    ...
    BX
    BY
    BZ

    and I would like to get this type of sequence of object / function. Similar work if possible, date also please.

    Thank you.

    You are looking for something like this?

    create table test (col1 varchar2(2),col2 date,id number);
    
    CREATE OR REPLACE TRIGGER testtrig
    BEFORE INSERT ON test
    FOR EACH ROW
    DECLARE
    BEGIN
    select max(trunc(nvl(col2,sysdate)))+1
    into :new.col2 from test;
    select x1.seq
    into :new.col1
    from
    (
    with
      letters
      as
      (select chr( ascii('A')+level-1 ) letter
         from dual
      connect by level <= 26
      )
    select l1.letter || l2.letter as seq,rownum as rr
        from letters l1, letters l2
    ) x1
    where x1.rr=(select count(*) from test)+1;
    end;
    /
    
    SQL> insert into test(id) values (1);
    
    1 row created.
    
    SQL> insert into test(id) values (2);
    
    1 row created.
    
    SQL> insert into test(id) values (4);
    
    1 row created.
    
    SQL> insert into test(id) values (5);
    
    1 row created.
    
    SQL> select * from test;
    
    CO COL2              ID
    -- --------- ----------
    AA                    1
    AB 07-JUN-13          2
    AC 08-JUN-13          4
    AD 09-JUN-13          5
    
    SQL>
    

    Idea received from http://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:4136198000346693074

    Example, above work for 676 lines, because I gave the length of col1 like 2. If you want to develop in more lines, then follow the link that I write here.

    If you want to start your date column from a specific date, then in the code above to triger:
    Select max (trunc (nvl (col2, sysdate))) + 1
    You can give your date for sysdate instead

    and you did.

    If the above doesn't work, or you're looking for something different, then let us know.

    Concerning
    Girish Sharma

  • How can I unlock my iPhone 4 without erasing the data? I know my password but its saying its wrong

    How can I unlock my iPhone 4 without erasing the data on it? I know what is my password, but it says its wrong. He lets me twice after continuous tent of the same password so I know it's the right password. There must be something wrong with the phone, but I don't know what.

    You cannot unlock the device without erasing it first (relocation of iOS).

  • How can I enter BIOS compaq610 screen and set the date, time

    How can I enter BIOS compaq610 screen and set the date, time

    Hello

    See Page 94 or Page 100 (according to what's relevant) of your & Maintenance Guide.

    Kind regards

    DP - K

  • A customer sent me a file that are plans of its architect. I can't open this file because it is a .dat file. is there anyway that I can open it?

    A customer sent me a file that are plans of its architect.  I can't open this file because it is a .dat file.  is there anyway that I can open it?

    Ask your customer what program he used to create the file. Steve Winograd, Microsoft MVP (Windows desktop experience)

  • How can I restore my photos/docs from the Dell Data Safe emergency backup file?

    incompatibility with estensions file DSB

    Files saved during the backup secure files DAT Dell are the extensions of file .dsb by the Dell site. Windows 7 does not open the files to restore on reg location Windows Media as before the backup. .Dsb error message unrecognized files. How can I restore my photos/docs from the Dell Data Safe emergency backup file?

    I know that you need a Dell utility for this...

    And what has this to do with Windows 7 photos and videos, I really don't know...

  • My user folder displays the data of 30 GB. Actual data are only 2 GB. I want to wipe my drive C of hidden data. How can I get the details of 30 GB of data shown in the properties of the folder

    My user folder displays the data of 30 GB. Actual data are only 2 GB. I want to wipe my drive C of hidden data. How can I get the details of 30 GB of data shown in the properties of the folder.

    Hello

    This free program allows you to see what is taking place.

    http://www.Jam-software.com/treesize_free/

    Here's how to understand Treesize Screenshots:

    http://www.Jam-software.com/treesize_free/screenshots.shtml

    ____________________________________

    Also check how much space system restore uses:

    http://Windows.Microsoft.com/en-us/Windows7/how-much-disk-space-does-System-Restore-require

    _____________________________________

    You can clean your hard drive using these two methods.

    "Delete files using Disk Cleanup"

    http://Windows.Microsoft.com/en-us/Windows/delete-files-using-disk-cleanup#delete-files-using-disk-cleanup=Windows-7

    Using the free CCleaner program:

    http://www.Piriform.com/CCleaner

    In NO case use the registry cleaning Option in CCleaner

    _____________________________________

    Download, install, update and scan your system with the free version of Malwarebytes AntiMalware:

    http://www.Malwarebytes.org/products/malwarebytes_free

    And Norton Backup, if you are using Norton, can do strange things with filling of hard drive space.

    See you soon.

  • I'm trying to restore my computer to a specific date, but I can't find the option that will allow me to go there.

    Hello

    I'm trying to restore my computer to a specific date, but I can't find the option that will allow me to go there. Help, please! Its really URGENT.

    Original title: urgent

    See option #1 on this page: http://cmdrkeene.com/quickly-repair-pc-problems

  • I am creating a stamp of Certification of drawing dynamic shop with fields of text 'Name' and 'Date '. I tried different ways within Javascript, but I can't seem to make it work. The Date and time remains static on the stamp when it is inserted and

    I am creating a stamp of Certification of drawing dynamic shop with fields of text 'Name' and 'Date '. I tried different ways within Javascript, but I can't seem to make it work. The Date and time remains static on the stamp when inserted and always reflect when the stamp was created and the name is always my name. I try to have the user name or the username inserted so that he who is the insertion of the postmark of the stamp automatically inserts their name and what day and time the stap is inserted. I can't get this dynamic stamp works like the default Adobe Acrobat Dynamic stamps. Can anyone help with this one. Thank you

    Have you created a page template for your stamp? Did name the template of the page correctly? It's the right format:

    #InternalStampName = display name of stamp

  • Dynamics Processor Calc does not reach more than [100] ESM blocks during the calculation, please increase the CalcLockBlock setting, and then try again (a small data cache setting can also cause this problem, check the size of data cache setting).

    Hello

    Our environment is Essbase 11.1.2.2 and work on Essbase EAS and components of Shared Services. One of our user tried to execute the Script of Cal of a single application and in the face of this error.

    Dynamics Processor Calc does not reach more than [100] ESM blocks during the calculation, please increase the CalcLockBlock setting, and then try again (a small data cache setting can also cause this problem, check the size of data cache setting).


    I did a few Google and found that we need to add something in the Essbase.cfg file as below.

    Dynamics Processor Calc 1012704 fails to more blocks ESM number for the calculation, please increase the CalcLockBlock setting, and then try again (a small data cache setting can also cause this problem, check the size of data cache setting).

    Possible problems

    Analytical services cannot lock enough blocks to perform the calculation.

    Possible solutions

    Increase the number of blocks of analytical Services can allocate to a calculation:

    1. Set the maximum number of blocks of analytical Services can allocate at least 500.
      1. If you are not a $ARBORPATH/bin/essbase.cfg on the file server computer, create one using a text editor.
      2. In the essbase.cfg folder on the server computer, set CALCLOCKBLOCKHIGH to 500.
      3. Stopping and restarting Analysis server.
    2. Add the command SET LOCKBLOCK STUDENT at the beginning of the calculation script.
    3. Set the cache of data large enough to hold all the blocks specified in the CALCLOCKBLOCKHIGH parameter.

    In fact in our queue (essbase.cfg) Config Server we have given below added.

    CalcLockBlockHigh 2000

    CalcLockBlockDefault 200

    CalcLockBlocklow 50


    So my question is if edit us the file Essbase.cfg and add the above settings restart services will work?  and if yes, why should change us the configuration file of server if the problem concerns a Cal Script application. Please guide me how to do this.


    Kind regards

    Naveen

    Yes it must *.

    Make sure that you have "migrated settings cache of database as well. If the cache is too small, you will have similar problems.

Maybe you are looking for