How to insert bulk data into ms-access
Hi,
I am trying to insert bulk data into ms-access. I used Statement it is
working fine but not allowing to insert single quote. Then I tryed with
PreparedStatement which is allowing single quote but not allowing bulk data. The following error i am getting.
javax.servlet.ServletException: [Microsoft][ODBC Microsoft Access Driver]String data, right truncated (null)
please help me..
guru
have u tried out the memo datatype in access?
Similar Messages
-
How to insert Legacy data into QP_RLTD_MODIFIERS table?
How to insert Legacy data into QP_RLTD_MODIFIERS table in R12 instance.
I would use the API QP_Modifiers_PUB.Process_Modifiers for pushing legacy pricing data into R12. QP_RLTD_MODIFIERS is only used for certain types of discounts (in my prod environnment, only promos have data in this table).
-
How to insert/Update date into Dictionary Table?
Dear Experts,
I have created a Dictionary Project and Deployed.I think the table had created in portal database.
now i want to insert some data into that table?
Can you plz tell me how to access the table using Abstract Portal Component using DynPage.
Waiting for ur replies...
Thanks and Regards,
Visweswar.Hi
Can u share the Logic??? -
How to insert chinese data into MS SQL Server 2000 through JDBC
I am trying to insert chinese data into MS SQL server 2000 using JDBC. how to do this?
can anybody help me.
thanx.I am trying to insert chinese data into MS SQL server 2000 using JDBC. how to do this?
can anybody help me.
thanx. -
How to insert text data into temp tables....
Dear All,
I have one notepad with three columns, first column is segment1, second column is segment2 & third column is price list....
and there is no delimiter and exact spaces..(i.e, zizak fomat)
Ex:-
xx yy 00009999
kk mmmm 00009333
Data is available like above example...So, I need to insert this data into one table.(2LAKSHS OF RECORDS AVAILABLE IN THAT NOTEPAD)
So, Any can one help me, how to insert this kind of text data into temparory table...
Regards
Krishna
Edited by: user12070109 on May 29, 2010 9:48 PM
Edited by: user12070109 on May 29, 2010 9:49 PMHello,
What manu suggested this can be done through oracle forms.
If as i read your last post you are using that in database it will not work in db. Try to use the same process in oracle forms will work by making some changes.
And if you don't want to use forms then there is one way using SQL LOADER. It required control file to execute for uploading data.
See the below link.
http://www.orafaq.com/wiki/SQL*Loader_FAQ
In this example its showing filename.csv you can use your file name like yourfilename.txt.
So your control file will look like this...
load data
infile 'file_path\file_name.txt'
into table table_name -- use actual table name where you want to upload data
fields terminated by " " -- Here using spaces as you mentioned
(column1, column2, column3) -- Here use the three column names of tableAnd after creating control file with the above code. You can call it in command prompt like this
sqlldr username/password control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
or
sqlldr username/password@dbconnection control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
Before doing this practice make sure SQLLDR.exe availabe in the machine where you have to execute. Otherwise you will have to install db client for using sqlldr.exe
-Ammad -
How to insert static data into ADF Table
Hi
I have a requirement , As a part of development of my prototype. I have to populate some static data into table.How to achieve this without using any java is there any way to simply hard code the values into adf table rows.?
Thanks in advancehttp://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/devguide/table.html
http://otndnld.oracle.co.jp/document/products/as10g/101300/B25221_03/web.1013/b25386/web_MasterDetail006.htm
http://andrejusb.blogspot.com/2006/12/displaying-all-columns-in-adf-table.html -
hi ,
here the description about my question.
1)i am working on windows workflow,we need to implement approval process for my project.
2)we have multiple approvers for one request,requester,created object information.
3)now i want to insert and retrieve, created instance information from windows workflow
database.with all following details
i)Workflow instaceId,
ii)current state of work flow(idle,complete,pending)
iii)approvers information.
iv)requester information.
v)created object information.
here some of the links, which i am trying for solution:
https://wf.codeplex.com/wikipage?title=Tracking%20states%20with%20WorkflowApplication[^]
https://msdn.microsoft.com/en-us/library/ee622977(v=vs.110).aspx[^]
please answer to my question. if you want to send any examples send me to my email address.
[email protected]Hi,
According to your description, it seems that your main issue is about customID paramerter in workflow approval prcess.
About this, please refer to the two samples:
http://blog.petegoo.com/2010/08/22/workflow-4-email-approval-sample/
http://cgeers.com/2010/04/10/windows-workflow-in-asp-net/
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
If Both tables having References then how to insert the data each other
Hai EveryOne..,
My Sample data.,
Create table emp (empno number primary key,ename varchar2(20));
Create table emp_dup (empno number references emp(empno),ename varchar2(20) primary key);
alter table emp add constraint ename_fk foreign key(ename) references emp(ename);
My Question is How to insert the data into these two tables?
Its a *"Circular Reference"* Concept.
Please ...
Thank You!!You need to set the DEFERRED clause of the constraint when you create your foreign key as DEFERRABLE by which you can move the constraint validation at transaction level.
In an interview point of view that could be a reasonable answer. But in real time this could be strongly questionable.
Here is an example
SQL> create table emp1 (empno number, ename varchar2(10))
2 /
Table created.
SQL> create table emp2 (empno number, ename varchar2(10))
2 /
Table created. Define Primary Key for two tables
SQL> alter table emp1 add constraint emp1_pk primary key (empno)
2 /
Table altered.
SQL> alter table emp2 add constraint emp2_pk primary key (ename)
2 /
Table altered. Add foreign key for two tables with DEFERRED clause set as DEFERRABLE
SQL> alter table emp1 add constraint emp1_fk foreign key (ename) references emp2(ename) initially deferred deferrable
2 /
Table altered.
SQL> alter table emp2 add constraint emp2_fk foreign key (empno) references emp1(empno) initially deferred deferrable
2 /
Table altered. Now here is the test case
SQL> insert into emp1 values (1, 'karthick')
2 /
1 row created.
SQL> commit
2 /
commit
ERROR at line 1:
ORA-02091: transaction rolled back
ORA-02291: integrity constraint (ARBORU.EMP1_FK) violated - parent key not found So the validation is done at Transaction level. Now let insert the value into both tables.
SQL> insert into emp1 values (1, 'karthick')
2 /
1 row created.
SQL> insert into emp2 values (1, 'karthick')
2 /
1 row created.
SQL> commit
2 /
Commit complete. -
How to insert date into ms access database using sql query in servlet
sir all thing is working well now only tell me how we can insert date into ms access database which is input by user .
insert into db2(bookname,studentname,date) values('"+bname+"','"+sname+"',date_format)";{code}
or either the system date is inserted with query .
plz help me
thanxbhavishya wrote:
sir all thing is working well now only tell me how we can insert date into ms access database which is input by user .
insert into db2(bookname,studentname,date) values('"+bname+"','"+sname+"',date_format)";{code}
or either the system date is inserted with query .
plz help me
thanxAnd that SQL statement is another reason to use PreparedStatement. I assume bname and sname are input from some form? Well, if that's the case, simply inserting them into SQL by simple String concatenation is just begging for all sorts of problems. What if there is an apostrophe in the entry? Broken Statement. Worse, it's a wide open invitation to an SQL Injection attack. -
I can insert data into an access database, now I need to do some simple querries such as selecting all records that are greater than a certain value or = a certain value. How can I return only the selected records?
If you don't want to spend any money, then instead of ActiveX, I would recomend LabSQL from Jeffrey Travis. I use it instead of the Connectivity toolkit and have had no problems. Besides being free, you have the advantage of being able to use it with any database. ActiveX ties you to Access and you upgrade your version of Access and find the properties and methods are different, you've got a lot of reprogramming to do.
-
How can i open a DOC or TXT file and insert the data into table?
How can i open a DOC or TXT file and insert the data into table?
I have a doc file . the doc include some columns and some rows.(for example 'ID,Name,Date,...').
I'd like open DOC file and I'd like insert them into the table with same columns.
Thanks.Use the SQL*Loader utility or the UTL_FILE package.
-
SQL Loader-How to insert -ve & date values from flat text file into coloumn
Question: How to insert -ve & date values from flat text file into coloumns in a table.
Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
How to load such values in columns of database using SQL Loader?
Please guide.Question: How to insert -ve & date values from flat text file into coloumns in a table.
Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
How to load such values in columns of database using SQL Loader?
Please guide. Try something like
someDate DATE 'DDMMYYYY'
someNumber1 "TO_NUMBER ('s99999999.00')"
someNumber2 "TO_NUMBER ('99999999.00s')"Good luck,
Eric Kamradt -
Proxy creation/ access key in the how to guide "push data into BW from XI"
Hi !
I'm experiencing troubles with a step of the how to guide "push Data into BW from XI".
When i want to create the proxy in the BW system (step 10), i'm asked for an access key for the object R3TR CLAS CL_<name of the prefix>_<name of message interface>
I think that access keys are needed when an object has to be modified. Do I really have to modify this SAP object ? I don't really feel like destroying the whole system...
Thanks in advance !Hi Benjamin,
you are not destroying anything in the system. Since you generating a class for the implementation of the proxy within the SAP name space, you are asked for the access key (you can register developers and objects via the OSS).
The system behavior depends on the setting of the system, whether changes are are recorded, etc..
Ask your basis administrator, who should be able to assist you.
Cheers
Andreas -
How to insert test data of 10,000 records into emp table
Hi I'm new to oracle can anyone please help me in writing a program so that i can insert test data into emp table
Hi,
user11202607 wrote:
thanks sanjay , frank . But how can i insert only 4 deptno's randomly and how can i insert only 10 managers randomly ,
Sorry to pull Your legs and thanks for bearing my question. I want to insert into emp table where it has the empno, ename, sal, job, hiredate, mgr and deptnoThis should give you some ideas:
INSERT INTO emp (empno, ename, sal, job, hiredate, mgr, deptno)
SELECT LEVEL -- empno
, dbms_random.string ('U', 4) -- ename
, ROUND ( dbms_random.value (100, 5000)
, -2
) -- sal
, CASE
WHEN LEVEL = 1 THEN 'PRESIDENT'
WHEN LEVEL <= 4 THEN 'MANAGER' -- Change to 11 after testing
WHEN dbms_random.value < .5 THEN 'ANALYST'
WHEN dbms_random.value < .5 THEN 'CLERK'
ELSE 'SALESMAN'
END -- job
, TRUNC ( SYSDATE
- dbms_random.value (0, 3650)
) -- hiredate
, CASE
WHEN LEVEL > 1
THEN TRUNC (dbms_random.value (1, LEVEL))
END -- mgr
, TRUNC (dbms_random.value (1, 5)) -- deptno
FROM dual
CONNECT BY LEVEL <= 10 -- Change to 10000 after testing
;The interesting part (to me, at least) is mgr. What I've done above is guarantee that the mgr-empno relationship reflects a tree, with the 'PRESIDENT' at its sole root. The tree can be any number of levels deep.
Sample results:
EMPNO ENAME SAL JOB HIREDATE MGR DEPTNO
1 GDMT 2800 PRESIDENT 30-AUG-04 2
2 CVQX 400 MANAGER 24-MAY-06 1 2
3 QXJD 1300 MANAGER 17-JUN-05 1 4
4 LWCK 4800 MANAGER 15-JUN-06 2 2
5 VDKI 3700 CLERK 08-SEP-01 4 2
6 FKZS 2600 CLERK 18-DEC-06 4 1
7 SAKB 700 ANALYST 30-JUN-00 5 4
8 DVYY 300 ANALYST 22-SEP-01 2 1
9 CLEO 2700 ANALYST 27-MAY-08 5 4
10 RDVQ 3400 ANALYST 14-DEC-08 5 4For details on the built-in packages (such as dbms_random) see the [Parckages and Types manual|http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_random.htm#i998925]. -
How to insert the data from XML to a table
Hi,
I'm using Oracle 10g Express Edition
I need help in How to insert the data from XML file into the table.
Below is the example i'm working on..
I have create ridb user with below mentioned privileges:
Account Status Locked Unlocked
Default Tablespace: USERS
Temporary Tablespace: TEMP
User Privileges :
Roles:
CONNECT
RESOURCE
Direct Grant System Privileges:
CREATE DATABASE LINK
CREATE MATERIALIZED VIEW
CREATE PROCEDURE
CREATE PUBLIC SYNONYM
CREATE ROLE
CREATE SEQUENCE
CREATE SYNONYM
CREATE TABLE
CREATE TRIGGER
CREATE TYPE
CREATE VIEW
& table is created TRIALZIPCODES below mentioned is the DDL:
CREATE TABLE TRIALZIPCODES
STATE_ABBR VARCHAR2(20) NOT NULL
, ZIP_CODE NUMBER(10, 0) NOT NULL
, ZIP_CODE_EXT VARCHAR2(20)
Below is the XML FILE: which is stored in C:\OracleProject Folder
File name: trial.xml
<?xml version="1.0" ?>
<metadata>
- <Zipcodes>
- <mappings Record="4">
<STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
<ZIPCODE>94301</ZIPCODE>
</mappings>
- <mappings Record="5">
<STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
<ZIPCODE>80323</ZIPCODE>
<ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
</mappings>
</Zipcodes>
</metadata>
PL/SQL Procedure:which i'm trying to execute from SQLDeveloper
create or replace
PROCEDURE TRIAL AS
BEGIN
DECLARE
-- declare attributes
charString varchar2(80);
finalStr varchar2(4000) := null;
rowsp integer;
v_FileHandle UTL_FILE.FILE_TYPE;
l_context_handle dbms_xmlgen.ctxHandle;
insCtx DBMS_XMLStore.ctxType;
begin
-- DBMS_XMLGEN.setRowTag ( ctx IN ctxHandle, rowTag IN VARCHAR2);
-- DBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2);
-- the name of the table as specified in our DTD
DBMS_XMLGEN.SETROWSETTAG(l_context_handle,'zipcodes');
-- the name of the data set as specified in our DTD
DBMS_xmlgen.setRowTag(l_context_handle,'mappings');
-- for getting the output on the screen
dbms_output.enable(1000000);
-- open the XML document in read only mode
v_FileHandle := utl_file.fopen('c:/OracleProject','trial.xml', 'r');
loop
BEGIN
utl_file.get_line(v_FileHandle, charString);
exception
when no_data_found then
utl_file.fclose(v_FileHandle);
exit;
END;
dbms_output.put_line(charString);
if finalStr is not null then
finalStr := finalStr || charString;
else
finalStr := charString;
end if;
end loop;
-- for inserting the XML data into the table
insCtx := DBMS_XMLSTORE.NEWCONTEXT('RIDB.TRIALZIPCODES');
insCtx := DBMS_XMLSTORE.INSERTXML(insCtx, finalStr);
dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
DBMS_XMLStore.closeContext(insCtx);
END;
END TRIAL;
For the first time when i complied i got the errors as :
Procedure RIDB.PROCEDURE1@RIDB
Error(16,14): PLS-00201: identifier 'UTL_FILE' must be declared
Error(16,14): PL/SQL: Item ignored
Error(29,1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
Error(29,1): PL/SQL: Statement ignored
Error(33,1): PL/SQL: Statement ignored
Error(33,19): PLS-00320: the declaration of the type of this expression is incomplete or malformed
Error(36,1): PL/SQL: Statement ignored
Error(36,17): PLS-00320: the declaration of the type of this expression is incomplete or malformed
So i logged in as sys & grant the permission to execute on UTL_FILE to ridb (user):
SQL Statement:
grant execute on utl_file to ridb
So, it got compiled successfully but when i execute it gives me error as:
Source does not have a runnable target.
What does this mean?
So I browse through forum & i got to know that i need to initial the UTL_FILE_DIR ="C:/OracleProject" in init.ora
So can i edit the init.ora with notepad.When i tried to do that it says permission denied
In my system it shows the init.ora file in path C:\oraclexe\app\oracle\product\10.2.0\server\config\scripts
but there is also other file initXETemp in the same path do i need to do the changes in it.
I have tried even editing the SPFILE as mentioned below:
C:\oraclexe\app\oracle\product\10.2.0\server\dbs\SPFILEEXE - I had edit this file using notepad & set the value of UTL_FILE_DIR ="C:/OracleProject". So next time when i restarted i'm unable to log on to the database.
So i had reinstall the software again.
Could you please let me know how to proceed..hi,
I have created the directory from sys database
CREATE or replace DIRECTORY XML_DIR2 AS 'C:\OracleProject';
& grant read,write access to the user
grant read,write on directory XML_DIR2 to RIDB;
& i had change the tag name in the xml file as shown below:
<?xml version = '1.0'?>
<metadata>
<Zipcodes>
<mappings Record="4">
<STABBRE>CA</STABBRE>
<ZIPCODE>94301</ZIPCODE>
</mappings>
<mappings Record="5">
<STABBRE>CO</STABBRE>
<ZIPCODE>80323</ZIPCODE>
<ZIPCODEEXT>9277</ZIPCODEEXT>
</mappings>
</Zipcodes>
</metadata>
TRIALZIPCODE table as shown below:
CREATE TABLE "RIDB"."TRIALZIPCODE"
( "STABBRE" VARCHAR2(20 BYTE),
"ZIPCODE" NUMBER(*,6) NOT NULL ENABLE,
"ZIPCODEEXT" NUMBER
) 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" ;
I have tried two methods as shown below:
Procedure 1:
create or replace
PROCEDURE TRIAL_V2 AS
BEGIN
DECLARE
-- declare attributes
charString varchar2(80);
finalStr varchar2(4000) := null;
rowsp integer;
v_FileHandle UTL_FILE.FILE_TYPE;
l_context_handle dbms_xmlgen.ctxHandle;
insCtx DBMS_XMLStore.ctxType;
cnt NUMBER;
xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
--XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
BEGIN
insCtx := DBMS_XMLStore.newContext('DEV.TRIALZIPCODES');
DBMS_XMLStore.setUpdateColumn(insCtx, 'STABBRE');
DBMS_XMLStore.setUpdateColumn(insCtx, 'ZIPCODE');
DBMS_XMLStore.setUpdatecolumn(insCtx, 'ZIPCODEEXT');
DBMS_XMLStore.setRowTag(insCtx, 'mappings');
cnt := DBMS_XMLStore.insertXML(insCtx, xmldoc);
DBMS_XMLStore.closeContext(insCtx);
END;
Procedure 1 was compiled with out errors but when i execute i got the error as :
Source does not have a runnable target.
Procedure 2_
CREATE OR REPLACE PROCEDURE TRIAL_V3 AS
BEGIN
DECLARE
-- declare attributes
charString varchar2(80);
finalStr varchar2(4000) := null;
rowsp integer;
v_FileHandle UTL_FILE.FILE_TYPE;
l_context_handle dbms_xmlgen.ctxHandle;
insCtx DBMS_XMLStore.ctxType;
cnt NUMBER;
xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
--XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
BEGIN
INSERT INTO trialzipcode (STABBRE, ZIPCODE, ZIPCODEEXT)
SELECT extractvalue(x.column_value, 'mappings/STABBRE'),
extractvalue(x.column_value, 'mappings/ZIPCODE'),
extractvalue(x.column_value, 'mappings/ZIPCODEEXT')
FROM TABLE(
XMLSequence(
EXTRACT(
xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') ),
'metadata/Zipcodes/mappings'
) x
END;
END TRIAL_V3;
Procedure 2 was complied without errors but when i execute i got the error as:
Connecting to the database RIDB.
ORA-22288: file or LOB operation FILEOPEN failed
The system cannot find the file specified.
ORA-06512: at "SYS.DBMS_LOB", line 523
ORA-06512: at "SYS.XMLTYPE", line 287
ORA-06512: at "RIDB.TRIAL_V3", line 12
ORA-06512: at line 2
Process exited.
Disconnecting from the database RIDB.
Could you please let me know how to proceed...
Maybe you are looking for
-
Why does my iphone randomly delete new contacts
Over the last month I have noticed that some, maybe all...of the contacts that I have recently added to my address book have disappeared. I know that I entered them into my phone. I could even see where the name showed up on my recent's list. Howe
-
How to retrive the Direct purchase entries from table level? S_ALR_87012050
Hi All In our current project we need to retrieve the direct purchase report from table level. Can you please provide me the direct purchase related table? Normally we are executing the standard report S_ALR_87012050 to extract the direct purchase en
-
SAPGlobal software component in ESR
Hi all, I have a CE 7.1 SP4 installation + ESR. I have tried to find the SAPGlobal software component in my SLD but it is not there. Should I not have it there or there is some mistake? Best regards, v s
-
Form to interact with Third party tool
Hello All I an working with Forms 10g. I want my form to interact third party tool which is installed on the client's machine. My aim is to use the form to pass search criteria to the third party tool and display the results on the form. Is it possib
-
Lat & longitude coordinates in flash map?
Currently, I have a map of the united states, where each state is a button that jumps to another page when you click on it. I also have a list of customers and the (town, STATE) where they are located. I would really like to be able to have flash coo