Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto generate new document numbers

Status
Not open for further replies.

Toro22

Programmer
Dec 29, 2004
1
NO
Hi

Im making a database to store document references for drawings. One of the main points are to generate muliple part document numbers of the type 004-007-2003-KSQ - from the logged on user, current project etc.

There is a possiblillty for several users to be creating documents at the same time, so It has to be the server creating the new doc. number when creating the new row.

The database is accessed via a Delphi front end.

Any help/pointers very welcome ! Thanks !
 
Would it be possible to use date/time stamps?

mysql> select concat(current_date()+0,current_time()+0) as stamp
-> ;
+----------------+
| stamp |
+----------------+
| 20041230160831 |
+----------------+

with for formatting



"If you always do what you've always done, you will always be where you've always been."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top