|
|
Re: URGENT : HOW TO CALL A STORED PROCEDURE IN TRIGGER [message #204924 is a reply to message #204534] |
Wed, 22 November 2006 10:59 |
|
my dear MAHEER it is not working,
if the right way to do this then i have no need to put my questions in ora faq.
hope u understand my big brother.
any ways thanx for your reply.but dear i have still porblem in it.
i m using oracle database 9i ,and developer form 6i,
i want to genrate random number as ,
>select * from (select empno from emp
ORDER BY dbms_random.VALUE
)where ROWNUM<11;
i put this one as a PROCEDURE at the 'when button pressed' triger,but at COMPILE it give me error at
ORDER BY DBMS_RANDOM.VALUE.
i think so the problem in form's built-in packages.
so please tell me how can i include
dbmsrand.sql or dbms_Random
in the buit-in package.
i mean how i can include a package into the given built-in package list of form 6i.
plz help me
regards
|
|
|
HELP :: how to include a packge into built-in packages of form. [message #204926 is a reply to message #204504] |
Wed, 22 November 2006 11:03 |
|
hi all,
i m using oracle database 9i ,and developer form 6i,
i want to genrate random number as ,
>select * from (select empno from emp
ORDER BY dbms_random.VALUE
)where ROWNUM<11;
i put this one as a PROCEDURE at the 'when button pressed' triger,but at COMPILE it give me error at
ORDER BY DBMS_RANDOM.VALUE.
i think so the problem in form's built-in packages.
so please tell me how can i include
dbmsrand.sql or dbms_Random
in the buit-in package.
i mean how i can include a package into the given built-in package list of form 6i.
or othere possible way to perform the same action (random genration)
plz help me
regards
|
|
|
Re: HELP :: how to include a packge into built-in packages of form. [message #204955 is a reply to message #204926] |
Wed, 22 November 2006 20:50 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Quote: | if the right way to do this then i have no need to put my questions in ora faq
| Talk about "biting the hand that feeds you".
If you had posted your code then we would have known that you HAD made the call correctly and that your problem was elsewhere.
If you had read the SQL reference manual you would have found that you can only 'sort' by a column that has been retrieved. Therefore, retrieve dbms_random.value in your 'select' clause and then order by it. You can also order by the column number.
David
PS ALWAYS test your SQL at the SQL*Plus prompt before adding it to your Form. It saves a lot of time in the debugging process.
[Updated on: Wed, 22 November 2006 20:51] Report message to a moderator
|
|
|
Re: HELP :: how to include a packge into built-in packages of form. [message #205029 is a reply to message #204955] |
Thu, 23 November 2006 01:55 |
|
my dear ,
first all thanx for ur comment.
i have already check it out in my sql*plus editor.my query is working fine there.
but when i put it in my form 6i developer ,it give me the error .
my simple and stright forward question is:
HOW CAN I INCLUDE A PACKGE INTO THE BUILT-IN PACKAGE LIST OF DEVELOPER(FORM 6i):
SO TELL ME THE smart way to do it.if u know it.
|
|
|
|
|
|
Re: URGENT : HOW TO CALL A STORED PROCEDURE IN TRIGGER [message #205191 is a reply to message #205170] |
Thu, 23 November 2006 18:14 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Well picked Barbara. I didn't read the OP as a sub-query. I just, incorrectly, assumed that as the 'sort by' item wasn't in the main 'select' that that was the problem. Yes, I believe it is a SQL*Plus 2 versus SQL*Plus 3 issue. The query runs on my Oracle 9 database but not on my Oracle 7 (we don't have an 8 ).
David
[Updated on: Sun, 26 November 2006 18:48] Report message to a moderator
|
|
|
Re: How to include a packge into built-in packages of form (merged) [message #205299 is a reply to message #204504] |
Fri, 24 November 2006 03:41 |
|
TO MY DEAR
'LITTELFOOT' (WHO HAVE NO TIME FOR SUCH AN IDIOT PERSON LIKE ME.
FOR YOUR KIND INFORMATION I HAVE SOLVED MY PROBLEM BY USING VIEW .
SIMPLY.
CREATE OR REPLACE VIEW BALLOT AS SELECT * FROM (SELECT DISTINCT EMPNO FROM EMP ORDER BY DBMS_RANDOM.VALUE)WHERE ROWNUM<12;
THEN I HAVE CREATED A DATA BLOCK IN DEVELOPER USING THIS VIEW(BALLOT) AND SIMPLE USE "WHEN BUTTON PRESSED'TIRGGER > GO_BLOCK('BALLOT');
EXECUTE_QUERY;
HOPE U UNDERSTAND MY WAY,AND PLEASE IF U HAVE NO TIME FOR SUCH A STUPID PROBLEMS(WHICH ARE ONLY SUBMITTED BY ME).THEN PLEASE MIND UR OWN BUSSINESS.BECAUSE I M IN NEED OF FRIENDLY SUGGESTION NOT THE ORDER OF MASTERS.
THANX TO ALL MY DEAR SENIORS (SINCERELY)SPEACIALLY TO "BARBARA",WHO HELP ME AND GIVE ME THE POSITIVE WAY TO DO SOME THING.
KEEP IN TOUCH .
|
|
|