SQL & PL/SQL :: Procedure To Display Data From Drop Down List
Feb 6, 2012
I have to write a proc to display data based on user input for t_grp, and it should exclude grp0
So below is the proc I have written, and I want to display the report for all t_grp when user gives user_input as All or gives null. How can I acheieve this is in procedure.
i have a tabular form based on table namely mm_dtl. in that form i created two text_item.one is drop down list with values such as sbno,desc,pno,desc1,pno1(columns names),and another text_item is just unbound one.
when i select sbno in first text_item from list and enter sbno in second text_item..then all the record with sbno entered in second text_item shud get display in tabular form.same like this for other values of the list.
I have one drop down list box from which i want to do add or copy the values chosen from the list to another text box and then using this copied values ,i will pass them as parameters to run report.This list is getting populated using recordgroup and then what ever user chooses , it will be added to the another text box with space or delimiter.
i'm issuing drop procedure generatePasswordForEportalUser
i have an
error ORA-00600: [kqlobjlod-no-result-from-proc$], [1403], [659858], [], [], [], [], [], [], [], [], []. i found on metalink then Doc ID 1267554.1
is about this error i'm using oracle 11.2.0.3 in this document there is an info that 11.2.0.2 solves the issue Interesting thing is that select * from user_procedures where upper(object_name) like upper ('generatePasswordForEportalUser');
generatePasswordForEportalUser6598581PROCEDURENONONONONODEFINERobject name is in lovercase it was created by create procedure generatePasswordForEportalUser asbeginnull;end ;without " name " why it is in lowercase in data dictionary
I've to create a table every time a procedure is run, initially the table should be dropped and then created every time. From this procedure, the table is neither created nor dropped.
I cant track the error. Why is it so?
CREATE OR REPLACE PROCEDURE TESTPROC IS S_SQL VARCHAR2(1000); BEGIN S_SQL := 'DROP TABLE MYTEST PURGE'; EXECUTE IMMEDIATE S_SQL; [code]........
order = the sequence in which they are to be displayed a sub-heading's heading_id refers to the parent heading, likewise an item's sub-heading_id refers to the parent sub-heading.
I assumed there was no need to track child content.
Now, the output format should be something like this, where the sub-headings are not repeated, nor are the items. Sort of like chapters in a book, things in a catalogue, or even topics in a forum.
Where I'm getting hung up is how to query the data so it's quick, efficient, clean and easy to read and maintain. I've only gotten to listing the sub-headings and already the query looks convoluted. So, how should I approach this? Should it be done all in one query, and always checking against the results to know when to print a new heading or sub heading. Or should I run multiple queries and save the results to a variable, and then run sub-queries off that? Is there a better way to do this, am I going about it the hard way or am I in the right direction and just haven't gone far enough with it yet?
I am not sure if this is even possible however I will give it a try here. is there a way to take a value from an In List that doesn't exist in the table and get SQL PLus to output that value with an assigned decode construct. example.
1 select decode(count(object_name),1,'EXIST',null,'NOT EXIST',0,'NOT EXIST'), 2 object_name, object_type 3 from dba_objects where object_name in ( 4 'GV_$METRICNAME', 5 'GV$METRICNAME', 6 'GV_$METRICGROUP', 7 'GV$METRICGROUP', 8 'ABC' 9 ) 10* group by object_name, object_type SQL> /
I am using Apex 4.1 and I have a select list in my page. I know i can access the value of the selected item by :P1_SelectList, but I would like to know how to access the display value of the selected item.
i am using List Manager Item .i have use List of values (lov)
SELECT LD.LOOKUP_NAME d ,LD.ID r FROM CRM_LOOKUP_MAS LM, CRM_LOOKUP_DTL LD WHERE LM.LOOKUP_ID=LD.LOOKUP_ID AND LM.LOOKUP_TYPE='TRAVEL RHYTHM' and LD.ACTIVE_FLAG='Y' order by LD.LOOKUP_NAME }
when i click to add new value and click then pop up window open with LD.LOOKUP_NAME display value but when i click on add Button then value added in to below box with LD.ID
i want to display here my LD.LOOKUP_NAME value into below box.
I've gotten it to display the percentage of markup correctly(as in, multiplied by 100 with no decimal places), but I cannot for the life of me get the percentage sign to display on the right of the values(i.e. 40, but not 40%).
Here's my code so far:
SELECT title, to_char(round((retail-cost)/retail*100), '99') AS "MARKUP %" FROM BOOKS;
I've tried concatenating with both the + sign and the ampersand (&) sign, to no avail.
I have Select list itemS based on Lookup tables. When the form in Edit mode, I want to prevent the end user from changing the value of these Select list items. How can I accomplish this ??? **If I change the type of the item to Display only, then it will show the returned value of the Select list.
I've installed XE and I want to know what accounts are active. If I log in to SQL*Plus as sys as SYSDBA how can I display a list of all user and admin accounts? I want to know who can log in.
Begin open p_result for select distinct d.dname, d.loc, e.empno, e.job from dept d, emp e where d.deptno=e.deptno; fetch p_result into v_dname,v_loc,v_empno,v_job; dbms_output.put_line(v_dname||' '||v_loc||' '||v_empno||' '||v_job); end;
This is throwing me error saying " ORA-06550: line 7, column 15: PLS-00103: Encountered the symbol "REFCURSOR" when expecting one of the following:"
I would like to know if it is possible to get the arguments of a function (or procedure), in the same way as - for example - the "arguments" object in JavaScript.
I have seen the table ALL_ARGUMENTS, for example, that is providing a lot of interesting details, but I still miss the most important for me: the values of the arguments, not only the name, or type, etc...
Something that could be called as soon as the function (or procedure) is run, at the beginning of its process, and that would give a kind of array of arguments values.
Error report: ORA-06550: line 3, column 19: PLS-00225: subprogram or cursor 'LOGIN_USER' reference is out of scope ORA-06550: line 3, column 19: PL/SQL: Item ignored ORA-06550: line 4, column 18:
The current update store procedure that I have updates a list of input provided, but it there are fields that are left blank, they are being updated as null in the database.
I'm having a trouble creating a store procedure that will just update the provided fields only.
I need a stored proc that takes list of ids as input parameters. For all these Ids. the proc will send out data from another table as out ref cursor. Sounds very simple yet I am stuck with how do I pass the input list of ids.
I would like to increase the size of my redo logs. For this I need to drop & recreate them. I have read the Oracle doc [URL] which covers this however :
I have both "normal" and "standby" redo logs (see below) on my primary database - can I drop the standby redo logs? Do these have a link to the redo logs on the standby database?
SQL> SELECt * from v$logfile order by 1;
GROUP# STATUS TYPE MEMBER ---------- ------- ------- ------------------------------------- 1 ONLINE D:ORACLEORADATAREDO01.LOG 2 ONLINE D:ORACLEORADATAREDO02.LOG 3 ONLINE D:ORACLEORADATAREDO03.LOG 4 STANDBY D:ORACLEORADATASTDBYREDO04.LOG 5 STANDBY D:ORACLEORADATASTDBYREDO05.LOG 6 STANDBY D:ORACLEORADATASTDBYREDO06.LOG
I need to drop standby database completeley and rebuilt physical standby for the same database. We identified there are lot of inconsistencies between primary and standby. How do i need to remove the standby? And what is the best procedure?
I have a table named PRODUCT (ID Number , ProductImage BLOB). I have inserted some records in. I want to create a form for user to view this table.
When I create Data Block, in Data Block Wizard, if I select option 'Table or View' to retrieve data, it's ok (Data type of item ProductImage is Image, when I run form and query, it display image normally).BUT, I want to retrieve data from stored procedure in a package. This is my package
PACKAGE my_pkg IS TYPE my_rec IS RECORD ( myID PRODUCT.ID%TYPE, myImage PRODUCT.ProductImage%TYPE );
[code].....
I select option 'Stored Procedure' in Data Block Wizard, then select my stored procedure (my_pkg.Do_Query). Next I choose 2 columns from my stored procedure (ID, ProductImage). The wizard still applys data type of ProductImage as Image. I finish Data Block Wizard and Layout Wizard... run form, query and an error message display:
FRM-40364: The data type of item 'ProductImage' does not match the corresponding column in the stored procedure.
I try to change 'myImage PRODUCT.ProductImage%TYPE' -> 'myImage BLOB' in my package but still get that error.