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(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..

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
generate file
generate file  How to generate file(.doc or .xls or .txt ) with containing data in it.By clicking on a link
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
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 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 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
id
id  how to find date of birth and gender in id in html with the help of javascript
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
generate report in swing
generate report in swing  generate report in swing
php generate link - PHP
php generate link  How can i generate links in PHP for my photo gallery app
generate charts using JSP
generate charts using JSP  any one know coding for generate bar chart or pie chart using JSP
ModuleNotFoundError: No module named 'generate'
ModuleNotFoundError: No module named 'generate'  Hi, My Python... 'generate' How to remove the ModuleNotFoundError: No module named 'generate... to install padas library. You can install generate python with following
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
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
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
generate Email - JSP-Servlet
generate Email  Hi I need to generate an automated email and need to send it to the client like an confirmation email after registering to my website. I m using jsp code. Please help me out with this issue.  Hi friend
jsf: generate another panelGrid
jsf: generate another panelGrid  hello the following is my code print("code sample"); <%@ taglib uri="http://java.sun.com/jsf/html" prefix... generate another panelgrid with the same number of columns and rows (Each time I
how to generate bank account number?
how to generate bank account number?  how to generate account number?or format or rules for bank account number
Javascript generate textbox
Javascript generate textbox In this tutorial, you will learn how to generate...;script> function generate() { var no = document.getElementById("text"...;+'<input type="text" id=text'+i+'><br>\n'
to generate barcharts - Java Beginners
to generate barcharts  Please kindly suggest: to generate a bar chart which should take data from backend(JDBC),in which Y-axis should represent...) If you want to generate bar chart using JFreeChart in java, try the following
Using Hibernate <generator> to generate id incrementally
Using Hibernate <generator> to generate id incrementally... to demonstrate it. You should not use this method to generate the primary key in case...;CREATE TABLE `book` (  `id` int(11) NOT NULL default '0', 
ModuleNotFoundError: No module named 'apyref-generate'
ModuleNotFoundError: No module named 'apyref-generate'  Hi, My... named 'apyref-generate' How to remove the ModuleNotFoundError: No module named 'apyref-generate' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'apyref-generate'
ModuleNotFoundError: No module named 'apyref-generate'  Hi, My... named 'apyref-generate' How to remove the ModuleNotFoundError: No module named 'apyref-generate' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-generate'
ModuleNotFoundError: No module named 'django-generate'  Hi, My... named 'django-generate' How to remove the ModuleNotFoundError: No module named 'django-generate' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'dockerignore-generate'
ModuleNotFoundError: No module named 'dockerignore-generate'  Hi...: No module named 'dockerignore-generate' How to remove the ModuleNotFoundError: No module named 'dockerignore-generate' error? Thanks   Hi
ModuleNotFoundError: No module named 'dockerignore-generate'
ModuleNotFoundError: No module named 'dockerignore-generate'  Hi...: No module named 'dockerignore-generate' How to remove the ModuleNotFoundError: No module named 'dockerignore-generate' error? Thanks   Hi
ModuleNotFoundError: No module named 'apyref-generate'
ModuleNotFoundError: No module named 'apyref-generate'  Hi, My... named 'apyref-generate' How to remove the ModuleNotFoundError: No module named 'apyref-generate' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-generate'
ModuleNotFoundError: No module named 'django-generate'  Hi, My... named 'django-generate' How to remove the ModuleNotFoundError: No module named 'django-generate' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'dockerignore-generate'
ModuleNotFoundError: No module named 'dockerignore-generate'  Hi...: No module named 'dockerignore-generate' How to remove the ModuleNotFoundError: No module named 'dockerignore-generate' error? Thanks   Hi
ModuleNotFoundError: No module named 'dotnet-generate'
ModuleNotFoundError: No module named 'dotnet-generate'  Hi, My... named 'dotnet-generate' How to remove the ModuleNotFoundError: No module named 'dotnet-generate' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'generate_captcha'
ModuleNotFoundError: No module named 'generate_captcha'  Hi, My... named 'generate_captcha' How to remove the ModuleNotFoundError: No module named 'generate_captcha' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'generate-cmake'
ModuleNotFoundError: No module named 'generate-cmake'  Hi, My... named 'generate-cmake' How to remove the ModuleNotFoundError: No module named 'generate-cmake' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'generate-graphene'
ModuleNotFoundError: No module named 'generate-graphene'  Hi, My... named 'generate-graphene' How to remove the ModuleNotFoundError: No module named 'generate-graphene' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'generate-GUID'
ModuleNotFoundError: No module named 'generate-GUID'  Hi, My... 'generate-GUID' How to remove the ModuleNotFoundError: No module named 'generate-GUID' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'generate-heatmap'
ModuleNotFoundError: No module named 'generate-heatmap'  Hi, My... named 'generate-heatmap' How to remove the ModuleNotFoundError: No module named 'generate-heatmap' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'generate-html'
ModuleNotFoundError: No module named 'generate-html'  Hi, My... 'generate-html' How to remove the ModuleNotFoundError: No module named 'generate-html' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'generate_ip'
ModuleNotFoundError: No module named 'generate_ip'  Hi, My Python... 'generate_ip' How to remove the ModuleNotFoundError: No module named 'generate_ip' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'generate-keys'
ModuleNotFoundError: No module named 'generate-keys'  Hi, My... 'generate-keys' How to remove the ModuleNotFoundError: No module named 'generate-keys' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'generate_password'
ModuleNotFoundError: No module named 'generate_password'  Hi, My... named 'generate_password' How to remove the ModuleNotFoundError: No module named 'generate_password' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'generate-passwords'
ModuleNotFoundError: No module named 'generate-passwords'  Hi, My... named 'generate-passwords' How to remove the ModuleNotFoundError: No module named 'generate-passwords' error? Thanks   Hi, In your

Ads