Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa SQL generate ID
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sharmila
generate ID
0 Answer(s)      2 years and 5 months ago
Posted in : SQL


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(sql);

-- hello sir,

This is the code i have in which i enter all d values except EID which is generated sequentially. But what i need is, the EID sequence number must be generated according to the department, i.e if department is CSE, the EID series must start with 10KT1 , and if the department is IT the eid sequence must start with 12GT1...

Thanq in advance..


Advertisement
View Answers

Related Tutorials/Questions & Answers:
generate ID
generate 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
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
Advertisements
need to generate ID
need 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 ID
need 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
i need the source code to generate id in jsp
i 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
the best way to generate a universally unique object ID.
the best way to generate a universally unique object ID.  What is the best way to generate a universally unique object ID? Do I need to use an external resource like a file or database, or can I do it all in memory
Using Hibernate <generator> to generate id incrementally - Struts
Using Hibernate to generate id incrementally  Hi All, How to increment id using Hibernate ( or if any other) to generate id. I am using... to specify the class name to be used to generate the primary key for new record while
MySQL Generate AlphaNumberic Id In JSP
MySQL 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
id
id  how to find date of birth and gender in id in html with the help of javascript
generate file
generate file  How to generate file(.doc or .xls or .txt ) with containing data in it.By clicking on a link
id creation
id creation  CREATE TABLE mohan2 ( sno bigint(20) NOT NULL AUTO... java.util.*; public class sample3 { static int Generate(String name1,int t...(); int x=Generate(str,sal); if(x==1) System.out.println("Data
Generate Keys
Generate 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
Generate xml
Generate 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 report
generate 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 report
generate 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
id generation
to employee id automatically generate please try this code, useful for u thanks ...");%> any body want to employee id automatically generate please try...id generation  CREATE TABLE `mohan2` ( `sno` bigint(20) NOT NULL
To Generate Excel
To Generate Excel  hi First of all my application uses Struts2 with Springs and hibernate and am new to all of that and my requirement is as follows in a jsp there will be a link where if you click on that a dialog box
how to generate auto code ?
how to generate auto code ?  i wanna genrate auto code for id in core java. pls tell me code of auto genrate
total id
total id  how to print and total my id number ..for example if my id is 0123456789 the output will look like this : 0123456789 0+1+2+3+4+5+6+7+8+9=45 help me plz
Session ID
Session ID  How can I change the session ID of the page?   ...' session ID values because it is very likely to result in the loss of the session or with people acquiring other users' data. The session ID value should be managed
<form id=
form id  sir, <form id="reg1" action="../UploadingCtrl" method="post" enctype="multipart/form-data" name="form1"> this action page can't get String tp = request.getParameter("indegrates"). i wrote article upload
<form id=
form id  sir, <form id="reg1" action="../UploadingCtrl" method="post" enctype="multipart/form-data" name="form1"> this action page can't get String tp = request.getParameter("indegrates"). i wrote article upload
generate report in swing
generate report in swing  generate report in swing
Auto Generated Employee ID
Auto 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
generate charts using JSP
generate charts using JSP  any one know coding for generate bar chart or pie chart using JSP
php generate link - PHP
php generate link  How can i generate links in PHP for my photo gallery app
Generate Random Numbers
Generate Random Numbers  hi,,, Please give me answer with example How do you generate random numbers within a given limit with actionscript... This function generate random numbers with in given limit
generate pdf in spring
generate pdf in spring  HOw do i generate pdf in a spring application, so that my click should query the database and a pdf should be generated and downloaded to the client side
generate pdf in spring
generate pdf in spring  HOw do i generate pdf in a spring application, so that my click should query the database and a pdf should be generated and downloaded to the client side
generate pdf using jsp
generate pdf using jsp  how do i generate a pdf using jsp that should query the data from the database and write it into a pdf and download the same
pdf generate from jsp
pdf generate from jsp  how do i generate a pdf using jsp that should query the data from the database and write it into a pdf and download the same
Advertisements
 

 

 

DMCA.com