Home » SQL & PL/SQL » SQL & PL/SQL » SQL Query Update (11g )
SQL Query Update [message #657837] Thu, 24 November 2016 00:49 Go to next message
glmjoy
Messages: 187
Registered: September 2011
Location: KR
Senior Member
CREATE TABLE FREIGHT_DETAILS
(
BL_REFERENCE_NO CHAR(12 BYTE) NOT NULL,
FREIGHT_CODE CHAR(5 BYTE) NOT NULL,

)

table created.

Insert into FREIGHT_DETAILS Values ('201611020005','00123')

row created.


alter table Freight_Details Add(FREIGHT_YN CHAR(1) Default 'N')

ERROR at line 1:
ORA-01403: no data found


Re: SQL Query Update [message #657838 is a reply to message #657837] Thu, 24 November 2016 00:56 Go to previous messageGo to next message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
Please do not fake your results. What you have posted is pretending to be a copy/paste, but it isn't. You need to show what you actually did, and remember to use [code] tags to format it correctly.

When I correct the code, it works for me.

[Updated on: Thu, 24 November 2016 00:57]

Report message to a moderator

Re: SQL Query Update [message #657839 is a reply to message #657837] Thu, 24 November 2016 01:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Once more:
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals, as solution depends on it.

Use SQL*Plus and copy and paste your session, the WHOLE session.

[Updated on: Thu, 24 November 2016 01:24]

Report message to a moderator

Re: SQL Query Update [message #657840 is a reply to message #657839] Thu, 24 November 2016 01:24 Go to previous messageGo to next message
glmjoy
Messages: 187
Registered: September 2011
Location: KR
Senior Member
Thanks for help it was generating error due to trigger
Re: SQL Query Update [message #657845 is a reply to message #657839] Thu, 24 November 2016 06:11 Go to previous message
msol25
Messages: 396
Registered: June 2011
Senior Member
Hi,

Table is altered for new column.I removed extra comma for freight_code column in create table script.


//table created.

CREATE TABLE FREIGHT_DETAILS
 (
 BL_REFERENCE_NO CHAR(12 BYTE) NOT NULL,
 FREIGHT_CODE CHAR(5 BYTE) NOT NULL
 );

//row created.

 INSERT INTO FREIGHT_DETAILS
 VALUES ('201611020005','00123');


COMMIT;


//Table Altered

ALTER TABLE FREIGHT_DETAILS 
ADD(FREIGHT_YN CHAR(1) Default 'N');


[Updated on: Thu, 24 November 2016 06:11]

Report message to a moderator

Previous Topic: complex query
Next Topic: Please provide best approach to design ETL in Oracle.
Goto Forum:
  


Current Time: Sat Apr 20 05:57:32 CDT 2024