selecting random recordset [message #404267] |
Thu, 21 May 2009 02:48 |
prachij593
Messages: 266 Registered: May 2009
|
Senior Member |
|
|
create table order_dtls( cutomer_id number(10), order_id(7));
insert into order_dtls values(1234567,1);
insert into order_dtls values(1234567,2);
insert into order_dtls values(1234567,3);
insert into order_dtls values(1234567,4);
insert into order_dtls values(1234567,5);
insert into order_dtls values(1234461,1);
insert into order_dtls values(1234461,2);
insert into order_dtls values(1234461,3);
insert into order_dtls values(1234761 ,1);
insert into order_dtls values(1234761 ,2);
insert into order_dtls values(1234761 ,3);
insert into order_dtls values(1234761 ,4);
insert into order_dtls values(1234761 ,5);
insert into order_dtls values(1234761 ,6);
insert into order_dtls values(1234761 ,7);
insert into order_dtls values(1234467 ,1);
insert into order_dtls values(1234467,2);
insert into order_dtls values(1234467 ,3);
I am getting a value for order_id from some function and now need to get the random customer_id with all order_id's
which have order_id value 3 but not those which have order id values more than 3
|
|
|
|
|
|
|