aspose file tools*
The moose likes Beginning Java and the fly likes sequence number generation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "sequence number generation" Watch "sequence number generation" New topic
Author

sequence number generation

Ghouse Modhin
Greenhorn

Joined: Sep 18, 2012
Posts: 1
Sir,

I am creating a bill report Application..I want to generate a sequence number for bill that is starting from 1.and if date changes the sequence number again starts with 1.

help me sir.



this is Ghouse. Thanking you Sir
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18748
    
  40

Ghouse Modhin wrote:
I am creating a bill report Application..I want to generate a sequence number for bill that is starting from 1.and if date changes the sequence number again starts with 1.


Pretty straightforward request. What have you done so far?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7677
    
  19

Ghouse Modhin wrote:I want to generate a sequence number for bill that is starting from 1.and if date changes the sequence number again starts with 1.

Any particular reason why? It sounds like the computer equivalent of 'mixing metaphors' to me.

And anyway, what is a 'date' in your mini-verse? Local? GMT? Does it start at midnight? Midday? 8AM? Does it use Daylight savings?

Lots of questions to answer before we can suggest a solution.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
jQuery in Action, 2nd edition
 
subject: sequence number generation