How to retrieve nVarchat data from Sql Server DB
How can I retrieve data of NVARCHAR data type from Sql Server 2000.
Do I have to user ResultSet.getCLOB() or ResultSet.getBLOB() ?
thx
I have no idea, but you can find out the classname which is mapped by JDBC at the following ways:
// Retrieve mapped class name by metadata.
ResultSetMetaData metaData = resultSet.getMetaData();
String className = metaData.getColumnClassName("columnname");
System.out.println(className); // Prints the mapped class name. I.e. java.sql.Blob or java.sql.Clob
// Or just upcast to object and lookup the instantiated class.
Object object = resultSet.getObject("columnname");
String className = object.getClass().getName();
System.out.println(className); // Prints the mapped class name. I.e. java.sql.Blob or java.sql.Clob
Similar Messages
-
How can I migrate data from SQL Server 6,5 to Oracle 8?
We have a web site based on Microsoft SQL Server 6.5.Now we plan
to migrate the database to Oracle 8.
We have redesigned the tables structure and created tables under
Oracle 8, so we only need to migrate data from SQL Server.
We've exported data from SQL Server to text files.
How can we import data from files and restore to Oracle tables.
Is there a solution which let us to import data for particular
table columns,not all columns?
We'll be appreciated if somene can give suggestions.
Regards
Michael
nullThank you for your reply.
I'll try the Oracle sqlloader utility first.
Regards
Micahel
Oracle Migration Workbench Team wrote:
: Michael,
: Oracle sqlloader is user for this sort of operation, see
: Oracle8i Utilities
: Release 8.1.5
: A67792-01
: available online through Oracle Technology Network.
: The Oracle Migration Workbench can be used to create bcp and
: sqlloader scripts, though since you have altered the schema
these
: scripts would need to be altered by hand after generation.
: Some thought has been put into redesigning table structures in
: the Oracle Migration Workbench, but currently it looks like
this
: reengineering will be left to be done by other tools, eg
Oracle
: Designer, once the SQLServer database has been duplicated with
as
: little change as possible onto Oracle.
: Hope that helps,
: Turloch
: Oracle Migration Workbench Team
: Michael (guest) wrote:
: : We have a web site based on Microsoft SQL Server 6.5.Now we
: plan
: : to migrate the database to Oracle 8.
: : We have redesigned the tables structure and created tables
: under
: : Oracle 8, so we only need to migrate data from SQL Server.
: : We've exported data from SQL Server to text files.
: : How can we import data from files and restore to Oracle
tables.
: : Is there a solution which let us to import data for
particular
: : table columns,not all columns?
: : We'll be appreciated if somene can give suggestions.
: : Regards
: : Michael
: Oracle Technology Network
: http://technet.oracle.com
null -
How to extract incremental data from SQL server to oracle tables in ODI
HI All,
In my ODI sql server is install.My Source is in SQL server and my target is in Oracle.
I need to create a interface mapping where i need to extract incremental data from sql server to oracle.
There is a datetime(with Timestamp) field in sql server .I need to pull incremental data based on dateime.
Example = tablename.DateTime > (select '1-jan-11' from dual) .....i am using this query but its not woking.the error is Invalid object name"dual".
We are not going to use Incremental in IKM and LKM.
Request you to please provide any suggestion ASAP.
Thanks,
LonyYou can do that via Variable.
In the interface mapping create a filter on Tablename.DateTime
and put the condition like this
Tablename.DateTime BETWEEN #VAR and in the variable use this query in refreshing tab with oracle schema
SELECT max(start_time)||' AND '||max(END_TIME)+1 from audit_table where ETL_JOB_CODE = '20'In the package call the above variable in refresh mode and then interface.
This way you will pass from the query between and condition date and pass to interface so that SQL Server fetches the data between those too range.
Note:- You might need to tweak the date format so that SQL Server can understand.
Hope this helps. -
How to only migrate data from SQL Server 2008 to Oracle 11?
According to our requirement, We need to only migrate data from a SQL Server database to an existed
Oracle database user.
1) I tried to do it with SQL Developer 3.0.04 Migration Wizard, But find an issue.
My SQL Server database name is SCDS41P2, and my Oracle database user name is CDS41P2;
When I used SQL Developer to do offline move data by Migration Wizard, I found all oracle user
name in movedata files which gotten by run Migration Wizard
is dbo_SCDS41P2. If the Oracle user name is not the same as my existed Oracle user name,
the data can't be moved to my existed Oracle user when I run oracle_ctl.bat in command line window.
So I had to modify the Oracle user name in all movedata files, but it's difficult to modify them because there are many tables in
databases. So could you please tell me how to get the movedata files which the oracle user name in them is my
expected Oracle user name?
2) I also tried to use the 'copy to Oracle' function to copy the SQL Server database tables data
to the existed Oracle database user. When clicked 'copy to Oracle', I selected 'Include Data' and 'Replace' option
But I found some tables can't be copied, the error info is as below:
Table SPSSCMOR_CONTROLTABLE Failed. Message: ORA-00955: name is already used by an existing object
Could you please tell me how to deal with this kind of error?
Thanks!
Edited by: 870587 on Jul 6, 2011 2:57 AMHi,
Thanks for you replying. But the 'copy to oracle' function still can't be work well. I will give some info about the table. I also search 'SPSSCMOR_CONTROLTABLE' in the target schema, and only find one object. So why say 'name is already used by an existing object'? Could you please give me some advice? Thanks!
What is the 'Build' version of your SQL*Developer ?
[Answer]:
3.0.04
- what does describe show for the SPSSCMOR_CONTROLTABLE in SQL*Server ?
[Answer]:
USE [SCDS41P2]
GO
/****** Object: Table [dbo].[SPSSCMOR_CONTROLTABLE] Script Date: 07/18/2011 01:25:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SPSSCMOR_CONTROLTABLE](
[tablename] [nvarchar](128) NOT NULL,
PRIMARY KEY CLUSTERED
[tablename] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
- what does describe show for the SPSSCMOR_CONTROLTABLE in Oracle ?
[Answer]:
-- File created - Monday-July-18-2011
-- DDL for Table SPSSCMOR_CONTROLTABLE
CREATE TABLE "CDS41P2"."SPSSCMOR_CONTROLTABLE"
( "TABLENAME" NVARCHAR2(128)
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
-- DDL for Index SYS_C009547
CREATE UNIQUE INDEX "CDS41P2"."SYS_C009547" ON "CDS41P2"."SPSSCMOR_CONTROLTABLE" ("TABLENAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
-- Constraints for Table SPSSCMOR_CONTROLTABLE
ALTER TABLE "CDS41P2"."SPSSCMOR_CONTROLTABLE" MODIFY ("TABLENAME" NOT NULL ENABLE);
ALTER TABLE "CDS41P2"."SPSSCMOR_CONTROLTABLE" ADD PRIMARY KEY ("TABLENAME")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ENABLE;
Edited by: 870587 on Jul 18, 2011 1:42 AM -
How to push realtime data from SQL Server
Hello,
I am looking for the best way to approach the following
situation ... 1) how to connect 2) what I will need to maintain
"realtime" updated data on the the web browser (client) side 3) and
if Flash Media Server 2 or the Flash runtime (Platform) would be
required.
I have a SQL Server database that is updated every 5 seconds
with new data and I need to have this data reflected on a Flash
webpage. For simplicity, lets just say its a table that contains 50
records with 4 fields. When/if the data changes in any of the
fields it needs to show up "realtime" on the webpage. All thoughts
would be helpful ... but unfortunately it must be done in Flash
(don't ask) ... Thanks in advance!Having a webpage designed using FLASH 8 that can
communicate with a SQL Database would be something I am looking
into also. I hope someone that really knows what he is doing
explains this to us. I would like to use this with a catalog that
would be updated when I update the SQL Data. Why use FLASH? Reason
I am using it is that one has control of their work. The typical
HTML and other programming that works with HTML seem to NOT have a
standard making your website work look really good in one browser
but look like heck in another and some browsers will just not work
like you designed it. -
Show data from sql server to oracle db
Hi,
I am using oracle 10g R1 on windows 2003 platform. On one machine database 10gR1 is running and on other machine sql server is running. I want to retrieve some data from sql server to oracle database. Please tell me how I can show data from sql server to oracle db.
ThanksTo make heterogeneous connection with oracle:
1.First make an ODBC connection, make entry in System DSN(to create a data source)
2.Make an entry in tnsnames.ora
3.Make an entry in listener.ora under SID_LIST_LISTENER
4.Make an entry in file named init<HS>.ora file located "oracle_base\oracle_home\db\hs\admin"
5.Restart the listener
e.g:
1. create a odbc system dsn named like 'sqlserver'
2. sqlserver= (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp) (HOST=xx.xx.xx.xx) (PORT=1521))
(CONNECT_DATA = (SERVICE_NAME=sqlserver))
(HS = OK)
3. (SID_DESC = (SID_NAME = sqlserver) (ORACLE_HOME = oracle_base\oracle_home\db) (PROGRAM = hsodbc) )
4.Create a file named initsqlserver.ora and make the following entry:
HS_FDS_CONNECT_INFO = sqlserver
Alternatively, you can copy the file named inithsodbc.ora and rename it to initsqlserver.ora
and edit as HS_FDS_CONNECT_INFO = sqlserver
5. lsnrctl reload listener_name
regards
adnan kaysar -
Using Oracle Forms Importing Data From SQL Server into Oracle Tables.
Dear All,
We are using Oracle Forms 10g in windows XP and having OAS 10g and Oracle database 9i.
How can we import data from SQL Server 2005 into Oracle tables using Oracle Forms?
Thanks & Regards
EidyI have no idea what "Oracle Hetrogenius Services" is, so I can't help you with that, sorry.
SQL Developer might also assist you. SQL Developer can connect to SQL Server as well as Oracle and has some tools for migration. See the documentation for details:
http://download.oracle.com/docs/cd/E12151_01/doc.150/e12156/toc.htm
For additional help on using SQL Developer for this task, please consult Support or the SQL Developer forum: SQL Developer
Hope this helps,
Jacob -
Import data from SQL Server to Oracle
I have created a dblink in oracle to access the SQL database. I am able to run queries through the dblink and it works fine. I have created a test table on Oracle Server to import the data. The field named "description" has CLOB data type. The corresponding datatype on SQL Server is varchar(7000).
When I insert the data from SQL Server, it completes successfully without any error but it truncates the data on CLOB field.
If I run the select query in SQLPlus I can see the entire description.
Select "description" from sql_view@dblink;
-- the above works fine.
CREATE table test
(description CLOB);
INSERT INTO TEST
Select "description" from sql_view@dblink;
-- this works but it truncates the data after 256 characters
My question is, how to get the data from SQL Server without truncating characters.
Thanks in advance,
GopalI hear the same from other friend that sql server truncated the leading zeros from the id column.
I really don't have a solution for this but you can try the work around. Export the data to flat file and upload in oracle using SQL loader, as this would be much faster and efficient. -
How to select data from Sql server 2005 database tableinto oracle database table
Hi,
I have table text1 in sql server database and text2 in oracle database (11g). Now how to move data from SQL Server table into oracle table. So please help me how to do it.
Thanks a lot in advance.
rk
OS: Windows 7 professionalHi,
you can use export/import wizard and specify sql server as a source and oracle as destination.
I hope this is helpful.
Please Mark it as Answered if it answered your question
OR mark it as Helpful if it help you to solve your problem
Elmozamil Elamir Hamid
MCSE Data Platform
MCITP: SQL Server 2008 Administration/Development
MCSA SQL Server 2012
MCTS: SQL Server Administration/Development
MyBlog -
How to import data from SQL server to Oracle?
Dear Sir/Madam,
I want to move database data from SQL Server to Oracle, but don't how to do it, will you please help me do it?Oracle Migration Workbench is your best bet:
http://www.oracle.com/technology/tech/migration/workbench/index.html
Cheers, OTN -
How to retrieve multiple data from table and represent it in jsp page
Hi
The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
<html> function addRow()
i++;
var newRow = document.all("tblGrid").insertRow();
var oCell = newRow.insertCell();
oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
// oCell = newRow.insertCell();
// oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
}<html> Then this data are send to the next Servlet for adding into two table.
My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
Rows added into jsp page.
Here is an code for that logic.
<html>
ArrayList<String> mucode = new ArrayList<String>();
ArrayList<Integer> serials = new ArrayList<Integer>();
ArrayList<Integer> apxrate = new ArrayList<Integer>();
ArrayList<Integer> srname = new ArrayList<Integer>();
ArrayList<String> itcode = new ArrayList<String>();
ArrayList<String> itname = new ArrayList<String>();
ArrayList<Integer> iqnty = new ArrayList<Integer>();
ArrayList<String> iuom = new ArrayList<String>();
ArrayList<Integer> pqnty = new ArrayList<Integer>();
ArrayList<String> puom1 = new ArrayList<String>();
ArrayList<Integer> arate = new ArrayList<Integer>();
ArrayList<String> rdate = new ArrayList<String>();
ArrayList<String> bcs = new ArrayList<String>();
ArrayList<String> ccs = new ArrayList<String>();
ArrayList<String> remarkss = new ArrayList<String>();
//ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
//ArrayList<String> dors = new ArrayList<String>();
//ArrayList<String> remarks = new ArrayList<String>();
String entryn = request.getParameter("entryno");
String rows = request.getParameter("rows");
out.println(rows);
//String Entryno = request.getParameter("entryno");
// out.println(Entryno);
int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
if(!Entryno.equals("")){
entryno = Integer.valueOf(Entryno);
if(!rows.equals("")){
rowcount = Integer.valueOf(rows);
for(int i=1;i<=rowcount;i++){
if(request.getParameter("srno"+i)!=null){
serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
out.println(serials.size());
for(int i=1;i<=rowcount;i++){
if(request.getParameter("srno"+i)!=null){
srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
out.println(srname.get(0));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("itmcd"+i)!=null){
itcode.add(request.getParameter("itmcd"+i).trim());
} //out.println(itcode.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("itmnm"+i)!=null){
itname.add(request.getParameter("itmnm"+i).trim());
}//out.println(itname.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("indentqty"+i)!=null){
iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("uom"+i)!=null){
iuom.add(request.getParameter("uom"+i).trim());
}//out.println(iuom.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("mcode"+i)!=null){
mucode.add(request.getParameter("mcode"+i).trim());
for(int i=1;i<=rowcount;i++){
if(request.getParameter("packqty"+i).equals("")){
pqnty.add(0);
}else
pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("pack"+i)!=null){
puom1.add(request.getParameter("pack"+i).trim());
}else
puom1.add("");
for(int i=1;i<=rowcount;i++){
if(request.getParameter("rate"+i).equals("")){
arate.add(0);
}else
arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
/* for(int i=1;i<=rowcount;i++){
if(request.getParameter("rate"+i)!=null){
arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("dor"+i)!=null){
try{
rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
}catch(ParseException p){p.printStackTrace();}
}else
{ rdate.add("");}
for(int i=1;i<=rowcount;i++){
if(request.getParameter("bcc"+i)!=null){
bcs.add(request.getParameter("bcc"+i).trim());
}out.println(bcs.get(0));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("ccc"+i)!=null){
ccs.add(request.getParameter("ccc"+i).trim());
}out.println(ccs.get(0));
for(int i=1;i<=rowcount;i++){
out.println("remark2");
if(request.getParameter("remark2"+i)!=null){
remarkss.add(request.getParameter("remark2"+i).trim());
}out.println(remarkss.get(0));
ArrayList<String> Idate = new ArrayList<String>();
for(int i=1;i<=rowcount;i++){
if(request.getParameter("dateindent"+i)!=null){
try{
Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
}catch(ParseException p){p.printStackTrace();}
String Rdate = dashdate.format(new java.util.Date());
String tdate = dashdate.format(new java.util.Date());
// String Indentdate = dashdate.format(new java.util.Date());
// String ApprovedT1 = dashdate.format(new java.util.Date());
// String ApprovedT2 = dashdate.format(new java.util.Date());
// String ApprovedT1=" ";
//String ApprovedT2="";*/
String ApprovedT1= dashdate.format(new java.util.Date());
out.println (ApprovedT1);
String ApprovedT2=dashdate.format(new java.util.Date());
out.println(ApprovedT2);
String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
out.println(Indentdate);
String Cocode ="BML001";
out.println(Cocode);
String Deptcode = request.getParameter("dept1");
out.println(Deptcode);
String Empcode = request.getParameter("emp");
out.println(Empcode);
String Refno =request.getParameter("rtype");
out.println(Refno);
String Divcode = request.getParameter("todiv1");
out.println(Divcode);
String Usercode = "CIRIUS";
String Whcode = request.getParameter("stor");
out.println(Whcode);
// String Itemgroupcode = request.getParameter("");
String Itemgroupcode ="120000";
out.println(Itemgroupcode);
String Supplytypecode = request.getParameter("stype");
out.println(Supplytypecode);
String Delcode = request.getParameter("deliverycode");
out.println(Delcode);
String Itemclass="WS";
out.println(Itemclass);
// String Itemclass = request.getParameter("iclass");
// out.println(Itemclass);
String unitcode = request.getParameter("uni");
out.println(unitcode);
String Todivcode = request.getParameter("todiv1");
out.println(Todivcode);
String Appxrate = request.getParameter("rate");
out.println(Appxrate);
String Srno = request.getParameter("srno");
out.println(Srno);
/* String Indqty = request.getParameter("indentqty");
out.println(Indqty);*/
String Itemcode = request.getParameter("itmcd");
out.println(Itemcode);
String Othersp = request.getParameter("remark1");
out.println(Othersp);
String Reqdt = request.getParameter("dor");
out.println(Reqdt);
String Munitcode = request.getParameter("mcode");
out.println(Munitcode);
String Packqty = request.getParameter("packqty");
out.println(Packqty);
String Packuom = request.getParameter("pack");
out.println(Packuom);
String Remark2 = request.getParameter("remark2");
out.println(Remark2);
String BC = request.getParameter("bcc");
out.println(BC);
String CC = request.getParameter("ccc");
out.println(CC);
try{
st=connection.createStatement();
connection.setAutoCommit(false);
String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
out.println(sql);
st.addBatch(sql);
for(int i=0;i<serials.size();i++){
out.println("Inside the Statement");
String query3="test query for u";
out.println(query3);
String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
out.println(queryx);
st.addBatch(queryx);
int[] result=st.executeBatch();
connection.commit();
for(int k=0;k<result.length;k++)
out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
catch(BatchUpdateException bue)
out.println("error1;"+bue+"");
catch(SQLException sql)
out.println("error2;"+sql+"");
catch(Exception l)
out.println("error3;"+l+"");
</html>
Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
I have able to show the data in Header portions of page in this ways
here i am adding the part of code which shows the data from header part of table i.e from Header table
<html>
<h2 align="center"><b>Indent Preparation</b></h2>
<div align="left">
<table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
<tr>
<td ><div align="left"><b>Indent No.</b></div></td>
<td ><label>
<input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
</label></td>
<td ><div align="center"><strong>Indent Date</strong></div></td>
<td ><label>
<div align="center">
<input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
</div>
</label></td>
<td> </td>
<td><div align="right"><strong>Entry No.</strong></div></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
<%}else{%>
<td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
<%}%>
<div align="right"></div>
</tr>
<tr>
<td><b>Division</b></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
<td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
<%}else{%>
<td><input type="text" name="div" id="div" /></td>
<td><input type="hidden" name="div1" id="div1" /> </td>
<%}%>
<td> </td>
<td> </td>
<td><div align="right"><strong>Unit</strong></div></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
<td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
<%}else{%>
<td><input type="text" name="unit" id="unit" /></td>
<td><input type="hidden" name="uni" id="uni" /> </td>
<%}%>
</tr>
<tr>
</html>
Any suggestion on any above works is highly appreciated.
Thanks and regards
harshalToo much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
I will only answer the question in the thread's subject:
How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
To display, make use of JSTL's c:forEach. -
Extract the data from SQL Server and Import into Oracle
Hi,
I would like to run a daily job that will export the table data from SQL server table (it will be only one or two table) and Import back into Oracle table (it might one or two table tables).
Could you please guide me that how can i do this using either sql server or oracle?
We have oracle 9.2 and sql server 2005.
Normally i do from flat file which is generated by source destination nand i dump into oracle using sql*loader but this time I have to directly extract/export the data from MS Sql server and load into Oracle table, mostly it will reload so i might doing any massaging data during the load.
If you show me the detail approach, it will be really appreciated.
I have access to Sql server but i don't how to use sql server to do this or using oracle as a daily job even becuase have to schedule the job for this as it will be a daily job.
Thanks,
poratipsUnless you can find an open source ODBC driver for SQL Server that runs on Solaris (and I wouldn't be overly hopeful there) Heterogeneous Services would require that you license something-- a third party ODBC driver, a new Oracle instance, or an Oracle Transparent Gateway.
As I stated below, you could certainly use SQL Server's ETL tool, DTS. Oracle's ETL tools would require additional licensing since you're just on 9.2. You could also write a small application (Java or otherwise) that connected to both databases and transferred the data. If you're particularly enterprising, you could load the SQL Server Type 4 JDBC driver into Oracle's JVM and write a Java stored procedure that connected to the SQL Server database via JDBC, but that's a pretty convoluted approach.
Justin -
Loading data from SQL server 2000 to Oracle using OWB 10.2
Hi All,
I have to move data from SQL server to Oracle using OWB. Any idea how to connect to SQL Server thru the OWB design centre console. There is no detail available in the documentation. OWB cocumentation says that "OWB Integrator for Oracle DB & Apps 3.0" is available to connect to Non-Oracle Database (including Sybase, Informix, ODBC).Hi,
yes, you can use ODBC and configure HSODBC on the database server to create a database link to the sql-server. If your oracle server is microsoft based you are ready, otherwise you have to buy an odbc-driver for linux, unix or whatever you use.
Ciao Stephan -
Best way to push change data from sql server to windows/web application
i apologized that i do not know should i ask this question in this forum or not.
i have win apps which will load all data initially from db and display through grid but from the next time when any data will change in db or any data will be inserted newly in db then only change or newly inserted data need to be pushed from db side to
my win apps. now only sql dependency class is coming to my mind but there is a problem regarding sql dependency class that it notify client but do not say which data is updated or inserted.
so i am looking for best guidance and easy way to achieve my task. what will be the best way to push data from sql server to win or web client.
there is two issue
1) how to determine data change or data insert. i guess that can be handle by trigger
2) next tough part is how very easily push those data from sql server end to win apps end.
so looking for expert guide. thanksHello,
Yes, you can create DML trigger on INSERT and UPDATE to get the changed data into a temp table. And then query the temp table from application.
If you are use SQL Server 2008 or later version, you can also try to use
Change data capture, which
can track insert, update, and delete activity that is applied to a SQL Server table and store the changed values on the Change Table.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
Copy the data from Sql Server to edirectory using java
Hi ,
I am new to e directory.I don't know how it works.Can some one assist
me on this ,I have to extract data from SQL Server and update these
data in edirectory.This is needs to be done using java.
If any one can provide me the sample code or please suggest how to
proceed .
Thanks in advance
dukewarm
dukewarm's Profile: http://forums.novell.com/member.php?userid=53430
View this thread: http://forums.novell.com/showthread.php?t=373051dukewarm;1792481 Wrote:
> Hi ,
>
> I am new to e directory.I don't know how it works.Can some one assist
> me on this ,I have to extract data from SQL Server and update these
> data in edirectory.This is needs to be done using java.
>
> If any one can provide me the sample code or please suggest how to
> proceed .
>
> Thanks in advance
Read the values from SQL server and use LDAP to update the data in
eDirectory.
Thomas
thsundel
thsundel's Profile: http://forums.novell.com/member.php?userid=128
View this thread: http://forums.novell.com/showthread.php?t=373051
Maybe you are looking for
-
Complex structures in Sender File adapter
Hi Experts I am working on XI 3.0 SP 22. How do we handle the complex structures in sender file adapter in file content conversion. Please help me out. Regards Hari
-
Error while Loading the validator-rules.xml in Struts 1.2
Hello Guys, I am trying to use the Struts 1.2.4 on Jdk1.3 inside WSAD5.1 and i get the following error when loading the application. It breaks on the fist line inside validator-rules.xml witht hte following error. My first line in the validator-rules
-
Im stuck with this message "no bootable device, insert boot disk and press any key". Now i want to go back to mac os but everytime i turn on my laptop that message appear..kindly help... Please .... Im using my usb as bootable device but it cant be d
-
Firefox Reader plugin and PDF highlighting
Hi everyone, I'm using javascript from a browser to highlight words inside of PDFs using the browser plugin, like so: var pdfEmbed = popup.document.embeds[0]; pdfEmbed.setCurrentPage(page); pdfEmbed.setViewScroll("FitH", offset); pdfEmbed
-
IPAD2 - When i update my apps i get error message 1004.
IPAD2 - When i update my apps i get error message 1004. OS is actually 4.3.5. Still get error when i connect thru pc. I have powered off and retried - still fails to update