jQuery in Action, 2nd edition*
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
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: 18523
    
  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: 7545
    
  18

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: sequence number generation
 
Similar Threads
generating numbers from 1 to 100 to store in an array
[Hibernate] Please explain hilo generator
can anyone help please
Auto Generation of Sequence Numbers
Getting Error :HTTP Status 405 - HTTP method GET is not supported by this URL