-
Spliting data from single col into two columns
how can i create a sql to split data from a single column into 2 columns as below
col 1
Y
Y
N
N
into
Col A Col B
Y N
Y N
Thanks for your help.
Anan
-
I think the simplest way to accomplish this task is using Insert & delete statement:
Insert into Table(ColA)
select * from Table(Col1)
where Col1= 'Y';
Commit;
Insert into Table(ColB)
select * from Table(Col1)
where Col1<> 'Y';
Commit;
Then delete col1 if you wish
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|