Oracle Xe INSERT?
Nov 30, 2006
I am having trouble running a simple insert query in xe.
INSERT INTO UTHEMANG.CLIENT (F_NAME, L_NAME, STREET_ADDR, CITY, STATE_PROV, ZIP_PC, PHONE_NBR, E-MAIL, PASSWORD) VALUES ( 'John' , 'Doe' , NULL , NULL , NULL , NULL , NULL , 'someone@hotmail.com', '12345' );
I receive the following error message.
ORA-00917: missing comma
I can enter data via the point and click interface, but not at the SQL command.
View 2 Replies
ADVERTISEMENT
May 15, 2010
how to insert data in oracle table without writing insert statement in oracle 9i or above. i am not going to write insert all, merge, sqlloder and import data.
View 2 Replies
View Related
Oct 22, 2012
My following script worked to insert rows in Oracle SQL -
INSERT ALL
INTO EASY_DRINKS (DRINK_NAME, MAIN, AMOUNT1, SECOND, AMOUNT2, DIRECTIONS) VALUES ('Kiss on the Lips', 'cherry juice', 2, 'apricot nectar', 7, 'serve over ice with straw')
INTO EASY_DRINKS (DRINK_NAME, MAIN, AMOUNT1, SECOND, AMOUNT2, DIRECTIONS) VALUES ('Hot Gold', 'peach nectar', 3, 'orange juice', 6, 'pour hot orange juice in mug and add peach nectar')
[code].......
It worked but I have a few questions.
1. Is this the best way to Insert ALL? I mean can't I just name column names once and have it work for all rows IF I'm using all columns of the table? I tried but got errors,
2. Select 1 or * FROM DUAL - Why did it work when I selected 1 and not * from DUAL?
View 7 Replies
View Related
Dec 2, 2006
I would like to find a way to do a multi row insert in Oracle similar to the examples below ... if possible.
Note that I need it to work with constant values and not values selected from (another) table (ref examples below).
In MySQL and DB2 I can do this:
insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)
values (8000,0,'Multi 8000',1),(8001,0,'Multi 8001',1)
In MSSQL, PostgreSQL, and SQLite I can do this:
insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)
select 8000,0,'Multi 8000',1 union all select 8001,0,'Multi 8001',1
View 14 Replies
View Related
Jan 22, 2012
I have declared my table and it was created with no issue. This is the code I used to declare my table...
CODECREATE TABLE STUDENT
(
Sid NUMBER(5) CONSTRAINTS STUDENT_Sid_pk PRIMARY Key,
[Code]...
Now I am trying to INSERT INTO that table, but ORACLE doesn't like ANY data that I input..
CODEINSERT INTO STUDENT VALUES
2 (100, �McClure�, �Sarah�, �M�, '144 Windridge Blvd', 'Eau Claire', 'WI', 54703, 7155559876, 'SR', 14-JUL-1979, 8891, 10);
View 2 Replies
View Related
Mar 8, 2013
how can i insert .pdf file into my oracle database.
insert statement how can i insert this pdf file into my oracle database using insert statement.
View 24 Replies
View Related
Oct 30, 2013
I need to insert about 15000 rows into a table called STOCK_ADJUST What is needed for the insert it two columns:
STM_AUTO_KEY and COST_ADJ
These two values I have in a CSV-file. Now I want to import these rows into the database... How do I do this in the most easy way? If it was just one row I would do it like this Insert into
STOCK_ADJUST (COST_ADJ, STM_AUTO_KEY) VALUES(-500, 174500)
But with 15000 rows in a CSV file this isn't going to work...
View 3 Replies
View Related
Oct 8, 2007
When I go into oracle via sql plus it won't allow me to insert data into the database.If I enter an insert statement it just crashes.No error appears and the file and edit buttons at the top disappear.
Its like it just crashes and remains like that forever until you just close the window down.What could be going wrong?orHow could I find out whats going wrong?
View 1 Replies
View Related
Mar 8, 2013
I am trying to take data from text box and list box and then insert them to Oracle database:
Text box data:
Oracle = EMPLOYEE_NAME
C# = tbEmployeeName
List box data:
Oracle = EMPLOYEE_GENDER
C# = lbEmployeeGender
Here is my code in C#, with insert statement:
string oradb = "Data Source= oraDB;User Id=sm;Password=mypassword;";
OracleConnection conn = new OracleConnection(oradb);
conn.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
[code]...
View 1 Replies
View Related
Mar 2, 2006
Here I am explaining the process of how I am trying to insert pdf file into oracle database.
create or replace directory files as 'c:/welcome/';
(physical directory is created in the system also., both in server and client machine)
Create or replace PROCEDURE procloadMetaPdf (Filename IN VARCHAR2) is
temp_blob blob:=empty_blob();
location BFILE;
Bytes_To_Load Integer:=0;
auto_Id number;
Begin
[Code]...
procudure creating successfully
but when executing
exec procloadMetaPdf('help.pdf');
displaying the following error:
ERROR at line 1:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 605
ORA-06512: at "SCOTT.PROCLOADMETAPDF", line 14
ORA-06512: at line 1
(line 14 is : DBMS_LOB.OPEN(location , DBMS_LOB.LOB_READONLY)
View 8 Replies
View Related
Oct 28, 2012
when i insert string text in hebrew i see ????????? how to fix it ?
work on Oracle 11.2 on Oracle Developer using my C# program
View 3 Replies
View Related
Apr 4, 2013
I'm using the below data base version
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.
I have created a pl sql type as object with five attributes as below.Now im trying to insert only 3 attributes with the attribute names ( As like insert into statement with column names).
Create type address_test as object (
Streetno varchar2(20),
Locality varchar2(20),
City varchar2(20),
Pin varchar2(7),
Country varchar2(20))
[code]....
Is that possible to use attribute names in the insert statement of column object type ?
View 9 Replies
View Related
Oct 30, 2006
I must create an INSERT trigger, on an Oracle table, which will do an insert into my MS-SQL 2000 DB table.
The tables are exactly the same in this case and I desire to insert the entire row that was just insterted into the Oracle table into the MS-SQL table.
I understand how to create an ODBC connection between the DB servers, I just can't seem to understand the trigger syntax.
View 2 Replies
View Related
May 10, 2013
when we have a primary key on 4 columns and we have, say 20 million rows and we want to add one extra row. How does oracle check whether the data on the primary key is unique to the record being added compared to the 20 million rows. Does it actually compare the record being added to all the rows present in the table?
View 2 Replies
View Related
Jan 22, 2012
I am creating the following two tables...no issues here:
CODECREATE TABLE COURSE_SECTION
(
Csecid NUMBER(8) CONSTRAINT COURSE_SELECTION_NUMBER_pk PRIMARY Key,
Cid NUMBER(6) NOT NULL CONSTRAINTS COURSE_SELECTION_Cid_fk REFERENCES COURSE,
Termid NUMBER(5) NOT NULL CONSTRAINTS COURSE_SELECTION_Termid_fk REFERENCES TERM,
[code]...
The issue I am having is actually inserting data into the table:
CODEINSERT INTO ENROLLMENT
VALUES (100, 1000, 'A' );
INSERT INTO ENROLLMENT
VALUES (100, 1003, 'A' );
[code]...
But I get an ORACLE error of
ORA-02291- integrity constraint (User1.ENROLLMENT_CSECID_FK) violated - parent key not foundHow can the parent key not be found when I have it declared/created in the above statement?
View 3 Replies
View Related
May 24, 2011
I have a query regarding the use of rownum inside the insert statement.
For example, I have a sample table as: sample1(aa date, bb number);
Insert
INTO sample1
VALUES (SYSDATE, ROWNUM);
this statement is working fine in Oracle 9i but gives error in Oracle 11.2.0.1. The error is ORA-976 ,
Why this error coming in Oracle 11g and how to resolve it?
Our Environment: UNIX AIX 5.3, Oracle 11.2.0.1 database
View 1 Replies
View Related
May 9, 2011
I want to insert some Chinese character in a row of my master table and also retrieve the same to display on web page along with others.
View 2 Replies
View Related
Apr 13, 2010
Is there a way in oracle 10g to know when was a row inserted or updated using oracle data dictionaries.
I know we can track these by creatig a seperate date column.
I just want to know if there is built in table which shows these.
View 2 Replies
View Related
Jun 6, 2013
oracle 11gr2
linux
how to generate insert script by using command prompt. Actually am using toad generating insert statement but it is taking too long time to generate.
View 4 Replies
View Related
Mar 22, 2011
i backup my database using PL/SQL developer and made *.dmp file
how to insert data from *.dmp file to oracle 11g using Oracle SQL Developer 2.1.1.64
and how to make *.dmp file from sql*plus ?
View 2 Replies
View Related
Mar 9, 2012
I have been requested to create an excel sheet report in my Forms application (10.1.2.0.2) with data grouped in a pie chart, something like the attached pic (if you cant open go to this link: [URL]
I'm able to create the excel sheet by using OLE2 tool, but I dont know how to insert my pie chart from code.
Attached File(s)
piechart.jpg ( 251.88K )
Number of downloads: 1
View 1 Replies
View Related
Dec 13, 2012
I have problem: I have 1 sql server already setup SQL Server 2012 Express and 1 Oracle Database server 10g. Now i want to insert data from SQL server to Oracle database through link server.
Some step i already make:
1. Setup oracle database 10g and configure listener (Finished)
2. Setup Sql server 2012 express on Windows 7 (Finished)
3. Setup ODTwithODAC1020221 on PC already setup SQL server (Finished)
4. Make Linkserver from SQL server to Oracle database (Finished), and can select data from Oracle Database on SQL server through Linkserver.
However when i insert data from SQl server to Oracle Server not success.
select * from OPENQUERY (QVHKTEST, 'SELECT * FROM QVSYSTEM')
After i run above script, result is OK
With: "QVHKTEST" is alias of Link server from SQL to Oracle server
: "QVSYSTEM" is a table on Oracle database, that table we want to get through Linkserver on SQL server
Both Server Database contain same name table is "QVSYSTEM"
-----------
INSERT OPENQUERY (QVHKTEST, 'SELECT BODY_NO,
MERCHANDISE,
MODEL_NAME,
LINE_NAME,
DATE_ENTRY
FROM QVSYSTEM')
values('VNF4619829','3227B002CA','L1068','01','2012/09/26 03:18:11');
If i run script above directly in SQL Window query can insert OK. This is code in trigger at table on SQL server:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:<Author Name: Phuong Do Minh >
-- Create date: <Create Date: 10/12/2012>
-- Description:<Description: After data insert into table qvsystem on SQL server
-- This trigger will fire and insert that data into table qvsystem
[code].......
But when i make trigger after insert on table in SQL Server to insert data From SQL server to Oracle server, however not success and SQL server raise error below:
OLE DB provider "OraOLEDB.Oracle" for linked server "QVHKTEST" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
Msg 7391, Level 16, State 2, Procedure Insert_data, Line 16
The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "QVHKTEST" was unable to begin a distributed transaction.
I don't know how to configure them.
View 8 Replies
View Related
Apr 17, 2013
I am unable to insert string of Hindi language characters with 1800 character length in column having data type VARCHAR2(4000).
I am getting error "ORA-01461: Can bind LONG value only for insert into a LONG column"
NLS parameters for database are :
PARAMETERVALUE
NLS_LANGUAGEAMERICAN
NLS_TERRITORYAMERICA
[Code]....
Is there any way to insert this string in VARCHAR2 column? I can't change data type to CLOB (with which I able to insert this string).
View 1 Replies
View Related
May 23, 2013
I have a package,
PACKAGE PK_EXCEL_TO_DB IS
TYPE tKeyValue IS RECORD (
CROUTE VARCHAR2(255),
VROUTE VARCHAR2(1000),
[code]...
Package body is
PACKAGE BODY PK_EXCEL_TO_DB IS
PROCEDURE PR_DO_INSERT(i_lData IN tDataList) IS
vcInsert VARCHAR2(3500);
BEGIN
[code]...
what i want is: 'output vcInsert to a forms-item and check the syntax of the resulting insert'. How can I do this
View 7 Replies
View Related
Mar 25, 2010
I have been trying to inset an excel spreadsheet into oracle. I can import everything fine but whenever I need to import a sheet that includes dates it does not work.
Is there a special formatting I need to do with excel(I have tried just about every date format in excel and tried matching the date style to the one in oracle and tried doing the opposite)? I have tried every step that I can possibly think of.
whenever I format the Date in the Oracle loader it gives me the Success message for the dates but still fails to load? ive also tried many format with the oracle loader.
View 5 Replies
View Related
Aug 23, 2012
i'm working in an Oracle 10g database on an IBM AIX server.
I have 3 tables (tables A, B and C).
Table A has columns -- product, rate and expiration date.
Table B has columns -- product, rate and deductible.
Table C has columns -- product, rider, gender, age and rate.
I also have a Master table which is used to store the data from Tables A, B and C via the insert statement.
I'm trying to create a dynamic SQL insert statement using a shell script to insert data from the columns in Tables A, B and C into my Master table. Master table does contains all columns from Tables A, B and C, although a column name could be spelled differently. For example, Master table contains a column named "deduct", while Table B has the same column spelled as "deductible".
I build the dynamic query using a for loop in my shell script (see below).
The problem is that i can't get the correct columns in the Master table in the dynamic SQL for the insert because depending on the table i'm selection from, the columns are different. So how do i get the correct columns in the SQL for the Master table?
Example Shell Script
--Archive_Rates.txt contains: Table A, Table B, Table C (but the next time my process runs, Archive_Rates might contain Table D, Table E and Table F -- each which have different column...but all columns are still in the Master table)
for tbl in `more Archive_Rates.txt`
do
echo 'BEGIN WORK; ' > rc1.sql
echo ' ' >> rc1.sql
echo 'insert into Master' >> rc1.sql
echo '(prod, rate, rate_exp) ' >> rc1.sql
[code].....
View 5 Replies
View Related
Dec 24, 2012
I want to insert STAT and ENDTIME values for each job in joblist into TBL_DAILY_STATUS table.
E.g. : insert into tbl_daily_status values(STAT,ENDTIME);
#!/bin/ksh
joblist="com_abc_job com_abc_dot_job com_abc_seq com_abc_det"
for i in $joblist
do
STAT=`./JobStatus.pl -i NP1 -z Z8PIMBN -p $i|awk '{print $6}'`
ENDTIME=`./JobStatus.pl -i NP1 -z Z8PIMBN -p $i|awk '{print $4" " $5}'`
echo "$STAT"
echo "$ENDTIME"
done
View 2 Replies
View Related
Feb 6, 2013
I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .
View 6 Replies
View Related
Oct 28, 2013
I wish to make this simple statement with Toad GUI
INSERT INTO EXCLUDE_xxx
VALUES ('xxx',
'xxx',
'xxx',
'xxx',
SYSDATE);
Insert record is greyed out. How to insert new rows with Toad (click click)?
View 7 Replies
View Related
Feb 27, 2012
when i tried to insert the details from oracle froms..the data inserts twice to the DB..
my table structure:
create table app_sri
(a_id integer primary key,
p_first_name varchar2(30),
p_last_name varchar2(20),
p_age number(3)
);
here a_id can be genarated through simple sequence(pid_seq)...
trigger on app_sri
create or replace trigger pid_trg
[Code]....
form insertion code..
Begin
insert into app_sri(null,'robo','Big',100);
commit
End;
the data inserted...but twice
what is the reason behind the double insertion?
View 8 Replies
View Related