I want to generate bill number and employee number like SCS-0001 and so on and bill number like SCS/'date''month'/001............ ie "SCS/0802/001"........ and so on in jsp or servlet and database is mysql...
..
Please help ...
February 9, 2013 at 3:09 PM
hi friend,
You can create a table as follows :
CREATE TABLE `employee` (
`tag_id` char(3) NOT NULL,
`serial_id` int(4) unsigned zerofill NOT NULL AUTO_INCREMENT,
`dd` int(2) unsigned zerofill DEFAULT NULL,
`mm` int(2) unsigned zerofill DEFAULT NULL,
PRIMARY KEY (`tag_id`,`serial_id`),
UNIQUE KEY `serial_id` (`serial_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
And insert some records into the columns as follows :
insert into employee(tagid,serialid,dd,mm) values ( 'SCS','001','08','02')
insert into employee(tagid,serialid,dd,mm) values ( 'SCS','002','09','02')
And to display in specific format you can use the concat() method as follows :
SELECT CONCAT(tagid,'-',serialid) as employeenumber FROM employee;
SELECT CONCAT(tagid,'/',dd,mm,'/',serialid) as billnumber FROM employee;
For detail tutorial please go through the following link
MySQL Generate AlphaNumberic Id In JSP
Related Tutorials/Questions & Answers:
Generate Employee ID (SCS-0001,SCS-0002......)Generate Employee ID (
SCS-0001,SCS-0002......) Hello everyone i am beginner in java and i am working on my major project
I want to
generate bill number and
employee number like SCS-0001 and so on and bill number like SCS/'date
generate IDgenerate ID Statement st1=con.createStatement();
String sql="insert into
employee values(emp_seq.nextval,'"+ename+"','"+eadd+"','"+ephone+"','"+email+"','"+department+"',"+Integer.parseInt(ebpay)+",20,0)";
st1.executeUpdate
Advertisements
Auto Generated Employee IDAuto Generated
Employee ID Hello Everyone
I want to
generate an
ID like (SCS-0001) and then it should be auto incremented each time a new
employee add page is opens.
I am using My Sql database
need to generate IDneed to
generate ID hai,
i need to
generate ID i.e when i select addemploye option and submit, it should
generate a emp
ID which is 1 greater than the previous highest
ID value stored in database.
eg: if the higest value
need to generate IDneed to
generate ID hai,
i need to
generate ID i.e when i select addemploye option and submit, it should
generate a emp
ID which is 1 greater than the previous highest
ID value stored in database.
eg: if the higest value
get details of employee after enter the emp_idget details of
employee after enter the emp_id how to get
employee details after entered the emp_
id from database
after that we have three more option add new,modify and delet
employee
Please visit the following
get details of employee after enter the emp_idget details of
employee after enter the emp_id how to get
employee details after entered the emp_
id from database
after that we have three more option add new,modify and delet
employee
Please visit the following
i need the source code to generate id in jspi need the source code to
generate id in jsp hai,i need the source code for
generate id...which is i need to
generate the new
id from the maximum... of
generate ids each should have some range...plz give the source code in jsp with ms
MySQL Generate AlphaNumberic Id In JSPMySQL
Generate AlphaNumberic
Id In JSP
In this section we will discus about how to
generate id in specific format in
MySQL and JSP.
This example explains you that how to
generate alpha numeric
id in MySQL and
also how to fetch
Employee formEmployee form In
employee form emp
Id id after any data iserted is incremented for oher data insertion. insert, delete, update buttons when we cleak the select buttoun then the created table data iserted automaticaly
Employee SalariesEmployee Salaries Define a class
Employee with the following properties. Every
Employee has a name and a salary. The constructor creates an
Employee... the salary of the
Employee to zero. The method getinfo() will return the current
EMPLOYEE - SQLEMPLOYEE CALCULATE
EMPLOYEE SALARY Hi friend,
Please give the full details of Problem.
Thanks
generate filegenerate file How to
generate file(.doc or .xls or .txt ) with containing data in it.By clicking on a link
employee recordsemployee records Pl give one script like i will creat one table name Emp_master
and column name like Empcode, Empname.
I like one form where I...
and one report like details of
employee
thanks
employee recordsemployee records Pl give one script like i will creat one table name Emp_master
and column name like Empcode, Empname.
I like one form where I...
and one report like details of
employee
thanks
employee recordsemployee records Pl give one script like i will creat one table name Emp_master
and column name like Empcode, Empname.
I like one form where I...
and one report like details of
employee
thanks
Employee SalariesEmployee Salaries Define a class
Employee with the following properties. Every
Employee has a name and a salary. The constructor creates an
Employee... the salary of the
Employee to zero. The method getinfo() will return the current
Employee SalariesEmployee Salaries Define a class
Employee with the following properties. Every
Employee has a name and a salary. The constructor creates an
Employee... the salary of the
Employee to zero. The method getinfo() will return the current
Employee SalariesEmployee Salaries Define a class
Employee with the following properties. Every
Employee has a name and a salary. The constructor creates an
Employee... the salary of the
Employee to zero. The method getinfo() will return the current
Employee SalariesEmployee Salaries Define a class
Employee with the following properties. Every
Employee has a name and a salary. The constructor creates an
Employee... the salary of the
Employee to zero. The method getinfo() will return the current
Employee SalariesEmployee Salaries Define a class
Employee with the following properties. Every
Employee has a name and a salary. The constructor creates an
Employee... the salary of the
Employee to zero. The method getinfo() will return the current
employee progarmemployee progarm Hai,
I have developed a code for an
employee program by using jtext fields and buttons,it has no errors but while we are compiling it it is saying that "Exception in thread "main
generate reportgenerate report hai, im learning php so pls help me ....
what is a coding for
generate report by month using php...
wat is a code php for create calender and listing from database...
pls someone help me
generate reportgenerate report hai, im learning php so pls help me ....
what is a coding for
generate report by month using php...
wat is a code php for create calender and listing from database...
pls someone help me
Generate xmlGenerate xml hi
can i
generate xml file with xsd using JAXP in java. if possible please send
java code.
Thanks.
Please visit the following link:
http://www.roseindia.net/xml/creating-xml-tree.shtml
Generate KeysGenerate Keys hello
i need code to
generate key , after that send Keys to email address user.
for example if you member in your website,if member not having Secret Keys not can download files
if member having secret key i
idid how to find date of birth and gender in
id in html with the help of javascript