[SQL * Loader] ORA-01747 on column name 'INDEX '.
Hello
I use SQL * Loader to load the test data for the CSV files. I have a column whose name is "INDEX". SQL * Loader works very well under Linux (Red Hat 6 - Client Oracle 11.2.0.1.0) but I encounter ORA-01747 launch my Workstation Windows (Oracle Server 11.2.0.1.0).
For more information, I target the same instance (Red Hat 6 - Oracle Server 11.2.0.1.0).
You have an idea how to solve the problem (without renaming the column )?
Thanks for any help you can provide.
I finally find the solution surrounding the column name with double quotes ("") within the control file. Thank you to remember the format of "protector".
Tags: Database
Similar Questions
-
ODI-1227: SrcSet0 (load) task fails on the source of ORACLE STAGING_YYY connection.
Caused by: java.sql.SQLSyntaxErrorException: ORA-01747: invalid column, table.column, or user.table.column specification
We get the above error whenever we run an ODI interface,
This interface is straight forrwad a mapping update incremental IKM Oracle, although we have identified the problem but do not know how it could be fixedSource table that contains two columns that are generally identified as the key of DB
NAME
/ / DESC
the target too has the same columns. If we disable these mappings to columns from the Active maps the interface works very well, however, with the latter, it fails. We will not be able to change the name of the column in the target because it is a table of Oracle products and has several dependencies to the breast.
Please suggest an alternative and also if our understanding is correct.
Thanks in advance.
Jay
HI Jay
change the column as DESC and put "DESC" in the name, and save it for all the source concerned target and remapping to remove the column from the interface
Thank you
P
-
Number of error SQL ORA-00904: invalid column name has occurred.
Hello
on P8.18 on a Win 2003 server when we launch SWPAUDIT, it failed with:
Number of error SQL ORA-00904: invalid column name has occurred. Query process failed.
I searched this error on metalink3. Nothing in connection with.
Any idea?
Thank you.Please give a clear picture of what you are doing... .and what paintings... There is the possibility of the audit refers to certain tables... with deleted. names of columns just look in the structure of what you audit?
Please, find the name of column...
ORA-00904: string: invalid identifier
Cause: The column name entered is invalid or missing.
Action: Enter a valid column name. A valid column name must start with a letter, must be less than or equal to 30 characters and include only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in quotation marks. It cannot be a reserved word. -
IKM Partition Oracle Exchange Error loading - ORA-14006: invalid partition name
Hello
I use ODI Standalone Edition Version 11.1.1
I've created an interface, the target table's partition.
DDL script
CREATE TABLE big_table2)
ID NUMBER (10),
CREATED_DATE DATE,
lookup_id NUMBER (10),
given VARCHAR2 (50)
)
PARTITION OF RANGE (created_date)
(PARTITION big_table_2007 VALUES LESS THAN (MAXVALUE));
the performance of the interface error: -.
Internal CZ_SC_CONSULTING jar:file:/D:/Oracle/middleware/Oracle_ODI1/oracledi/client/jdev/extensions/Oracle.ODI.Navigator.jar!/com/Sunopsis/graphical/gif/State/f_error.gif 2015-01-28 10:58:38.0 2015-01-28 10:59:08.0 30 14006 ODI-1226: step INT_EXCH_PART fails after 1 attempt. ODI-1240: Flow INT_EXCH_PART fails during an operation of integration. This flow of charge table BIG_TABLE2 target.
ODI-1228: failed INT_EXCH_PART (integration) task on the target of ORACLE ODI_STAGE connection.
Caused by: java.sql.SQLException: ORA-14006: invalid partition name
ORA-06512: at line 2
Please can I know what is the problem.
Put your name of the partition in upper case and double coate as:
'BIG_TABLE_2007 '.
The capital should not be a problem, but it is better to be like that because it will store like this in the table USER or ALL_TAB_PARTITIONS.
This makes it easier to compare if you need to check if a partition already exists or not.
Hope this can help you.
-
ODI error. When you try to import.
Error Type 2 SCD: ODI - 1228:ORA - 01747: invalid column, table.column, or user.table.column specification
It is a common question.
Allow your SCD SCD table column properties if you do not select "crush on change."
This property simply-Online CPC IKM goto => select ignore option error on update of existing lines.
-
[4.0.1] bug in Data Import: ORA-00957: duplicate column name
I found a serious problem in the import feature in 4.0.1 data as well as in the old version 3.2. It generates an INSERT script with duplicate column names, so that I can't use this feature at all. This is very critical for me. I don't see that I did anything wrong. It does not appear that the DB table columns are optional or required, or if I have NULL data in the file to import the required columns or not important.
Here is a stripped down test cases:
CREATE TABLE IMPORT_DATA
(
ACCOUNT VARCHAR2 (25 BYTES),
NUMBER AMOUNT (30.3).
CUSTOMER VARCHAR2 (25 BYTES)
COST_CENTER VARCHAR2 (25 BYTES),
DESCRIPTION VARCHAR2 (255 BYTES),
THE PERIOD NUMBER (15),
NUMBER OF AWARDS (30.8).
PROJECT VARCHAR2 (25 BYTES)
ID_RESSOURCE VARCHAR2 (25 BYTES),
TOTAL_HRS COMP (30.8).
TRANS_ID COMP (30.3).
VERSION VARCHAR2 (25 BYTES),
NUMBER OF VOLUME_FLAG (15),
WORKORDER VARCHAR2 (25 BYTES)
);
There are examples of input data with a single line (Excel CSV/separator with ";" as separator). It doesn't matter that I have import this as CSV/delimited or as original XLSX file, the error still occurs.
COST_CENTER; PROJECT; ID_RESSOURCE; WORKORDER; VERSION; ACCOUNT; VOLUME_FLAG; TOTAL_HOURS; PRICE; AMOUNT; PERIOD_FROM; PERIOD_TO; DESCRIPTION; TRANS_ID; CUSTOMER
Z4; D425Z4; RC 8901; 0; 0; 0; 0.00; 201004; 201004; TestData; -118; Z4
The import script generated is:
SET DEFINE OFF
-As line 1 non been einfügen
-ORA-00957 double column name:
Line - 1
INSERT INTO IMPORT_DATA (COST_CENTER, PROJECT, id_ressource, WORKORDER, VERSION, ACCOUNT, VOLUME_FLAG, ACCOUNT, PRICE, QUANTITY, ACCOUNT, ACCOUNT, DESCRIPTION, TRANS_ID, CUSTOMER) VALUES ("Z4", "D425Z4", ",", "RC", '8901' 0,0 '0', 0.0, 0.0, '201004', '201004', "Testdata",-118.0, "Z4");
and as you can see, it has the column AMOUNT several times.
Help!
Concerning
Peter
What you have on the step 3 of 5 of the wizard when you set the columns?
It seems you have more values on your input string you have columns of your table.
-
java.sql.SQLException: ORA-00903: invalid table name
Guys,
I get this error. Could you help me on this?
08:58:23, 859 ERROR [DATABASE] select * where orc_key = 125 and _key not
in (null) and UD_MAINU_key = 98
java.sql.SQLException: ORA-00903: invalid table name
to
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:108)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:340)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:301)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:813)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:253)
to
oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:890)
to
037)
to
oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:901)
to
155)Go to metalink and look at this note ID 443436.1.
hope this helps,
Thiago Leoncio -
SQL Loader error for DATE columns
Oracle version: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
My control file:
The table I want to insert is called NEW_EMP. His last HIRE_DATE column is the DATE data type.LOAD DATA INFILE 'D:\Info\new_emp.dat' BADFILE 'D:\Info\new_emp.bad' DISCARDFILE 'D:\Info\new_emp.dsc' INTO TABLE "NEW_EMP" FIELDS TERMINATED BY ',' (EMPLOYEE_ID , EMPLOYEE_FIRSTNAME , EMPLOYEE_LASTNAME , EMPLOYEE_ADDRESS , EMPLOYEE_CITY , EMPLOYEE_STATE , EMPLOYEE_ZIP_CODE , EMPLOYEE_COUNTRY , EMPLOYEE_PHONE_NMBR , EMPLOYEE_FAX_NMBR , EMPLOYEE_EMAIL , EMPLOYEE_GENDER , EMPLOYEE_AGE , NATIVE_LANG_DESC , SEC_LANG_DESC , TER_LANG_DESC , POSITION_TYPE , REGIONAL_MANAGER , DEALERSHIP_ID , DEALERSHIP_MANAGER_FIRSTNAME , DEALERSHIP_MANAGER_LASTNAME , HIRE_DATE )
Here are my dat file:
From the command prompt, I get:1201,Andrew,Arthurs,200 Monroe street,Naperville,IL,,,1111111111,,,M,34,,,,Manager,,11,Harold,King,11/29/2003 13:40:00
The error generated in the log file is:sqlldr username/password@db control=control.ctl
What can I change here in order to insert correctly the dates?Record 1: Rejected - Error on table "NEW_EMP", column HIRE_DATE. ORA-01843: not a valid month
Try this
LOAD DATA INFILE 'D:\Info\new_emp.dat' BADFILE 'D:\Info\new_emp.bad' DISCARDFILE 'D:\Info\new_emp.dsc' INTO TABLE "NEW_EMP" FIELDS TERMINATED BY ',' (EMPLOYEE_ID , EMPLOYEE_FIRSTNAME , EMPLOYEE_LASTNAME , EMPLOYEE_ADDRESS , EMPLOYEE_CITY , EMPLOYEE_STATE , EMPLOYEE_ZIP_CODE , EMPLOYEE_COUNTRY , EMPLOYEE_PHONE_NMBR , EMPLOYEE_FAX_NMBR , EMPLOYEE_EMAIL , EMPLOYEE_GENDER , EMPLOYEE_AGE , NATIVE_LANG_DESC , SEC_LANG_DESC , TER_LANG_DESC , POSITION_TYPE , REGIONAL_MANAGER , DEALERSHIP_ID , DEALERSHIP_MANAGER_FIRSTNAME , DEALERSHIP_MANAGER_LASTNAME , HIRE_DATE Date "mm/dd/yyyy hh24:mi:ss" )
p.s: not tested
Concerning
REDA
-
PL/SQL: ORA-01747... trigger?
Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE Production 11.2.0.3.0
AMT for Solaris: 11.2.0.3.0 - Production Version
NLSRTL Version 11.2.0.3.0 - Production
I create instead of relaxing and it is to compile with error and gives me the error of:
PL/SQL: ORA-01747: invalid column, table.column, or user.table.column specification
I compared the columns all the way back to the original table and I can't choose where or it fails on.
Here is the original table:
DROP TABLE NRIS_WBETTERS. NRN_TOTAL_SUMMARY CASCADE CONSTRAINTS;
CREATE THE TABLE NRIS_WBETTERS. NRN_TOTAL_SUMMARY
(
Sys_guid() TOTAL_CN VARCHAR2 (40 BYTE) DEFAULT is NOT NULL.
ROUND NUMBER (3) NOT NULL,
REGION_CODE VARCHAR2 (5 BYTE) NOT NULL,
AFOREST_CODE VARCHAR2 (15 BYTE) NOT NULL,
SUBUNIT VARCHAR2 (15 BYTE),
TYPESITE VARCHAR2 (15 BYTE) NOT NULL,
SAMP_STRATUM VARCHAR2 (6 BYTE) NOT NULL,
SAMPLEYEAR VARCHAR2 (5 BYTE) NOT NULL,
SAMPLED_DAYS NUMBER (3).
AGREEDTO NUMBER 4,
LERNUM NUMBER 4,
NNH NUMBER (8).
SITE_VISITS NUMBER (10),
SVPERDAY NUMBER (8,1).
DAYSNOINTS NUMBER 4,
DAYSNOLER NUMBER 4,
LERPERDAY NUMBER (4.1).
SVCONFINT NUMBER (5.1).
LAST_UPDATE DATE DEFAULT sysdate is NOT NULL,
VPDUNIT_ID VARCHAR2 (10 BYTE) NOT NULL
)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE)
80K INITIAL
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
DEFAULT USER_TABLES
)
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
GRANT SELECT, UPDATE ON NRIS_WBETTERS. NRN_TOTAL_SUMMARY TO TEMP_NVUM_FY;
Here is the view that the trigger is activated on:
DROP VIEW NVUM_FY. NRN_TOTAL_SUMMARY_V;
/ * Formatted on 14/03/2014 07:47:04 (PS5 v5.256.13226.35538) * /.
CREATE OR REPLACE FORCE VIEW NVUM_FY. NRN_TOTAL_SUMMARY_V
(
TOTAL_CN,
ID,
AFOREST_CODE,
SUBUNIT,
TYPESITE,
SAMP_STRATUM,
SAMPLED_DAYS,
AGREEDTO,
LERNUM,
NNH,
DAYSNOINTS,
DAYSNOLER,
LERPERDAY,
SVCONFINT,
SITE_VISITS,
SVPERDAY
)
AS
(SELECT 'TOTAL_CN',
"ID."
"AFOREST_CODE,"
"SUBUNIT."
"TYPESITE."
"SAMP_STRATUM,"
"SAMPLED_DAYS,"
"AGREEDTO."
"LERNUM,"
"NNH."
"DAYSNOINTS,"
"DAYSNOLER,"
"LERPERDAY,"
"SVCONFINT,"
"SITE_VISITS,"
'SVPERDAY '.
OF NRIS_WBETTERS. FY07_RECONCILED_TOTAL_SUMMARY);
CREATE OR REPLACE TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II
INSTEAD OF UPDATE
ON NVUM_FY.nrn_total_summary_v
FOR EACH LINE
BEGIN
UPDATE nris_wbetters.nrn_total_summary
SET SAMP_STRATUM =: NEW. SAMP_STRATUM,
SAMPLED_DAYS =: NEW. SAMPLED_DAYS,
AGREEDTO =: NEW. AGREEDTO,
LERNUM =: NEW. LERNUM,
LONG =: NEW. ROUND,
REGION_CODE =: NEW. REGION_CODE,
NNH =: NEW. NNH,
DAYSNOINTS =: NEW. DAYSNOINTS,
DAYSNOLER =: NEW. DAYSNOLER,
LERPERDAY =: NEW. LERPERDAY,
SVCONFINT =: NEW. SVCONFINT,
SITE_VISITS =: NEW. SITE_VISITS,
SVPERDAY =: NEW. SVPERDAY,
SAMPLEYEAR =: NEW. SAMPLEYEAR,
WHERE total_cn =: NEW.total_cn
AND aforest_code =: NEW.aforest_code
AND sitenumber =: NEW.sitenumber
AND TypeSite =: NEW.sitetype;
END nrn_proxy_summary_ii;
/
And here's the trigger.
DROP TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II;
CREATE OR REPLACE TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II
INSTEAD OF UPDATE
ON NVUM_FY.nrn_total_summary_v
FOR EACH LINE
BEGIN
UPDATE nris_wbetters.nrn_total_summary
SET SAMP_STRATUM =: NEW. SAMP_STRATUM,
SAMPLED_DAYS =: NEW. SAMPLED_DAYS,
AGREEDTO =: NEW. AGREEDTO,
LERNUM =: NEW. LERNUM,
NNH =: NEW. NNH,
DAYSNOINTS =: NEW. DAYSNOINTS,
DAYSNOLER =: NEW. DAYSNOLER,
LERPERDAY =: NEW. LERPERDAY,
SVCONFINT =: NEW. SVCONFINT,
SITE_VISITS =: NEW. SITE_VISITS,
SVPERDAY =: NEW. SVPERDAY,
WHERE TOTAL_CN =: NEW. TOTAL_CN
AND AFOREST_CODE =: NEW. AFOREST_CODE
AND TYPESITE =: NEW. TYPESITE;
END;
/
In relaxation, the line that is highlighted when the script ends is the clause WHERE of TOTAL_CN. I know not true but if it is a false witness or what, but I could not figure out where the error is or why.
Is anyone able to see what I can't do?
Thank you.
Hello
LostInPermuation wrote:
...
CREATE OR REPLACE TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_IIINSTEAD OF UPDATE
ON NVUM_FY.nrn_total_summary_v
FOR EACH LINE
BEGIN
UPDATE nris_wbetters.nrn_total_summary
SET SAMP_STRATUM =: NEW. SAMP_STRATUM,
SAMPLED_DAYS =: NEW. SAMPLED_DAYS,
AGREEDTO =: NEW. AGREEDTO,
LERNUM =: NEW. LERNUM,
LONG =: NEW. ROUND,
REGION_CODE =: NEW. REGION_CODE,
NNH =: NEW. NNH,
DAYSNOINTS =: NEW. DAYSNOINTS,
DAYSNOLER =: NEW. DAYSNOLER,
LERPERDAY =: NEW. LERPERDAY,
SVCONFINT =: NEW. SVCONFINT,
SITE_VISITS =: NEW. SITE_VISITS,
SVPERDAY =: NEW. SVPERDAY,
SAMPLEYEAR =: NEW. SAMPLEYEAR,
WHERE total_cn =: NEW.total_cn
AND aforest_code =: NEW.aforest_code
AND sitenumber =: NEW.sitenumber
AND TypeSite =: NEW.sitetype;
END nrn_proxy_summary_ii;
/
And here's the trigger.
DROP TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II;
CREATE OR REPLACE TRIGGER NVUM_FY. NRN_TOTAL_SUMMARY_II
INSTEAD OF UPDATE
ON NVUM_FY.nrn_total_summary_v
FOR EACH LINE
BEGIN
UPDATE nris_wbetters.nrn_total_summary
SET SAMP_STRATUM =: NEW. SAMP_STRATUM,
SAMPLED_DAYS =: NEW. SAMPLED_DAYS,
AGREEDTO =: NEW. AGREEDTO,
LERNUM =: NEW. LERNUM,
NNH =: NEW. NNH,
DAYSNOINTS =: NEW. DAYSNOINTS,
DAYSNOLER =: NEW. DAYSNOLER,
LERPERDAY =: NEW. LERPERDAY,
SVCONFINT =: NEW. SVCONFINT,
SITE_VISITS =: NEW. SITE_VISITS,
SVPERDAY =: NEW. SVPERDAY,
WHERE TOTAL_CN =: NEW. TOTAL_CN
AND AFOREST_CODE =: NEW. AFOREST_CODE
AND TYPESITE =: NEW. TYPESITE;
END;
/
In relaxation, the line that is highlighted when the script ends is the clause WHERE of TOTAL_CN. I know not true but if it is a false witness or what, but I could not figure out where the error is or why.
Is anyone able to see what I can't do?
Thank you.
You don't want the last comma just before the keyword WHERE.
I get an error of re-creation of the view, so I can't say if there are problems.
-
Oracle 11g Release 2
I run an UPDATE statement. In the 'set' I am trying to update a column by using a subquery on the right side. REPLACE the statement Gets the error ORA-01747: specification of invalid column, table.column, or user.table.column.
create table tab1 ( file_id number , record_id number , part_type_id number , part_number number , positon_id number , notes varchar2(255) , mapped varchar2(1) default 'N' ) / insert into tab1 values(1,1,123,777,1,'NEW|A/C COMPRESSOR KIT','N') ; insert into tab1 values(1,2,123,777,2,'REMAN|A/C LINE','N') ; insert into tab1 values(1,3,123,777,2,'TEST NOTE','N') ; commit; select * from tab1; /* FILE_ID RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID NOTES MAPPED --------- ---------- ------------ ----------- ---------- ------------------------- ------ 1 1 123 777 1 NEW|A/C COMPRESSOR KIT N 1 2 123 777 2 REMAN|A/C LINE N 1 3 123 777 1 TEST NOTE N */ DECLARE v_note2 varchar2(255) := 'NEW' ; BEGIN UPDATE tab1 t SET , t.notes = (select REPLACE(t.notes,v_note2,null) from dual ) WHERE t.file_id = 1 -- value comes from another source AND t.part_type_id = 123 -- value comes from another source AND t.part_number = 777 -- value comes from another source AND t.position_id = 1 ; -- value comes from another source END ; / ERROR at line 3: ORA-01747: invalid user.table.column, table.column, or column specification
Here's what the end result should be:
FILE_ID RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID NOTES MAPPED --------- ---------- ------------ ----------- ---------- ------------------------- ------ 1 1 123 777 1 |A/C COMPRESSOR KIT N 1 2 123 777 2 REMAN|A/C LINE N 1 3 123 777 1 TEST NOTE N
Hello
orclrunner wrote:
Oracle 11g Release 2
I run an UPDATE statement. In the 'set' I am trying to update a column by using a subquery on the right side. REPLACE the statement Gets the error ORA-01747: specification of invalid column, table.column, or user.table.column.
- create table tab1
- (file_id number,
- number of record_id,
- number of part_type_id
- number of PART_NUMBER,
- number of positon_id
- Notes VARCHAR2 (255),
- mapped by default varchar2 (1) ' don't
- )
- /
- insert into tab1 values (1,1,123,777,1,'NEW |) Kit COMPRESSOR / it, ' don't);
- insert into tab1 values (1,2,123,777,2,'REMAN |) A/C LINE ',' don't);
- insert into tab1 values (1,3,123,777,2, 'NOTE of TEST', ' don't);
- commit;
- Select * from tab1;
- /*
- FILE_ID RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID MAPPED NOTES
- --------- ---------- ------------ ----------- ---------- ------------------------- ------
- 1 1 123 777 1 NEW | A/C COMPRESSOR KIT N
- 1 2 123 777 2 REMAN | A/C LINE N
- 1 3 123 777 1 TEST NOTES N
- */
- DECLARE
- VARCHAR2 (255) v_note2: = "NEW";
- BEGIN
- Tab1 t UPDATE
- SET
- t.notes = (select REPLACE(t.notes,v_note2,null)
- the double)
- WHERE t.file_id = 1 - value comes from another source
- AND t.part_type_id = 123 - value comes from another source
- AND t.part_number = 777 - value comes from another source
- AND t.position_id = 1; -value comes from another source
- END;
- /
- ERROR at line 3:
- ORA-01747: invalid column, table.column, or user.table.column specification
Here's what the end result should be:
- FILE_ID RECORD_ID PART_TYPE_ID PART_NUMBER POSITON_ID MAPPED NOTES
- --------- ---------- ------------ ----------- ---------- ------------------------- ------
- 1 1 123 777 1 | A/C COMPRESSOR KIT N
- 1 2 123 777 2 REMAN | A/C LINE N
- 1 3 123 777 1 TEST NOTES N
The comma after SET is a syntax error.
Why you use double? Why not just
UPDATE tab1
SET of notes = REPLACE (notes, v_note2)
WHERE file_id = 1
...
?
-
Hello
When executing this query, Iam getting error.
PL/SQL: ORA-01747: invalid column, table.column, or user.table.column specification
declare cursor c1 is select * from SCTS05MAR12.M09_NT_UV_CONTACT; cur c1%rowtype; begin open c1; loop fetch c1 into cur; insert into MCA20APR12.M09_NT_UV_CONTACT (ADABAS_ISN , ( CONTACT_NAME, PTT_CARRIER_CD, PTT_SEQ_NBR, TEL_NBR , FAX_NBR , TELEX_NBR , CONTACT_ST , NETPRO_TRANSM_DT, NETPRO_TRANSM_TM , NETPRO_TRANSM_ST , NETPRO_TRANSM_ST_DT, NETPRO_TRANSM_ST_TM , NETPRO_TRANSM_ERR_CD, CRTE_DT , CRTE_TM , UPDT_DT , UPDT_TM , UPDT_PGM , CREATOR_ID , LAST_CHG_ID , CONTACT_ID ) values ( cur.ADABAS_ISN, cur. CONTACT_NAME, cur.PTT_CARRIER_CD , cur.PTT_SEQ_NBR, cur.TEL_NBR , cur.FAX_NBR , cur.TELEX_NBR , cur.CONTACT_ST , cur.NETPRO_TRANSM_DT , cur.NETPRO_TRANSM_TM , cur.NETPRO_TRANSM_ST , cur.NETPRO_TRANSM_ST_DT , cur.NETPRO_TRANSM_ST_TM , cur.NETPRO_TRANSM_ERR_CD, cur.CRTE_DT , cur.CRTE_TM , cur.UPDT_DT , cur.UPDT_TM , cur.UPDT_PGM , cur.CREATOR_ID , cur.LAST_CHG_ID , STG_NT_UV_CONTACT.NEXTVAL); end loop; close c1; EXCEPTION WHEN others THEN DBMS_OUTPUT.PUT_LINE('Exception: ' || sqlerrm); close c1; end;
First step would be to remove the clause WHEN OTHERS and simply allow the error appears on the screen with the exact line where its been triggered.
Once you get that check if the name of the specified object is correct. If it is, check for privileges on the table for the current user.
-
MERGER into slider throws the error message: ORA-01747
Hi guys,.
I'm new in PL/SQL and I'm taking the last row of a database table and add the same data in another table with the same structure, but for the ancestors of the current employee. Something like:
Day EmpID LOB (key fields)
12-1007-29
EmpID has 24 and 95 ancestors. That's why in the destination table I have to insert (or update of status and idforum if these three key areas already exists):
EmpID LOB day
24 1007 29
95-1007-29
There are 4 tables:
X - table base;
Y - destination table (same structure as X);
Z - the relationship between the employee and ancestor;
W - plays the role of a temporary table, but is a real table - only for the MERGER;
============================================================================================
create or replace
PROCEDURE INSERT_PARENTS AS
BEGIN
DECLARE
EMP_VAR NUMBER (38.0). -employee
NUMBER OF ANCESTOR_ID; -relative of the employee
NUMBER OF LOB_VAR; -LOB
NUMBER OF DAY_VAR; -date of
NUMBER OF FORUMID_VAR; -Idforum
STATUS_VAR VARCHAR2 (20); -Status
Parents of CURSOR
IS
SELECT ancestor_key FROM Z WHERE member_key = EMP_VAR; -This slider will go through all the ancestors of the employee
Number EMPROWID_VAR; -It's the key to the table Y (destination table)
BEGIN
-extract the last line of the table of database variables
SELECT EMPL_KEY in the EMP_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT LOB_KEY in the LOB_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT DAY_KEY in the DAY_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT IDFORUM in FORUMID_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT STATUS in STATUS_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT NVL (Max (EMPROW_ID), 0) + 1 in EMPROWID_VAR OF Y; -initialize the key to the table max + 1 of the existing key Y
Parents OPEN.
LOOP
EXTRACT the parents in ANCESTOR_ID;
EXIT WHEN parents % NOTFOUND;
EMPROWID_VAR: = EMPROWID_VAR + 1;
-the value of the new key for Y
INSERT w (emprowid_var, lob_var, ancestor_id, day_var, forumid_var, status_var)
VALUES (EMPROWID_VAR, LOB_VAR, ANCESTOR_ID, DAY_VAR, FORUMID_VAR, STATUS_VAR); -prepare the source for the MERGE statement
-merge data between 2 tables:
-If a parent already exists in the destination, to update just idforum and the new status
-If that parent does not exist in the dest table, will be inserted with the status ' U/R '.
MERGE TO Y Dest
USING the W
WE (Dest.LOB_KEY = Surce.LOB_VAR AND)
Dest.EMPL_KEY = Surce.ANCESTOR_ID AND
Dest.DAY_KEY = Surce.DAY_VAR)
WHEN MATCHED, THEN update to SET (Dest.FORUMID = Surce.FORUMID_VAR,
Dest.STATUS = Surce.STATUS_VAR)
WHEN NOT MATCHED THEN INSERT (Dest.EMPROW_ID, Dest.LOB_KEY, Dest.EMPL_KEY, Dest.DAY_KEY, Dest.FORUMID, Dest.STATUS)
VALUES (Surce.EMPROWID_VAR, Surce.LOB_VAR, Surce.ANCESTOR_ID, Surce.DAY_VAR, Surce.FORUMID_VAR, ' U/R');
END LOOP;
END;
END INSERT_PARENTS;
When I try to run this procedure (compile) I get this error message:
Error (53,37): PL/SQL: ORA-01747: invalid column, table.column, or user.table.column specification
Can you tell me where I am doing wrong? (I'm pretty sure that it's in the Merge statement, but what is it?)
Thanks in advance.
Published by: petresion on November 19, 2011 14:02without the paintings I never would have found
MERGE INTO y dest USING w surce ON (dest.lob_key = surce.lob_var AND dest.empl_key = surce.ancestor_id AND dest.day_key = surce.day_var ) WHEN matched THEN UPDATE SET dest.forumid = surce.forumid_var, dest.status = surce.status_var WHEN NOT matched THEN INSERT ( dest.emprow_id, dest.lob_key, dest.empl_key, dest.day_key, dest.forumid, dest.status) VALUES ( surce.emprowid_var, surce.lob_var, surce.ancestor_id, surce.day_var, surce.forumid_var, 'U/R');
-
How to create Table View with even a column name but another Table?
Hi all
I have the problem to create a tableview with the same column name, but in the other table.
Table I: -.
Table - PAC051MPROFORMA
Column - MNR, visitid
Table - PAC051TPROFORMA
Column - MNR, visitid
Table - PAC052MTRANSBILL
Column - MNR, visitid
Then, I want to create a table for this table. It comes to my SQL
Pacviewproforma CREATE VIEW (MNR, visitid, MNR, visitid, MNR, visitid)
Like some PAC051MPROFORMA.mrn, PAC051MPROFORMA.visitid, PAC051TPROFORMA.mrn, PAC051TPROFORMA.visitid, PAC052MTRANSBILL.mrn, PAC052MTRANSBILL.visitid
where
* (a.PAC051MPROFORMA.mrn = PAC051TPROFORMA.mrn) *.
and
* (a.PAC051TPROFORMA.mrn = PAC052TRANSBILL.mrn) *.
SQL return this error ORA-00957 =: duplicate column name
Can I change this SQL for
Pacviewproforma CREATE VIEW (MNR, visitid)
Like some PAC051MPROFORMA.mrn, PAC051MPROFORMA.visitid, PAC051TPROFORMA.mrn, PAC051TPROFORMA.visitid, PAC052MTRANSBILL.mrn, PAC052MTRANSBILL.visitid
where
* (a.PAC051MPROFORMA.mrn = PAC051TPROFORMA.mrn) *.
and
* (a.PAC051TPROFORMA.mrn = PAC052TRANSBILL.mrn) *.
This time this error return = ORA-01730: number of column names specified invalid
What should I do?
Thank you...Hello
SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid) 2 As Select 3 PAC051MPROFORMA.mrn, 4 PAC051MPROFORMA.visitid, 5 PAC051TPROFORMA.mrn, 6 PAC051TPROFORMA.visitid, 7 PAC052MTRANSBILL.mrn, 8 PAC052MTRANSBILL.visitid 9 from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL 10 where 11 (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn) 12 and 13 (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn); CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid) * ERROR at line 1: ORA-00957: duplicate column name
Please give different names to each column.
Something like that...
SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid) 2 As Select 3 PAC051MPROFORMA.mrn, 4 PAC051MPROFORMA.visitid, 5 PAC051TPROFORMA.mrn, 6 PAC051TPROFORMA.visitid, 7 PAC052MTRANSBILL.mrn, 8 PAC052MTRANSBILL.visitid 9 from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL 10 where 11 (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn) 12 and 13 (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn); View created. SQL> DESC pacviewproforma; Name Null? Type ----------------------------------------- -------- ---------------------------- MPROFORMA_MRN NUMBER MPROFORMA_VISITID NUMBER TPROFORMA_MRN NUMBER TPROFORMA_VISITID NUMBER MTRANSBILL_MRN NUMBER MTRANSBILL_VISITID NUMBER
ORA-01730: number of column names specified invalid
The list of the nmae column you specified for the CREATE VIEW must correspond with the list of SELECTION in the view.
Twinkle
-
Additional column names selected when you use the describe "popup" to select columns
Hello
In SQL Developer 3.2.20.09, if you use the popup describe the function on a individual table columns using Ctrl + click (not shift click choosing a range of columns) and select and then drag them to the SQL worksheet to find the column names, it includes all of the columns between the individual columns that have been selected.
For example if I choose column 1 and 5, it includes 1,2,3,4,5 columns when I drag them through.
Simple to reproduce on any table, just open the SQL worksheet, type the name of a table, open the popup describe and select some columns.
Kind regards
Steve
Is not past in v4 ai2 it seems to be fixed.
-
Hi all
I created a sql * simultaneous program of charger with a parameter to pass the path of the data file with file name. Now my question is how does the program know that the control file is in a specific path.
For example, I kept the control file in the $XXX_TOP/bin and the data file in the $XXX_TOP.
I have now in the program parameter, pass the path of the data file, but how the program takes the path of the default control file $XXX_TOP/bin.
Thanks and greetings
El MI created a sql * simultaneous program of charger with a parameter to pass the path of the data file with file name. Now my question is how does the program know that the control file is in a specific path.
For example, I kept the control file in the $XXX_TOP/bin and the data file in the $XXX_TOP.
I have now in the program parameter, pass the path of the data file, but how the program takes the path of the default control file $XXX_TOP/bin.
You can provide information on the data file in the control file, or switch the full directory path and the name of your file as an argument. Concurrent Manager passes the "data = (full path of the data file)" token at query execution time. Without a data file name, the concurrent manager ignores this token and SQL * Loader uses the data file name specified in the control file.
http://docs.Oracle.com/CD/E18727_01/doc.121/e12897/T302934T458254.htm#4163833
The control file must be placed in the directory XX_TOP/bin $.
http://oracleapplications99.blogspot.ca/2011/12/sqlloader-examples.html
http://imdjkoch.WordPress.com/2010/08/12/registering-SQL-Loader-as-a-concurrent-program/
http://erpschools.com/articles/SQL-LoaderThank you
Hussein
Maybe you are looking for
-
How to reset an iphone 4S which was given to me and they do not know their apple account
They gave me an iPhone 4s to a friend, the iPhone is disabled and I need his email/password to connect to the device and he forgot, is it a way I can completely reset even though everything on gets them lost?
-
BSOD crash to the device USB unplug - Satellite A100
Hello world On my new Toshiba Satellite A100 laptop right out of the box (pre-installed Windows XP MCE), I installed a USB device (a Line 6 POD XT live guitar amp modeling unit). I used the latest drivers available. The instrument is duly recognized
-
How to print screen with Win 7 on Satellite L755?
I just got this laptop and I wonder if the screenshot works? It's on the same key as the 'end' key but I don't know exactly how do so that the work is part "prtsc"... any help would be greatly appreciated! Thank you! Post edited by: Ashleylayne
-
I have two computers, X and Y. I want to the map on X, a share named htdocs, who lives in the computer Y. Both are Windows XP. X has ip 10.22.204.87 There's ip 10.121.241.140 X belongs to a domain. Belongs to a workgroup. Y, I have an administrator
-
Hi all! We have a customer who wants to print RDP remote at a local levelAIO printer is connected. the printer is unable to print on the TS00xport - driver problem. now, we found, is it possible to print directly on the unc path of theprinter when it