ORA-00957: duplicate column name for multi-form page
I have read numerous threads on this but I think I am missing something. I have two forms on one page, each based on a separate table. They each have one column in common which is why I believe I am getting this error. However, I do not understand why since each form has its own Automatic Row Processing, it is tripping over the column name. I have changed the name of the page item to be different, but I still get this error. TIA.
Hi,
Technically you can not use two forms in one page. Both table have the same column name which confuses the DML process. Try change the column name in one table and see if it works.
Cheers,
Tajuddin
Similar Messages
-
Data subsetting [ORA-00957: duplicate column name]
I want to select only rows with a certain id from a table.
The code for the publication :
SELECT * FROM ZOO.ANIMAL A, ZOO.TYPE_ANIMAL TA, ZOO.ANIMAL_EMPLOYE AE WHERE A.IDTYPEANIMAL = TA.IDTYPEANIMAL AND TA.IDTYPEANIMAL = AE.IDTYPEANIMAL AND AE.IDEMPLOYE = :employe
When i publish with .jar, i have this error :
ORA-00957: duplicate column name
What is the problem ? The query works in iSQL*Plus !
Thanks
Message was edited by:
user460585Hi,
I guess that you are tired or something
01 update requisicoes set
02 requisicao_num = '4321',
03 requisicao_desc = 'dfgb',
04 empresa_id = 3,
05 posicao_id = 2, -- equals to 14
06 solicitante = 'dfvsdfv',
07 centrodecusto_solicitante = '5131',
08 centrodecusto_executante = '5151',
09 centrodecusto_aplicacao = '5141',
10 data_saida = to_date('12/12/2004', 'dd/mm/yyyy'),
11 data_desejada = to_date('12/12/2004', 'dd/mm/yyyy'),
12 prioridade_id = 1,
13 observacao = 'sgfbfdgbdfgb',
14 posicao_id = 2
15 where requisicao_id = 3
Dont you have:
posicao_id = 2 in 5th line and in the 14th line ??
Bye,
Vitor -
ORA-00957: duplicate column name
When I am enableversioning of a table, I get following error messages:
SQL> execute dbms_wm.enableversioning('transcript');
BEGIN dbms_wm.enableversioning('transcript'); END;
ERROR at line 1:
ORA-00957: duplicate column name
ORA-06512: at "SYS.LTDDL", line 399
ORA-06512: at "SYS.LTDDL", line 1117
ORA-06512: at "SYS.LT", line 7181
ORA-06512: at line 1
I checked the column name that will be add by dbms_wm package and did not see any column which would cause this problem.
Could some one give me the list of reserved column names for dbms_wm package?
Thanks
AshleyAshley
These are some the reserved words used by OWM in its internal views. These can also conflict on enable versioning
statements.
RIDCHILD RIDBASE RIDPARENT CHILDSTATE PARENTSTATE BASEDS CHILDDS PARENTDS
FIRSTCHILDVER CHILDVER PARENTVER POS RID VERSION NEXTVER DELSTATUS
LTLOCK
In the release after 9iR2, we have augmented reserved words with a prefix that will commonly not conflict with
user schema column names.
Let me know if you were able to identify the reserve word conflict.
Arun
[email protected] -
ORA-00957 Duplicate Column Name Materialized View ( UPDATED: Not answered)
Hello all. I am getting this error when trying to create a Materialized View. I have many other MV I created without problem, but I cannot find the catch up here, can anyone help?. I cannot find any duplicates. The only duplicate I though was the Pipeline_Code column that was entered into the function and the one being being called out as a column. To check, I renamed the latter and still am getting this issue.
Any help would be greatly appreciated.
Thanks!
The query is below:
CREATE MATERIALIZED VIEW MV_TEST_STATION
REFRESH COMPLETE
START WITH TO_DATE('20-SEP-2013 00:00:00','dd-mon-yyyy hh24:mi:ss')
NEXT (SYSDATE +12/24)
AS
SELECT T.TEST_STATION_ID,
--(SELECT TEST_STATION_TYPE.DESCRIPTION
-- FROM TEST_STATION_TYPE
-- WHERE TEST_STATION.TEST_STATION_TYPE =
-- TEST_STATION_TYPE.TEST_STATION_TYPE)
--AS TEST_STATION_TYPE,
TST.DESCRIPTION AS TEST_STATION_TYPE,
T.SURVEY,
T.STATUS,
T.STATION,
F_TRUESTATION2 (
T.STATION,
T.PIPELINE_CODE,
F_REROUTE_CODE (T.STATION,
T.PIPELINE_CODE))
AS TRUE_STATION,
T.REQUIRED,
-- (SELECT PIPELINE_CODES.PIPELINE_CODE_DESCRIPTION
-- FROM PIPELINE_CODES
-- WHERE TEST_STATION.PIPELINE_CODE = PIPELINE_CODES.PIPELINE_CODE)
-- AS PIPELINE_CODE,
PC.PIPELINE_CODE_DESCRIPTION AS PC_PIPELINE_CODE,
T.INSTALL_DATE,
T.FUNCTIONAL COMMENTS,
TSR.TEST_STATION_READING_ID,
TSR.TEST_DATE,
TSR.SURVEYOR,
TSR.ON_VOLTS,
TSR.ON_BG,
TSR.ON_AG,
TSR.METER_UTC,
TSR.METER_ID,
TSR.IO_BG,
TSR.IO_AG,
TSR.INSTANT_OFF_VOLTS,
TSR.FUNCTIONAL_DAMAGE_OUT,
TSR.FUNCTIONAL_DAMAGE_IN,
TSR.COSEMETIC_DAMAGE_OUT,
TSR.COSEMETIC_DAMAGE_IN,
TSR.COMMENTS,
TSR.CASING_ON,
TSR.CASING_OFF,
TSR.CASING,
TSR.CALIBRATION_DUE_DATE,
TSR.ANODE_AMPS_ON,
TSR.ANODE_AMPS_OFF,
TSR.ANODE
FROM TEST_STATION T
INNER JOIN TEST_STATION_TYPE TST ON T.TEST_STATION_TYPE = TST.TEST_STATION_TYPE
INNER JOIN PIPELINE_CODES PC ON T.PIPELINE_CODE = PC.PIPELINE_CODE
INNER JOIN TEST_STATION_READING TSR ON T.TEST_STATION_ID = TSR.TEST_STATION_ID
WHERE T.TEST_STATION_ID = TSR.TEST_STATION_IDsince we don't have your tables or data, we can not run, test, fix or improve posted code
How do I ask a question on the forums?
https://forums.oracle.com/message/9362002#9362002 -
Duplicate column name when inserting a batch to biztalk
I wonder why I get the following error:
The adapter failed to transmit message going to send port "SEND_PORT_TESTORCHESTRATION_00010" with URL "oracledb://OracleServer/?PollingId=TEST_ORCHESTRATION_ORACLE_00010". It will be retransmitted after the retry interval specified for
this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.TargetSystemException: ORA-06550: line 2, column 290:
PL/SQL: ORA-00957: duplicate column name
ORA-06550: line 2, column 1:
PL/SQL: SQL Statement ignored ---> Oracle.DataAccess.Client.OracleException: ORA-06550: line 2, column 290:
PL/SQL: ORA-00957: duplicate column name
ORA-06550: line 2, column 1:
PL/SQL: SQL Statement ignored
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
at Microsoft.Adapters.OracleCommon.OracleCommonUtils.ExecuteNonQuery(OracleCommand command, OracleCommonExecutionHelper executionHelper)
--- End of inner exception stack trace ---
When I tried to pull a batch from sql server to insert to an oracle table. I have checked and none of the records were duplicate or had the same key. If I sent a batch of only 1 record, it went through fine and oracle database was updated.
However, in either cases, no response from Oracle were received. I had a FILE port to save oracle response to file because the oracle port in the orchestration was 2 way (Send/Receive) port.
Why was BizTalk not writing the response to file?
Your hint/instruction to shed some light to this mystery is highly appreciated. Thanks!
Note: When I tried to look the orchestration debugger, I saw the same message from sql being transmitted twice...why is BizTalk doing that?Hi BoatSeller,
I think it may be something related to the map, I just do not know what. This is what I saw from the message part:
<ns0:Insert xmlns:ns0="http://Microsoft.LobServices.OracleDB/2007/03/ORACLETABLE/Table/ROTATION_REQ">
<ns0:RECORDSET>
<ns0:ROTATION_REQRECORDINSERT>
<ns0:RotationID>D4-2015-CO1</ns0:RotationID>
<ns0:RotationID>D4-015-GL1</ns0:RotationID>
<ns0:Year>2015</ns0:Year>
<ns0:Year>2015</ns0:Year>
<ns0:Class>D4</ns0:Class>
<ns0:Class>D4</ns0:Class>
<ns0:Rotation>CROSSOVER</ns0:Rotation>
<ns0:Rotation>GOOCHLAND CLINIC</ns0:Rotation>
<ns0:From>2014-08-06</ns0:From>
<ns0:From>2014-05-20</ns0:From>
<ns0:To>2015-03-05</ns0:To>
<ns0:To>2015-03-05</ns0:To>
<ns0:NumberOfConsecutiveSession>1</ns0:NumberOfConsecutiveSession>
<ns0:NumberOfConsecutiveSession>1</ns0:NumberOfConsecutiveSession>
<ns0:AmOrPM InlineValue="1"></ns0:AmOrPM>
<ns0:AmOrPM InlineValue="2"></ns0:AmOrPM>
<ns0:DayOfWeek>5</ns0:DayOfWeek>
<ns0:DayOfWeek>4</ns0:DayOfWeek>
</ns0:ROTATION_REQRECORDINSERT>
</ns0:RECORDSET>
</ns0:Insert>
I thought that would be an issue because it looks like it was repeating the content, but if I understand you correctly, this is what the message content supposed to be? If not, what should I change in the map so that Oracle will get the following?
<Record1> <field1>..</field1><field2>..</field2></Record1>
<Record2> <field1>..</field1><field2>..</field2></Record2>
This is the print screen of my orchestration debugger:
If this is a problem, how should I fix this?
And this is my mapping:
Thanks, -
ORA-00904: invalid column name - trying to sum
Hi all
probably somrthing really stupid and easy that I'm missing but here goes
I am trying to gather data from 3 tables, 1st one is stock master file - all records are unique key
2nd table is barcodes, product key can occur 2 / 3 times - one for each barcode that is assigned to a product.
3rd table is warehouse stock, again key can occur a few times as there is a key for each stock record
I need to pull the data from 1st two tables and sum the total of warehouse stock for each record pulled.
I know I will get 2 or 3 records for each stock item as each record will return with a different barcode. what I'm trying to eliminate is returning the same records again with a separate row for each set of warehouse stock records.
If I run
select rmdept||','||rmstyl||','||rmcolr||','||rmsize||','||rmvatc||','||rmshgp||','||
rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,
a.rmcomq, b.rdcstk
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+)
group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
rmmrch, rmcomq, rdcstk)
order by rmdept, rmstyl, rmcolr
I get all the data I want, but duplicate rows for every stock record
53117701612,1,705,ECKO LOGO STEE W,,X*BRT.ROSE,WMN 12,G12,25,6.44,,0,LT,539,1
53117701612,1,705,ECKO LOGO STEE W,,X*BRT.ROSE,WMN 12,G12,25,6.44,,0,LT,539,228
the last column is the stock record
I would like to return just one row showing warehouse stock as 229
If I run
select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||sum(rdcstk)
from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq, b.rdcstk
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+))
group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
rmmrch, rmcomq, rdcstk
order by rmdept, rmstyl, rmcolr
sum on rdcstk in first select statement, I still get two records returned
00101401409,1,001,NKE ULTRACELL M,,B/W/R CL44,SIZE 9,N01,5,15.24,0010140194095,0,FW,-1,-1
00101401409,1,001,NKE ULTRACELL M,,B/W/R CL44,SIZE 9,N01,5,15.24,0010140194095,0,FW,-1,0
If I change sum to 2nd select statement and leave the group by statement outside the brackets
select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq, sum(b.rdcstk)
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+))
group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
rmmrch, rmcomq, rdcstk
order by rmdept, rmstyl, rmcolr
I get
rmmrch, rmcomq, rdcstk
ERROR at line 14:
ORA-00904: invalid column name
If I put the group by inside the brackets
select rmdept||rmstyl||rmcolr||rmsize||','||rmvatc||','||rmshgp||','||
rmdesc||','||rmacod||','||rmcdes||','||rmzdes||','||rmsupp||','||rmsspr||','||
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
from (select unique a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr,a.rmlcos,c.rsbarc,a.rmpord,a.rmmrch,
a.rmcomq, sum(b.rdcstk)
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+) and a.rmstyl = c.rsstyl(+) and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+) and a.rmdept = b.rddept(+) and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+)
group by rmdept, rmstyl, rmcolr, rmsize, rmvatc, rmshgp,
rmdesc, rmacod, rmcdes, rmzdes, rmsupp, rmsspr, rmlcos, rsbarc, rmpord,
rmmrch, rmcomq, rdcstk)
order by rmdept, rmstyl, rmcolr
I get
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
ERROR at line 3:
ORA-00904: invalid column name
I get the same even if I change the field names in the group by to a.rmdept etc.
rmlcos||','||rsbarc||','||rmpord||','||rmmrch||','||rmcomq||','||rdcstk
ERROR at line 3:
ORA-00904: invalid column name
any help, hints or tips greatly appreciated. this is an 8.1.7 database
Thanks
JanetThanks dnikiforov
still get the
select a.rmdept||a.rmstyl||a.rmcolr||a.rmsize||','||a.rmvatc||','||a.rmshgp||','||rmdesc||','||rmac
ERROR at line 1:
ORA-00904: invalid column name
I think its a problem with trying to select on the unique, anyway I accidentally posted a couple of threads for this and it has now been resolved by
select a.rmdept||a.rmstyl||a.rmcolr||a.rmsize||','||a.rmvatc||','||a.rmshgp||','||
a.rmdesc||',||a.rmacod||','||a.rmcdes||','||a.rmzdes||','||a.rmsupp||','||a.rmsspr||','||a.rmlcos||','||
c.rsbarc||','||a.rmpord||','||a.rmmrch||','||a.rmcomq||','||sum(b.rdcstk)
from stkmas a, stkwar b, stkbar c
where a.rmdept = c.rsdept(+)
and a.rmstyl = c.rsstyl(+)
and a.rmcolr = c.rscolr(+)
and a.rmsize = c.rssize(+)
and a.rmdept = b.rddept(+)
and a.rmstyl = b.rdstyl(+)
and a.rmcolr = b.rdcolr(+)
and a.rmsize = b.rdsize(+)
group by a.rmdept,a.rmstyl,a.rmcolr,a.rmsize,a.rmvatc,a.rmshgp,
a.rmdesc,a.rmacod,a.rmcdes,a.rmzdes,a.rmsupp,a.rmsspr, a.rmlcos,
c.rsbarc,a.rmpord,a.rmmrch,a.rmcomq
as I dont need to use the unique because the sum does it for me
Thanks again for speedy help -
Invalid column name for Transparent Gateway for SQLServer
I have successfully set up a transparent gateway for an MS SQLServer database 'pubs' from Oracle 910. I am able to run the following statement successfully as it returns all results without a hitch:
select * from authors@pubs;
pubs is the database link for the transparent gateway.
But when I select any particular column in the select statement like:
select city from authors@pubs;
I get the following error:
select city from authors@pubs
ERROR at line 1:
ORA-00904: invalid column name
Can anyone help me with this?
ThanksSamarjit,
This should work. Are you using a certified configuration?
Check our certification matrix at http://otn.oracle.com/products/gateways/pdf/certmatrix2.pdf
Vira -
Table Name and Column name for Product Family Field under the Product Famil
Hi,
Please help me finding the table name and the column name for the 'Product Family' field and the 'Item' field under the Product families form. The navigation to this form is as follows:
Material Planner Responsibility -> Setup -> Product Family
Please help.
Thanks,
KM2 months ago, you asked a very similar question... and Markus gave you a good answer. His 2-months old answer still applies here.
I recommend that you read it a again at Table name for backorder qty on sales order.
When you have read his answer, please close both threads. -
Error ora-604 ora-904 invalid column name
Someone knows how to fix this problem?
Error ora-604 ora-904 invalid column name.Asif, to add another question to the list of things to check. Is the version of the exp utility you are using to perform the export operation the same version as the database? If not, that would explain the error.
If you are trying to export using a newer version of the export utility that generally will not work. You should switch to using the db version.
If you are exporting using an older version because the target is an older version then usually you need to run the catexp# where # is the version number script for the target version that Oracle provides in the $ORACLE_HOME/rdbms/admin directory.
HTH -- Mark D Powell -- -
JPA -- Inheritance with duplicate column names
Hi,
I have the following problem:
I have two tables. Let's call them BASE_TABLE and CHILD_TABLE. They are mapped through Join Inheritance in Java. In other words:
@Inheritance(strategy=InheritanceType.JOINED)Let's say, the tables look like:
BASE_TABLE (
ID NUMBER(18),
TYPE VARCHAR2(1),
CODE NUMBER(5))
CHILD_TABLE (
ID NUMBER(18),
CODE NUMBER(5),
NAME VARCHAR2(50))Here's where the problem lies: I have duplicate column names. In my example, this is the CODE column. When mapping to Java classes, I can have something like:
@Entity
@Table(name="BASE_TABLE")
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.STRING)
@DiscriminatorValue("0")
class BaseEntity {
@Column(name="CODE")
private Integer code;
public Integer getCode_Base() {
return code;
public setCode_Base(Integer code) {
this.code = code;
@Entity
@Table(name="CHILD_TABLE")
@DiscriminatorValue("1")
@PrimaryKeyJoinColumn(name="ID")
class ChildEntity extends BaseEntity {
@Column(name="CODE")
private Integer code;
public Integer getCode() {
return code;
public setCode(Integer code) {
this.code = code;
}The trouble is, that TopLink only handles ONE of the CODE columns. When SELECTing, it only selects the CODE column from table BASE_TABLE. When generating DML statements, again it only uses the CODE column from table BASE_TABLE.
I wasn't able to make it use BOTH columns.
Please, help. The DB design cannot be changed at the moment. However, I must find a way to make TopLink Essentials use both CODE columns, not just the one from BASE_TABLE.
Thank you in advance!
Best regards,
BisserHi Chris,
I was under the impression, that since the attributes were private, they would be treated as two different attributes by TopLink Essentials.
Java definitely treats them as two different attributes, and not as one overriding the other. I had made sure that I could set both of them with different values (via the differently named accessors) and, indeed, both values were there. I printed them both out on the console, just to make sure. They were printed out ok, the values were indeed different.
But TopLink Essentials was ignoring one of them.
Now that you told me that I should use different names for the attributes, I did just that. And lo and behold, it worked!!! I couldn't even imagine that it would matter to TopLink what the names were, given that they were in two different entities that were mapped to two different tables, inheritance or not.
As I said, Java treats them as two completely different attributes, unlike TopLink Essentials. In future, I will know that even the attribute names matter. Thank you again.
Best regards,
Bisser -
Help on Merge Statement ,I got 'ORA-00904: invalid column name' Error
Pls help
In Oracle 9i i implement the following qry
MERGE INTO jobs A
USING (select order_no,jOB_SEQ_NO from jobs_dlt) B
ON (A.ORDER_NO = B.ORDER_NO and A.JOB_SEQ_NO =B.JOB_SEQ_NO )
WHEN MATCHED THEN
UPDATE SET
A.ORDER_NO= B.ORDER_NO ,
A.JOB_SEQ_NO= B.JOB_SEQ_NO
WHEN NOT MATCHED THEN
INSERT (
A.JOB_SEQ_NO ,
A.ORDER_NO
VALUES (
B.JOB_SEQ_NO ,
B.ORDER_NO
but i got 'ORA-00904: invalid column name' Error
JOBS table Contain the above Column
how i implement the Merge Statment
Thanks in advance
By
SekarI seem to recall this error being spuriously (well unhelpfully) thrown if you tried to UPDATE a key that you used in the ON clause, but I could be mistaken.
For us to recreate this you would need to supply the exact version and scripts to create the tables in question. -
Alias required in SELECT list of cursors to avoid duplicate column names
I got some error messages while compiling the following.
DECLARE
alert_id NUMBER;
CURSOR cur_search IS SELECT c.item_description,
d.name modelname,
SUM(b.quentaty),
SUM(b.balence)
FROM item_procurement_history_dtl a,
item_procurement_history b,
item_master c,
model_master d
WHERE a.item_code = b.item_code
AND a.lot_no = b.lot_no
AND a.item_code = c.item_code
AND b.modelcode = d.modelcode
AND (c.item_description LIKE '%'||:blk_stock_search_fields.item_name||'%' OR :blk_stock_search_fields.item_name IS NULL)
AND (d.name LIKE '%'||:blk_stock_search_fields.modelname||'%' OR :blk_stock_search_fields.modelname IS NULL)
AND (a.status = :blk_stock_search_fields.status OR :blk_stock_search_fields.status IS NULL)
GROUP BY c.item_description, d.name
ORDER BY c.item_description, d.name;
BEGIN
GO_BLOCK('blk_stock_search_fields');
CLEAR_BLOCK(NO_VALIDATE);
FOR i IN cur_search LOOP
:blk_stock_search_data.item_name := i.item_description;
:blk_stock_search_data.modelname := i.modelname;
:blk_stock_search_data.tot_qty := i.tot_qty;
:blk_stock_search_data.available_qty := i.available_qty;
NEXT_RECORD;
END LOOP;
FIRST_RECORD;
GO_ITEM('blk_stock_search_fields.pb_search');
END;
The error is as follows :-
Error 403 at line 23 column 2
Alias required in SELECT list of cursors to avoid duplicate column names.
What will be the solution for this error?
Thanx and Regards,
VikasVikas,
The problem is that you are referencing a column name in your LOOP that does not exist in your CURSOR. Therefore, Oracle has interpreted this to its BEST guess Exception. This can be resolved as follows:
DECLARE
alert_id NUMBER;
CURSOR cur_search IS
SELECT c.item_description,
d.name modelname,
/* You need to ALIAS the product of the SUM() so you can reference it by name.*/
SUM(b.quentaty) AS tot_qty,
/* Same issue here, you must ALIAS the SUM() of Balance in order to reference it by a name.*/
SUM(b.balence) as available_qty
FROM item_procurement_history_dtl a,
item_procurement_history b,
item_master c,
model_master d
WHERE a.item_code = b.item_code
AND a.lot_no = b.lot_no
AND a.item_code = c.item_code
AND b.modelcode = d.modelcode
AND (c.item_description LIKE '%'||:blk_stock_search_fields.item_name||'%' OR :blk_stock_search_fields.item_name IS NULL)
AND (d.name LIKE '%'||:blk_stock_search_fields.modelname||'%' OR :blk_stock_search_fields.modelname IS NULL)
AND (a.status = :blk_stock_search_fields.status OR :blk_stock_search_fields.status IS NULL)
GROUP BY c.item_description, d.name
ORDER BY c.item_description, d.name;
BEGIN
GO_BLOCK('blk_stock_search_fields');
CLEAR_BLOCK(NO_VALIDATE);
FOR i IN cur_search LOOP
:blk_stock_search_data.item_name := i.item_description;
:blk_stock_search_data.modelname := i.modelname;
:blk_stock_search_data.tot_qty := i.tot_qty;
:blk_stock_search_data.available_qty := i.available_qty;
NEXT_RECORD;
END LOOP;
FIRST_RECORD;
GO_ITEM('blk_stock_search_fields.pb_search');
END;Just an observation. Also, There are some misspellings in your cursor. Does this match your table?
Hope this helps.
Craig... -
How to get column names for a specific view in the scheme?
how to get column names for a specific view in the scheme?
TIA
Don't have DD on the wall anymore....or this?
SQL> select text from ALL_VIEWS
2 where VIEW_NAME
3 ='EMP_VIEW';
TEXT
SELECT empno,ename FROM EMP
WHERE empno=10 -
ORA-00904: invalid column name in select query by using abstract datatype
Hi,
I had created abstract datatype as PERSON_TY and ADDRESS_TY ,
after inserting the record . i'm tryng to select the column but i got the error , even i refferd all those thing. they are given that same please look this finde me a result.
SQL> DESC PERSON_TY
Name Null? Type
NAME VARCHAR2(25)
ADDRESS ADDRESS_TY
SQL> DESC ADDRESS_TY
Name Null? Type
STREET VARCHAR2(30)
CITY VARCHAR2(25)
STATE CHAR(2)
COUNTRY VARCHAR2(15)
SQL> SELECT * FROM EMPLOYE
2 ;
EMP_CODE
PERSON(NAME, ADDRESS(STREET, CITY, STATE, COUNTRY))
10
PERSON_TY('VENKAT', ADDRESS_TY('112: BLUE MOUNT', 'CHENNAI', 'TN', 'INDIA'))
20
PERSON_TY('SRINI', ADDRESS_TY('144: GREEN GARDEN', 'THAMBARAM', 'TN', 'INDIA'))
SQL> SELECT PERSON.NAME FROM EMPLOYE
2 ;
SELECT PERSON.NAME FROM EMPLOYE
ERROR at line 1:
ORA-00904: invalid column name
regards
venkiSELECT PERSON.NAME FROM EMPLOYEIf you look in the documentation, you will see that we need to alias the table in order to make this work:
select e.person.name from employees e
/Cheers, APC
Blog : http://radiofreetooting.blogspot.com -
I am using SSIS to extract fixed width data into a flat file destination and I keep getting below error. I have tried almost everything in this forum but still no solution. can anyone help me out to solve this problem.
[Flat File Destination [220]] Error: Failed to write out column name for column "Column 2".
[SSIS.Pipeline] Error: component "Flat File Destination" (220) failed the pre-execute phase and returned error code 0xC0202095
ThanksHi Giss68,
Could you check the Advanced tab of the Flat File Connection Manager to see whether the InputColumnWidth and the OutputColumnWidth properties of the Column2 has the same value? Please refer to the following link about the same topic:
http://stackoverflow.com/questions/10292091/how-do-i-fix-failed-to-write-error-while-exporting-data-to-ragged-right-flat-fil
If it doesn’t work, please post the sample data and the advanced settings of Column2 for further analysis.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support
Maybe you are looking for
-
I have 2 hdmi ports on my tv- both are being used. I want to connect my apple tv- is there another ways to connect?
-
Dimension 1 Cost centre field is not able to edit in Incoming payment for Down payment Request
Hi Exports, I am facing an issue on selecting Cost centres in Incoming payment screen. Issue: While I am booking the payment entry for Down payment request, I am not able to select first Dimension cost centre in Incoming payment rows for down payment
-
Hi This happened for years and years when I was with another provider. Now it's disappeared again (since October) and I haven't been able to access it since then. Comes up with The Performance Tester is currently unable to run a speed test for your
-
How to use ButeBuffer properly in java code
hi, i am trying to use a bytebuffer and i don't kniow which methods allow reading its content...i need to retrieve this content in order to convert it ( byte by byte) into RGB values...so can anyone help me to do it please?
-
Function module AUFBAUEN_MDPSX_ANZEIGEN
hello all, i hope somebody could help me with this problem. we have this program which is Unicode-enabled in the development and test system. During testing in the test system, the program gets an abap dump because one of its parameters is not define