Link to home
Start Free TrialLog in
Avatar of Swadhin Ray
Swadhin RayFlag for United States of America

asked on

SQL in Oracle

Hello Experts,

I have a table as below:
create table TE
(
col1 varchar2(10),
COL2 number,
COL3 NUmber
);

Open in new window


Data in Table:
insert into TE values('A',1,1);
insert into te values('A',2,1);
insert into TE values('A',3,1);
insert into te values('B',1,1);
commit;

Open in new window


Output of the table:
select * from te;

OUTPUT:
COL1,COL2,COL3
A	1	1
A	2	1
a	3	1
B	1	1

Open in new window


REQUIRED the output as below:
OUTPUT:
COL1,COL2,COL3
A	1	1
 	2	1
 	3	1
B	1	1

Open in new window

SOLUTION
Avatar of flow01
flow01
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Swadhin Ray

ASKER

not on SQL PLUS
In which program u want this output?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As asked in SQL for which rating as B
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

If you answered this yourself, why not accept your post as the solution instead of selecting something that didn't answer the question and give a "B" grade?
Because what flow01 said is also correct , we can also get the same result but my question was to achieve it on by writing a SQL.

If you think my decision is incorrect then assist me to do the needful.
I'll let flow01 make the decision.  I was just wondering.
Slobary,  

<<not on SQL PLUS >> so my post didn't provide the solution you wanted.

Knowing that answer I would have gone in the direction of the rank , but you provided that solution yourself and first .
Keep the points.
Not able to split the points . When I am trying it getting stuck .

Request if admin can split and close this .
POST : ID: 39065430 (300 points ) &  ID: 39065451 (This is my post with the SQL).

Thanks,
Sloba