Home » SQL & PL/SQL » SQL & PL/SQL » insert data into column same table (oracle,11.2.0.3,win 07)
insert data into column same table [message #643302] Sat, 03 October 2015 07:56 Go to next message
ORA456
Messages: 7
Registered: September 2015
Location: HYDERABAD
Junior Member
hi to all

create table ta1(no number(10),name varchar2(10),col3 varchar2(10),col4 varchar2(10));

insert into ta1(no,'name')values(1,abc);
insert into ta1(no,'name')values(2,abd);
insert into ta1(no,'name')values(3,$);
insert into ta1(no,'name')values(4,%);

select * from ta1;

no name col3 col4
1 abc
2 abd
3 $
4 %

but i want display using pl/sql code character in col3 and special character in col4

no name col3 col4
1 abc abc
2 abd abd
3 $ $
4 % %

please help me


Re: insert data into column same table [message #643305 is a reply to message #643302] Sat, 03 October 2015 08:48 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
you really should actually test SQL statements before posting them to this forum

SQL> create table ta1(no number(10),name varchar2(10),col3 varchar2(10),col4 varchar2(10));

Table created.

SQL> insert into ta1(no,'name')values(1,abc);
insert into ta1(no,'name')values(1,abc)
                   *
ERROR at line 1:
ORA-01747: invalid user.table.column, table.column, or column specification

Re: insert data into column same table [message #643306 is a reply to message #643302] Sat, 03 October 2015 09:22 Go to previous message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

It seems that "special character in col4" is just col3.

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

[Updated on: Sat, 03 October 2015 09:23]

Report message to a moderator

Previous Topic: HOW TO UPDATE ONE FIELD IN A TABLE BASED ON OTHER ?
Next Topic: Understand Difference between queries
Goto Forum:
  


Current Time: Wed Jul 15 11:35:58 CDT 2026