Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

pl/sql Procedure

kn_sivaramanDec 30 2009 — edited Jan 19 2010
HI,

i have table like this.

CREATE TABLE pr_temp(pr_no NUMBER,f_flg NUMBER(1));


INSERT INTO pr_temp VALUES(11,0);
INSERT INTO pr_temp VALUES(12,1);
INSERT INTO pr_temp VALUES(13,0);
INSERT INTO pr_temp VALUES(14,0);
INSERT INTO pr_temp VALUES(15,0);
INSERT INTO pr_temp VALUES(16,1);
INSERT INTO pr_temp VALUES(17,0);
INSERT INTO pr_temp VALUES(18,0);
INSERT INTO pr_temp VALUES(19,1);
INSERT INTO pr_temp VALUES(20,0);
INSERT INTO pr_temp VALUES(21,0);
INSERT INTO pr_temp VALUES(22,0);
INSERT INTO pr_temp VALUES(23,1);
INSERT INTO pr_temp VALUES(24,1);
INSERT INTO pr_temp VALUES(25,1);


0-success
1-failure


SELECT * FROM pr_temp WHERE f_flg=0 ORDER BY pr_no;

output FOR success;
-------------------
11-15;17-18;20-22;

(ie)11 TO 15 datas are success records,.....

SELECT * FROM pr_temp WHERE f_flg=1 ORDER BY pr_no;

output FOR failure;
------------------
12;16;19;23-25;

(ie)23 TO 25 datas are failure records,.....


i need a pl/SQL PROCEDURE.Please help me.


by
siva

Comments

RajenB

Thanks !

Nice way to start Python.

sp200064

Thanks, this is really helpful.

James G K

Good stuff, thank you!!

RajeshKhanna

A good way to start! nice job

RAL281_CL

Thanks,very way to start.

Where is Part 5 ??

Best Regards

Ricardo

3000272

Please share the Part 5 Videos

unknown-1040115

Please share the Part 5 Videos

Part 5 is up!

Enjoy!

LKR

3696832

So Good to see this..Shaft meets sharp head.

1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 16 2010
Added on Dec 30 2009
6 comments
1,405 views