List of values less select query
HelloI have a list of fixed values say (2,3,5,7,11,13,...) (97) I want less this list with a query. How can I do this in oracle 9i sql.
ex:
Select (abovelist)
less
Select the value of a number;
I don't want to create the table with the top of the list and less there.
Kind regards
Vincent
Published by: user12152459 on November 2, 2009 22:08
Hello
Welcome to the forum!
If you want to treat these figures as lines in a table, without actually putting them in a table.
Here's one way:
SELECT column_value
FROM TABLE (sys.odcinumberlist (2,3,5,7,11,13, .. ...97))
--
MINUS
--
SELECT value
FROM numbers
;
Tags: Database
Similar Questions
-
Problem creating list of values query
Hi all
I am facing some problem with a simple list of Apex selection list item values query which is:
RETURN 'select distinct dd_type as d, dd_type as r from portal_02.WAVE_'||:P86_WAVE_ID||' @ DATABASE_LINK1 order by 1';
And I get this error during the execution of the page:
ORA-06550: line 2, column 99: PL/SQL: ORA-00942: there is no ORA-00942 table or view: table or view is no ORA-02063: preceding the line of DATABASE_LINK1 ORA-06550: line 1, column 13: PL/SQL: SQL statement ignored ORA-00942: table or view is no ORA-02063: preceding the line of DATABASE_LINK1
I placed also p86_wave_id cascading of parent elements.
Anyone has an idea why this is happening and how can I fix this problem?
Use: Apex 4.2.6 & Database 11g.
Concerning
Nabila
I was wrong.
You are positive that a value exists in the session state for P86_WAVE_ID? For your first attempt, one might think it was empty when loading the page, when he made everything that uses the list?
Ahh, there you get this when you try to save the definition of LOV, it is probably just trying to validate the request, made with a null value.
Not sure if you can get it to analyze at run time, but you could workaround with a wave_ object definition?
-
Hello
It is a condition, I had given in the report.
where AMMI_SALES_COMMISSION_V.ORDER_STATUS = (DECODE (:P_order_status,'All',AMMI_SALES_COMMISSION_V.ORDER_STATUS,:P_order_status))
The status of the order are (entered, booked, closed, canceled). And corresponding to the status of "registered".
There will be no any Invoice_Amount.
The user wants to select only records that with Invoice_amount when he choose ': ' P_order_status 'EVERYTHING '.
Can I get any solution for this?
Note: The statement of the list of values settings is:
Select distinct FLOW_STATUS_CODE from oe_order_headers_all
Union all SELECT 'All' DOUBLE ORDER BY 1Hello
The user wants to select only records that with Invoice_amount when he choose ': ' P_order_status 'EVERYTHING '.
What about using the below the line of query?
AND DECODE(:P_ORDER_STATUS','All',INVOICE_AMOUNT,0) IS NOT NULL
not tested.
-Clément
-
Drop-down list does not appear selected value
Hello
I have a problem. The output of a query results page. There are 2 fields must be updated: scholarshipID and amount. I want to update my request at a time. My dynamic drop-down list does not appear selected value. The value is there, but it does not recognize in the drop-down list. I could not find the error. My code is below, so please help...
< name cfquery = "getStudentsData" datasource = "#application. DSN #">"
Select StudentID, fname, lname, GPA, Tbl_Students.ID, ScholarshipID, rise, Tbl_StudentsScholar.ID as the SSID, AwardStatus
of Tbl_Students, Tbl_ApplyYear, Tbl_EduBckgrnd, Tbl_StudentsScholar
where Tbl_Students.ApplyYr = Tbl_ApplyYear.id
and Tbl_Students.id = Tbl_EduBckgrnd.SID
and Tbl_Students.ID = Tbl_StudentsScholar.SID
and ApplyYear = 1
and steps = 7
order by studentid
< / cfquery >
< name cfquery = "getScholarship" datasource = "#application. DSN #">"
Select AcctNum, scholarship, Tbl_Scholarships.id, Code
of Tbl_Scholarships, Tbl_DistCode
where Tbl_Scholarships.DistCode = Tbl_DistCode.id
AcctNum order
< / cfquery >
< cfparam name = 'X' default '0' = >
< cfparam name = default "CounterX" = "0" >
<!--get scholarship-->
< cfif getStudentsDataRet.RecordCount eq 0 >
< class p 'paragraph' = > No Records Found < /p >
< class p = "pageheight" > < / p >
< class p = "pageheight" > < / p >
< cfelse >
< class p = "submitmessage" > records found - < cfoutput > #getStudentsDataRet.Recordcount # < / cfoutput > < / p >
< table width = "98%" border = "1" cellpadding = "3" cellspacing = "0" style = "" border-collapse: collapse "bordercolor ="#000000"align ="center">"
< class tr = "steptext2" bgcolor = "#999999" align = "center" >
< td width = "10%" > Student ID < table >
< td width = "9%" > name < table >
< td width = "9%" > name < table >
< td width = "5%" > GPA Cum < table >
< td width = "5%" > account # < table >
< td width = "5%" > < table > amount
< td width = "20%" > account # | Dist Code | Scholarship name < table >
< /tr >
< do action = "updateAward.cfm" method = "post" name = "AwardForm" > "
< cfoutput query = "getStudentsDataRet" >
< cfif eq x 0 and x neq getStudentsDataRet.recordcount >
< cfset x = 1 >
< cfelseif x neq (getStudentsDataRet.recordcount + 1) >
< cfset x = x + 1 >
< / cfif >
< class = "paragraph" tr >
< td > #StudentID # < table >
< td > #lname # < table >
< td > #fname # < table >
< td > #GPA # < table >
< cfif AwardStatus eq 2 >
< name cfquery = "getStudentsScholar" datasource = "#application. DSN #">"
Select Code, Tbl_Scholarships.id, AcctNum, scholarships
of Tbl_Scholarships, Tbl_DistCode
where Tbl_Scholarships.DistCode = Tbl_DistCode.id
and Tbl_Scholarships.ID = #getStudentsDataRet.ScholarshipID #.
< / cfquery >
< / cfif >
< td >
< select name = "" scholarshipID_ #X # "onChange =" showMessage_ #X #(this.options[this.selectedIndex].value) ">"
< option value = "" > < / option >
< cfloop query = "getScholarshipRet" >
< option value = "" #id # "selected < cfif getStudentsDataRet.ScholarshipID eq id > < / cfif > > #AcctNum # < / option >"
< / cfloop >
< / select >
< table >
< td > < input name = "" amount_ #X # "type ="text"size ="5"< cfif amount gt 0 > value = ' #NumberFormat (amount, 99.99) # ' < / cfif > / > < table >"
< td > < cfif AwardStatus eq 2 > #getStudentsScholar.AcctNum # | #getStudentsScholar.Code # | #getStudentsScholar.Scholarship # | #getStudentsDataRet.ScholarshipID # < / cfif > < table >
"< input name =" "IndexID_ #x #" type = "hidden" value = "#SSID #" / >
< /tr >
< / cfoutput >
< cfoutput > < input name = "CounterX" type = "hidden" value = "" #getStudentsDataRet.RecordCount # "/ > < / cfoutput >"
< b >
< td align = "center" colspan = "11" height = "50" valign = "middle" > < input name = "Submit" type = "submit" value = "Submit" / > < table >
< /tr >
< / make >
< /table >
< / cfif >
the syntax is: getStudentsDataRet.ScholarshipID [1]
where '1' is the line number to specify
-
Join the query in a dynamic list of values query
I have a join query in a dynamic list of values query. The value does not return a value of text, but rather the value of the ID.
Is it possible to use a join query in a dynamic list of values query?
For example... in the query below, I expect to see ename in the drop-down list, but I see class_emp_id.
Select b.ename d, a.class_emp_id r
of class_emp a, b of the emp
where a.class_cat_id =: CURR_CLASS_CAT_ID
and a.emp_id = b.emp_id
order by 1
Thank you
ReidHey Reid,
The structure of the pairings/value of the item is incorrect - it should be: item1, item2, etc.: value1, value2, etc, so:
' f ? p = & APP_ID.: 50: & SESSION. ": P50_LP_ID, P50_LP_NAME, CURR_CLASS_CAT_ID: #LP_ID #, #LP_NAME #, #CLASS_CAT_ID #"
I guess that CURR_CLASS_CAT_ID does not use the prefix P50_?
Andy
-
List of input values (multi-column) must return the output text once the value is selected
Hello
I am trying to achieve conditional:
I create a searchVO(select '' empNumber from dual) - to accept the input value (name empNumber).
I create empLovVO (select enum,ename, addr, city of emp). lov attached to empNumber (searchVO).
In the list of values when I select a value (emp 1, a, xyz, abc), it must return the default aby associated with emp values 1 to my output texts
the name of the EMP one.
addr xyz
City abc
It should also automatically change the values if I select another empNumber.
Please let me know how to achieve this.
Thank youFirstly, for the searchVO, add a three other attributes, name, address, and City, the type of string:
and make sure they are still editable:
Then, you're mapped LOV enum attribute EmpNumber, right?
Do similar for the newly created attributes, in the list of values dialog box validation:
Ename--> name,
--> addr addr,
City--> City
Then, just to show these attributes in the form of output text, and you'll get what you want...
-
Can I use * and the list of the column names in a select query
PLSQL again. Can I use * and the list of the column names in a select query, i.e. Select *, col1, col2 from Mytable. When I do that my questions tend to the bomb. Can do in other databases.
Thank you
Mike
Hi, Mike,.
If there is something else in the more SELECT clause *, then * must be qualified with a table name or alias.
For example:
SELECT Mytable. *, col1, col2
FROM MyTable;
-
Passing selection several values in a query
I have a statement select mulit combines all the values selected by a: (item1:item2:item3) and so forth, to present that entry is passed to a query for results.
I need to pass this value to a query using 'where X (value mutliselect) '.
This will format the string correctly
Select "' | Replace (: p1_port, ':', "'|) ',' ||'' ') ||'' ' the double
and create output like > "ABU DHABI", "ANCHORAGE."
If I take it out and run it in this query, I get results:
SELECT distinct container_number,
Description,
container_seal,
date_of_arrival
OF apps.xahg_app_package_detail_v
Destination WHERE ("ABU DHABI", "ANCHORAGE")
But if I try to combine the 2 as this query:
SELECT distinct container_number,
Description,
container_seal,
date_of_arrival
OF apps.xahg_app_package_detail_v
WHERE IN destination (select "': replace (: p1_port, ':',"'|)) ',' ||'' ') ||'' (' double)
or even this one:
SELECT distinct container_number,
Description,
container_seal,
date_of_arrival
OF apps.xahg_app_package_detail_v
WHERE IN destination ("': replace (: p1_port, ':',"'|)) ',' ||'' ') ||'' ')
I will return no results... or a mistake by the way, I'm totally stumped here seems to be a fairly simple thing to make it work? It makes no sense, why would one hard-coded return values but parameter entries will not be... don't forget the hardcoded used n-cut-paste the results of the ' select "' | Replace (: p1_port, ':', "'|) ',' ||'' ') ||'' 'of the double' sample.
is there something that I am missing?
Thanks in advance,
JeremyTry this
SELECT distinct container_number,
Description,
container_seal,
date_of_arrival
OF apps.xahg_app_package_detail_v
WHERE INSTR (': ' |: p1_port |': ',' :'|| destination: ': ') > 0
;Just to clarify.
' :'|| : p1_port |': ' make sure your string is delimited by hyphens.
':'|| destination: ': ' make sure your string is delimited by hyphens.
If your destination is the string INSTR will return a positive value, 0 otherwise. I also assumed that nothingness: P1_port or destination may include the ":" character.
-
Slide to pause until that value is selected from a drop down list?
Hi there everyone.
I try to create a cover page of sorts for a simulation of system where the user is asked to enter his name and choose where they work in for a combo box (using the drop-down list box widget)
I have the name entry part work and the drop-down list box is displayed, but I'm having some problems with it.
First of all, as soon as a value is selected in the box is jumps to the next slide. I would have rather navigation controlled by a button that the user can make sure that they have chosen the correct value before continuing. Is there a way to do this?
Hello
This is the craziest question, but think I found the reason: Although the widget looks a lot smaller in edit mode, when opening it (preview or published) it falls above the button. When I have it away, seems to work. Can you confirm?
Lilybiri
-
How to render components based on the value selected in a list of values
Hello
I created a form of the ADF. I have a drop down that is a list of values. I want to toggle certain fields based on the values selected in the menu drop-down. Could you please let me know how to do it in the ADF?
Kind regards
MurielleHello
It should work. It is important to note that in case you use a component selectOneChoice for category then the value returned by #{bindings. Category.inputValue}
is the index of the selected value in the list and not the value auto. To get the value, you must use ' #{bindings. " Category.attributeValue}"in the disabled state.If the problem is no display of code in your page to take a look.
Gabriel.
-
Check var PL/SQL in an if STATEMENT with a list of values returned by a SELECT?
I have a variable in my PL/SQL code, and I want to check if the value of the var is in a list of values. This list of values I want to get directly from a select statement. I can do something like below:
IF (v_var1 in (select col1 from <table> where <condition>)) THEN <do something> ELSE <do something else> END IF;
And rownum = v_loop will not work for rownum anything to 1.
You can try something like:
SELECT COUNT (1) INTO v_row_count FROM
WHERE
; IF (v_row_count = 0) THEN ELSE v_loop := 1; FOR I IN (SELECT col1 FROM WHERE
) LOOP v_sel_val1 := I.col1; IF (v_var1 = v_sel_val1) THEN END IF; END LOOP; Cascading list of values &; query
Hi all! ADF BC JDev 11
I use Cascading list of values in the search query pane. I build CLOV as in this example http://www.oracle.com/technology/obe/obe11jdev/11/adfbc_new_features/adfbc.html.
But when I use it in the search query pane it does not work. :(((
I thik I need to put partial triger field details LOV. How can I do?
Help!
Published by: Victor_V_S on 23.11.2009 07:45Autosubmit property of first LOV attribute set to true in the panel display object of advice.
or in the second set LOV attribute depending on the LOV first attribute in the attribute view object dependencies tab
[http://blogs.oracle.com/smuenchadf/2009/11/cascading_lovs_ensuring_the_ma.html]
SQL query: How to list the values in the IN operator
Hello
I'm going through a list of values to the location of < > in < list >
I don't want to use dynamic cursors (REF CURSOR). Is this possible using Oracle SQL?
Please let me know.
My program:
DECLARE
...
list_of_ids: = '10, 20, 30';
...
SELECT MAX (sal) IN the max_sal FROM Employees WHERE emp_id IN (list_of_ids);
...
END;
/
Thanks in advance,
NikoYou do not want a list separated by commas. You want to move a collection. Then
CREATE TYPE num_tbl AS TABLE OF NUMBER; DECLARE l_list_of_ids num_tbl := num_tbl( 10, 20, 30 ); BEGIN ... SELECT max(sal) INTO max_sal FROM employee WHERE emp_id IN (SELECT * FROM TABLE( l_list_of_ids )); ... END; /
Justin
Select list first value problem using AJAX
Hello
I've implemented the list of selection in AJAX by allusion to Denes Kubicek - http://apex.oracle.com/pls/otn/f?p=31517:119:3737449055187298:NO. I have only 2 selection lists. The AJAX functionality doesn't quite work for the first selected value in the list select a first. I get not all values in second SelectList when the first value is selected in the first SelectList. It works very well for the rest of the values in the first selection list. I kept a few warning messages to debug JavaScript. I think the problem is with the function below,
get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
= States_In_County', 0);
Get.Add ('F109_AJAX_COUNTY', html_GetElement (pThis) .value);
gReturn = get.get ('XML');
For the first value in the first list of Select, gReturn.getElementsByTagName("option").length; Returns 0.Hello:
What is the value of the 'back' of the article 1st of the 1st list select? The value is compatible with the data type of the column of wl.location_id?
CITY
Select the first value in the list of values when running in poplist
Hello
IM using forms 6i. I filled the poplist by request. But what I need, I want to choose the first value in the list of values when running...
That is to say, during execution, the poplist should have chosen its first value in the list of values.
What to do...
Concerning
SeryWHEN CREATING a RECORD of the block of the list item or after the filling of the list item, you can write
: my_list_item: = GET_GROUP_CHAR_CELL ('my_list_item', 1); / * If the data type of the item in your list is character.*.
Here, instead of 1, you can give any clue... 1: value to the first list item position
Maybe you are looking for
-
iPhone 3GS water drop smell of Nail Polish
Hi all! I recently had the misfortune to put my iPhone 3GS (Opaque) glass that had water in it. I was playing music and trying to amplify them. He had no water in it, but the speaker stopped in a few seconds and I realized what happened. I took out t
-
Hello.. Where applications are downloaded on? Thanks in advance! Carolyn
-
Standalone screen as a second monitor
Hi community Can I use use a stand-alone (for example Samsung) screen as a second monitor with my iMac 21.5 inches (end 2013)? V OS X Yosemite 10.10.5 (14F1021) Processor Intel Core i5 at 2.7 GHz 8 GB 1600 MHz DDR3 memory Intel Pro Iris 1536 MB graph
-
I just installed windows 7 on my compaq presario sr1819uk pc that had originally xp.when of windows that I start my pc from sleep mode, the audio does not work and I get the message that it is there no sound on my pc, similarly when I go into Device
-
Microsoft security essential 0x8007042c error code
Was online is about to download the 2007 office program, I clicked on something somewhere on the page, and then several windows started popping up everywhere. I couldn't close them so I closed my computer by pressing the power button. When I logged o