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

Tags: Database

Similar Questions

  • 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.

  • I replaced my original Apple Watch with a watch of S2. When I install and associate the new shows, is there a way I can restore all applications, configuration information and data of the original of the new shows so I don't have to start from scratch?

    I replaced my original Apple Watch with a watch of S2. When I install and associate the new watch and my iPhone 7 more, is there any way I can restore all applications, configuration info and data between the original and the new shows, so I don't have to start from scratch?

    Try this procedure

    Cancel the twinning of your iPhone - Apple and Apple Watch Support

    Spend your Apple Watch a new iPhone - Apple Support

  • Cannot delete items in documents and data for each application

    I want to delete unnecessary files in several applications under general > use storage and iCloud > manage storage, but the section documents and data for the respective applications will not operate.

    I have it several times but it doesn't work.

    Can someone help me?

    Thanks in advance

    Omari says:

    I want to delete unnecessary files in several applications under general > use storage and iCloud > manage storage, but the section documents and data for the respective applications will not operate.

    I have it several times but it doesn't work.

    Explain what you do and what happens when you try to delete the data.

  • HELP: My Macbook Pro tells the bad year and date!

    It's horrible. I am a user of Macbook Pro of Israel. The current date SHOULD be September 1, 2016, but that's what I get for some reason any. It was good but I messed up it somehow and I tried over and over again but I can not change the year and date! It says 28 AV 5776 instead of September 1, 2016. PLEASE SAVE ME!

    what I mean:

    Go to System Preferences > region and language and make sure that the calendar is set to Gregorian

  • How to remove documents and data in the iphone app podcast 6

    I know how to remove each podcast, but how do I remove "documents and data" in the application of podcast?  I have more than 4 GB of data and documents.

    I think I found a thread that is useful for you: https://origin-discussions-us.apple.com/thread/6822791?start=60 & tstart = 0

    Sonny3301 answer worked for me, «...» "(The steps are: 1) download the Battery Doctor app on your iPhone (it's the first one that appears in the search) (2) hit the"Junk"icon on the bottom and tap 'Clear Cache'." (3) repeat until your space becomes available. The people that I learned this technique of some other bulletin board said it took 10-15 tries; It took me + 30 attempts. The memory savings start small at first, then it starts to hit hundreds of MB at a time. It sounds crazy, I know, but I went to have less than 200 MB of free space for 3.6 GB. Great thing, it was my podcast app had only been hogging to 1 GB of data, so the app battery doctor found 2.6 Go elsewhere. Good luck to you all and you are welcome. »

  • Time and Date setting

    In general - the time and date settings can I put two areas. I want to see two areas on my status bar. Don't want an app for that.

    I'm afraid, which is not supported by the firmware. If you want that for any update to update future iOS, let Apple know your wish using this link:

    Apple - iPhone - Feedback

  • AutoComplete suggests my user ID and date of birth on the log in page of my savings account - how can I stop this?

    Most of the time the AutoComplete is really useful. However, when I connect my savings account, my user ID and date of birth are available, allowing anyone on my PC to check my account (a security code is required for all transactions which does not seem to be autocomplété!) - how can I turn off this please? This started because I reset Firefox (because of the slow, such as recommended by Firefox). Thank you.

    I know how you can do this:

    1. Delete an AutoComplete suggestion menu entry drop-down
    2. Disable completely auto form fill
    3. Clear all saved form autocomplete entries
    4. Entered AutoComplete clear form selected (using an add-on)

    but I don't think that Firefox has a built-in feature to be selective in what he recorded in the first place.

    For items numbered above:

    (1) when the suggestion appears, use the arrow keys on the keyboard to select the suggestion unwanted in the list and press the delete key.

    See: control if Firefox automatically fills in forms.

    But I don't think that this blocks Firefox to save again in the future.

    (2) change your privacy settings in the Options dialog box

    "3-bar" menu button (or tools) > Options > privacy

    If set ' Firefox will be: remember history ' to take ' conservation rules: use the custom settings for history. " Then you can uncheck the box ' Remember search and form history.

    (3) clear all AutoComplete form data saved

    To clear everything, you can use:

    button '3-bar' menu > history > clear recent history

    If you do not see a list of check boxes, click the Details button. Deselect all categories other than "Form & Search History" for those who are kept. At the top, set the time interval, and then click clean now.

    (4) clear SOME saved form autocomplete entries (when you are not currently using the form)

    You need an add-on for that. In the past, I've only tried this one, but there might be other good: https://addons.mozilla.org/firefox/addon/form-history-control/

  • Documents and data - storage leak (bug?)

    Hello

    iPhone 64 GB, ios 9.3.2 6s.

    The question is:

    Documents and data to develop up to 32 GB (what I saw), as seen on iTunes and the phone ran out of free space.

    This happens already months ago, I did not find any application causing it or either messages or e-mail account, I finally had to make full backup and restore via iTunes to purge this unknown space. I thought that behind me, but still, less than months then after full restore documents and data weight approximately 32GB, that's enough, before I restore once again, someone has an idea?

    I tried everything to locate the space of simple storage up to PhoneClean, safeeraser, iFunBox management screen, I have no idea what is causing this problem...

    also tried google the question, found only on the topics related to applications causing, but I already tried to remove all his apps manually one by one, which did not help

    We hope to get some intel.

    Thank you community

    Try to restore as new, not backup your backup is probably damaged. The fact that this has happened two times points to an application or system corruption in the backup. Then download apps you want from scratch. I had to do it myself in the past, unfortunately, no fun, I know.

  • documents and data taking up 46GB on iPhone 6 64GB

    "documents and data" is 46GB on iPhone 6 64GB model(6.3.1 iOS). I can't understand what it is or how to remove it. my iPhone has 0 GB free. I have about 2.2 GB photo, less than 200 MB of music, around 1.2 in Apps, 5.2 GB in the other and 46 GB in "Documents and Data. How can I find out what it is and how it remove? I took it to the Apple store and he suggested that I "Reset all settings" I have just done a few minutes before the announcement. I have a feeling they're going to ask me to erase all content and settings, if I take the phone to the apple store tomorrow.

    The steps I did and what I use it for.

    -Settings - general - storage & use iCloud, click on storage management, all applications are in the 36 KB to 800MB range totaling approximately 1 GB, which does not match the "In use" section above.

    Icloud - disc is turned off, Photos, calendars, Mail, Safari, icloud backup tower are all extinct. Just contacts, reminders and notes are sync.

    -J' have only a mailbox exchange which is set to synchronize for 1 week only.

    -I have only basic applications like the new york times, wall street journal, twitter, facebook, google maps.

    What is others and what I can do about it - CSA

    This can help

  • Time and date of the Iphone 6s set contacts automatically / backup

    Hi my name is Rebecca. Please be patient, this is a long story with a question to which Apple for a month and a half has not been able to solve. The end of February, I went to Sprint to upgrade my iphone 6 to a 6 s. (my 6 had no problem). The backup and restore to the other went off without a hitch. Two weeks having the phone, date and the value automatically switched to a GMT setting which is 4 hours ahead of New York. Assumption is that the phone has been deserted. I got a new phone and everything has been backed up and restored again. Less than two weeks later, the same goes for the 2nd iphone 6 s.  I went to Sprint and got a 3rd iphone 6 s. backup and restored all again. Less than a week later for the 4th time, the new iphone 6 s time and date switched to the time zone GMT 4 hours ahead of New York. At this point, I called Apple Tech support. A very nice tech Jason worked with me for 2 weeks to fix this. He sent Apple a 4th iphone 6s. We did a backup and when the new phone came in did us a restore. A few days later, the same problem. Apple accuses Sprint, Sprint complaint to Apple. At this point, Sprint said that my sim card was corrupted and he sent me a new. On the phone with Jason, we did a reset of the iphone 6s failing manufacturers. Removed the corrupted sim card and put in a new vacuum. Phone restarts and when you get to the Setup screen, it asks "set up as a new user or a user to return. Jason said as a new user.  I clicked on new user. Following her request for an apple ID. Jason said I should put in my existing apple id (although it has been activated on as a new user). At this point the phone wouldn't turn on. On the phone with Sprint. They did not understand as to why the phone would not activate. Jason suggested that I put my original sim card in (which was noted as corrupted), then the active phone. At this stage because I had not done a restore, the only information on my phone now an old backup who had my contacts and some of the notes, images etc. Jason said to do a restore after just 24 hours to be sure of the time and the date stay correct. Not happened. Less than 24 hours, the date and time that is set to automatic changed to the GMT time zone. Jason was out of suggestions. We left him there. I am very angry to pay more than $800 for an iphone that feature very very important does not work. On mine, I restored my phone and thought what I'd do. I then did a backup. I'll stop my icloud. I have reset my builders phone by default and when I went through the whole upward I plugged my phone in itunes and restored my phone from my computer backup. (Icloud is always OFF). Less than 24 hours later at the date and time in GMT area again. Once again, that I have a phone very very expensive with a feature that is vital for me, I can't use. Yes, I could turn the machine off, but I shouldn't do that. So here's my question: Iphone 6, I have not had any problems with my icloud or my sim card or the date and time. 6 s IPhone that I do. I got iphone 4 brand new 6s with the same problem. Is - that my sim card is corrupt and transfer information corrupt, though only it worked fine in my iphone 6? Second question: I don't want to sign up for a new apple id and start from scratch. This will screw up my gmail which is linked to the apple ID. How can I back up my contacts only on my computer and then be able to reset my phone manufacturers by default, then erase all information from my existing apple ID in order to use again, but only restore contacts which is the worst part of transfer phones. Apps and notes, photos and all the rest is not a problem to start from scratch, but contact is almost impossible to have to type each hand one by one. Please someone out there with a solution. Thank you in advance.

    Two recommendations.

    1 post this issue on your part on the iphone forum, to confirm the number two with someone else.

    Use iPhone

    2. you must stop working with Apple. Your iPhone download the signal giving them news of the time and origin of this signal

    I have no idea, but it's not from Apple. Coming here or talk to Jason you wasting your valuable time. It is at least

    get paid for it, you're not. Every second that you type in this position, mine or every second you spent on reading

    the phone with Apple after the second phone had the same problem you've wasted talking to the wrong party. Even than calling your

    manufacturer of furnace you paid 5000 for oven when your gas is not delivered on time or bad quality. And I have

    don't say it's Sprint, cause I don't know, but it's something that gives this info to your phone.

  • How can I reduce the GB "documents and data" as stated on my sync?

    When I sync, I show 35 GB of "Documents and Data.  I'm almost at full capacity on Iphone 64 GB.

    To try to find "documents and data", I removed all Sync Photos, deleted the pictures in "Camera roll", removed the check mark on "synchronize books", (even if not), deleted all the 'music' of sync.

    I'm still 35 GB of "documents and data!

    I removed some rarely used applications.

    I went to settings icloud and removed what little I could find.

    I used the setting app and reviewed the storage on the iphone, I don't see anything extraordinary.

    I feel like there is something in the background, I can't find a job.

    When DandD or other who get big there is usually a damaged system or approx. to isolate the individual application is difficult. Try to do a restore from backup in iTunes. If that doesn't help, try a restore as New. Unfortunately, a restore as new is a pain like all settings and applications will need to be configured from scratch.

    https://support.Apple.com/en-us/HT201252

  • Documents and data with all the storage on iPhone

    A few days ago I tried to send an email with a large attachment. However, it has not been send so I deleted my account from my iPhone. Once I did, I got a message saying that almost all of my storage has been exhausted. I checked to see and I have about 5 GB of available 64 GB. I connected my iPhone to my computer to check which took all this space and 45 GB of my space is being taken up by the Documents and data. I deleted the old messages, imported pictures to my computer and erased, erase my history on safari, check on iCloud, and allows to remove most of my apps that I have read that the removing applications and later re - download. I've also updated to iOS 9.3. It helped very little. Documents and data is now only 43 GB instead of 45 GB. Before that happened, I got about 50 GB of free and now I just 5 GB free after it happened.

    What else can I do to clear more of Documents and data? Should I restore my iPhone to one of the backups that I recorded? Should I take my iPhone at the Apple Store because it happened so suddenly and randomly?

    On the phone, go to settings App > general > storage & use iCloud > manage storage (in STORAGE). Who will provide a list of what applications use data and in what quantity. Tapping on the app with you give the amount of data, the application contains (less himself) and in most cases the ability to delete the application, if you wish. You will not necessarily have to delete the app.

    Once you have completed all the actions, try a forced reboot: hold down the House and on the buttons until the unit turns off. Ignore the cursor off if it appears. Once completed, if it does not start on it own, turn off power with the key On. In some cases, it also contributes to double click the Home button and close all applications before restarting.

    Also, actually iTunes sync erases some of this possibility.

    One last thing, if you have installed whatsapp, there is a known problem cases that it runs in fairly large amount of data storage.

  • Documents and data on an iPhone, my phone is full of these

    Documents and data on an iPhone, my phone is full of these

    This article describes the documents and data as well as "other". Try the suggestions.

    http://osxdaily.com/2013/07/24/remove-other-data-storage-iPhone-iPad/

  • Time and Date on Portege 3490CT...

    Hello.

    Is it possible to set the time and date settings in the BIOS somehow?
    I'm tired of setting the time and date on my windows every time that I reboot or turn on my computer.

    I hope someone can help!

    Sincerely,

    Daniel A. Johansen aka SiLverFerret

    Hi Daniel,.

    If you have set the date and time every time that you start Windows, so I think that your CMOS battery has expired. It is a small battery used only to keep the parameters of the BIOS (including date and time).

    Normally, the CMOS battery recharges when the laptop is connected to the power supply.

    I would recommend that you contact a Service partner to get your replaced CMOS battery (it is normally attached to the motherboard).

    HTH

Maybe you are looking for

  • Auto unblocking "null" Apple Watch

    My Apple Watch connects my rMBP and everything with macOS Sierra very well, but when my watch sends me a notification says "null" unlocked by this Apple Watch. How to replace the text "null"?

  • When I get a new email in my Inbox, my whole computer crashed.

    I always let Thunderbird open when I'm on my computer so that I can catch emails coming. There was a lot of windows updates to download this morning and an update to Thunderbird, also. I started downloading Windows updates and I continued with my com

  • HP Envy model # m7-n101dx: mousepad on laptop

    I have discussed this before and found the answer, but the problem is that he won't stay. I have a problem with the mouse pad buzzing in and out while I'm on Internet or other programs. I spent under mouse settings and disabled and even recorded prof

  • Satellite Pro L300 - can I use the recovery disc back Vista?

    On my computer I am dual boot Windows 7 and Windows Vista.Could get rid of Vista and then later could use the recoevery drive to recover vista? PS I know it erases the entire hard drive

  • I can't install the driver for Deskjet F4180 with Yosemite

    Hello I try to install my Deskjet F4180 on Yosemite following instructions in http://support.hp.com/us-en/document/c04488851 but when I plug in usb print queue is not created automatically and the printer software is not installed automatically. Then