Md Aslam Md Aslam - 6 months ago 80
SQL Question

Getting ORA-00957: duplicate column name, while creating a table

I am trying to make a table, but i am getting duplicate column name error.

My Oracle Query is following

CREATE TABLE CCILDBDEV.TRN_FYC_FWD_UP
(
Tran_Reference varchar2(100) ,
Related_Tran_Ref varchar2(100) ,
Client_Name varchar2(100) ,
Client_ID varchar2(100) ,
Transaction_Type varchar2(100) ,
Trade_Date varchar2(100) ,
Trade_Time_Stamp varchar2(100) ,
Buy_Currency_Code varchar2(100) ,
Buy_Currency_Amount varchar2(100) ,
Sell_Currency_Code varchar2(100) ,
Sell_Currency_Amount varchar2(100) ,
Exchange_Rate varchar2(100) ,
Value_Dates_From varchar2(100) ,
Value_Dates_To varchar2(100) ,
Premium_Fwd_premium varchar2(100) ,
Spot_Rate varchar2(100) ,
Purpose varchar2(100) ,
Remarks varchar2(100) ,
UTILSCAN_Trade_Date varchar2(100) ,
UTIL_SCAN_Settlement_Date varchar2(100) ,
UTILSCAN_Buy_Cur_Code varchar2(100) ,
UTILSCAN_Buy_Cur_Amount varchar2(100) ,
UTILSCAN_Sell_Cur_Code varchar2(100) ,
UTILSCAN_Sell_Cur_Amount varchar2(100) ,
Cons_Currency_Code varchar2(100) ,
Cons_Currency_Amount varchar2(100) ,
SCAN_Rate varchar2(100) ,
Swap_Cost varchar2(100) ,
Cons_Settlement_Indicator varchar2(100) ,
Outsd_Buy_Currency_Code varchar2(100) ,
Outd_Buy_Amount varchar2(100) ,
Outsd_Sell_Currency_Code varchar2(100) ,
Outsd_Sell_Amount varchar2(100) ,
Extended_Expiry_Date varchar2(100) ,
Rep_Date_and_Time varchar2(100) ,
Mat_Date_and_Time varchar2(100) ,
Deal_Status varchar2(100) ,

PYMNTDT1 varchar2(100) ,
PYMNTAMNT1 varchar2(100) ,

PYMNTDT2 varchar2(100) ,
PYMNTAMNT2 varchar2(100) ,

PYMNTDT3 varchar2(100) ,
PYMNTAMNT3 varchar2(100) ,

PYMNTDT4 varchar2(100) ,
PYMNTAMNT4 varchar2(100) ,

PYMNTDT5 varchar2(100) ,
PYMNTAMNT5 varchar2(100) ,

PYMNTDT6 varchar2(100) ,
PYMNTAMNT6 varchar2(100) ,

PYMNTDT7 varchar2(100) ,
PYMNTAMNT7 varchar2(100) ,

PYMNTDT8 varchar2(100) ,
PYMNTAMNT8 varchar2(100) ,

PYMNTDT9 varchar2(100) ,
PYMNTAMNT9 varchar2(100) ,

PYMNTDT10 varchar2(100) ,
PYMNTAMNT10 varchar2(100) ,


PYMNTDT11 varchar2(100) ,
PYMNTAMNT11 varchar2(100) ,
PYMNTDT12 varchar2(100) ,
PYMNTAMNT12 varchar2(100) ,
PYMNTDT13 varchar2(100) ,
PYMNTAMNT13 varchar2(100) ,
PYMNTDT14 varchar2(100) ,
PYMNTAMNT14 varchar2(100) ,
PYMNTDT15 varchar2(100) ,
PYMNTAMNT15 varchar2(100) ,
PYMNTDT16 varchar2(100) ,
PYMNTAMNT16 varchar2(100) ,
PYMNTDT17 varchar2(100) ,
PYMNTAMNT17 varchar2(100) ,
PYMNTDT18 varchar2(100) ,
PYMNTAMNT18 varchar2(100) ,
PYMNTDT19 varchar2(100) ,
PYMNTAMNT19 varchar2(100) ,
PYMNTDT20 varchar2(100) ,
PYMNTAMNT20 varchar2(100) ,
PYMNTDT21 varchar2(100) ,
PYMNTAMNT21 varchar2(100) ,
PYMNTDT22 varchar2(100) ,
PYMNTAMNT22 varchar2(100) ,
PYMNTDT23 varchar2(100) ,
PYMNTAMNT23 varchar2(100) ,
PYMNTDT24 varchar2(100) ,
PYMNTAMNT24 varchar2(100) ,
PYMNTDT25 varchar2(100) ,
PYMNTAMNT25 varchar2(100) ,
PYMNTDT26 varchar2(100) ,
PYMNTAMNT26 varchar2(100) ,
PYMNTDT27 varchar2(100) ,
PYMNTAMNT27 varchar2(100) ,
PYMNTDT28 varchar2(100) ,
PYMNTAMNT28 varchar2(100) ,
PYMNTDT29 varchar2(100) ,
PYMNTAMNT29 varchar2(100) ,
PYMNTDT30 varchar2(100) ,
PYMNTAMNT30 varchar2(100) ,
PYMNTDT31 varchar2(100) ,
PYMNTAMNT31 varchar2(100) ,
PYMNTDT32 varchar2(100) ,
PYMNTAMNT32 varchar2(100) ,
PYMNTDT33 varchar2(100) ,
PYMNTAMNT33 varchar2(100) ,
PYMNTDT34 varchar2(100) ,
PYMNTAMNT34 varchar2(100) ,
PYMNTDT35 varchar2(100) ,
PYMNTAMNT35 varchar2(100) ,
PYMNTDT36 varchar2(100) ,
PYMNTAMNT36 varchar2(100) ,
PYMNTDT37 varchar2(100) ,
PYMNTAMNT37 varchar2(100) ,
PYMNTDT38 varchar2(100) ,
PYMNTAMNT38 varchar2(100) ,
PYMNTDT39 varchar2(100) ,
PYMNTAMNT39 varchar2(100) ,
PYMNTDT40 varchar2(100) ,
PYMNTAMNT40 varchar2(100) ,
PYMNTDT41 varchar2(100) ,
PYMNTAMNT41 varchar2(100) ,
PYMNTDT42 varchar2(100) ,
PYMNTAMNT42 varchar2(100) ,
PYMNTDT43 varchar2(100) ,
PYMNTAMNT43 varchar2(100) ,
PYMNTDT44 varchar2(100) ,
PYMNTAMNT44 varchar2(100) ,
PYMNTDT45 varchar2(100) ,
PYMNTAMNT45 varchar2(100) ,
PYMNTDT46 varchar2(100) ,
PYMNTAMNT46 varchar2(100) ,
PYMNTDT47 varchar2(100) ,
PYMNTAMNT47 varchar2(100) ,
PYMNTDT48 varchar2(100) ,
PYMNTAMNT48 varchar2(100) ,
PYMNTDT49 varchar2(100) ,
PYMNTAMNT49 varchar2(100) ,
PYMNTDT50 varchar2(100) ,
PYMNTAMNT50 varchar2(100) ,
PYMNTDT51 varchar2(100) ,
PYMNTAMNT51 varchar2(100) ,
PYMNTDT52 varchar2(100) ,
PYMNTAMNT52 varchar2(100) ,

UPLOADED_USER NUMBER(4),
UPLOADED_DATE DATE,
REMARKS VARCHAR2(100 BYTE)
);


While running the above given query, The following error occurred And I don't know Where I did wrong. Please help me anyone
Error: Getting ORA-00957: duplicate column name

Answer

Remarks is the duplicate column here.

To find duplicates easily, run the query in Developer first. It will show you the line number that is hitting with an error message.

Take the line number and catch the column name. Use any Text editor to search for the column name. If you encounter the name somewhere delete it.

End of it.