Sql problem in apex LOV
I am not able to use this SQL statement for apex LOV, any ideas?
select username, id
from abusers
order by decode(id,0, NULL ,username) NULLS FIRST ;
I get the following error message:
1 error has occurred
* LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
Re: How to concatenate two sql statements?
Hi
Remove the semi-colon at the end.
Cheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;)
Similar Messages
-
Problem with Apex hosted SQL Workspace
Hi,
I am having trouble with using currval on this site in SQL workshop. I have a demo table and have defined a sequence via sql. I successfully insert a sequence_name.nextval but when I try to add a related child record with current value of the sequence I keep getting this:
ORA-08002: sequence ORDERS_ORDER#_SEQ.CURRVAL is not yet defined in this session
I can check on nextval from dual and I can select the currval from dual also but when I try to use the currval in an insert, I get the same error above. Also, sometimes I get the same message even when selecting currval from dual. Seems like a problem with Apex at this hosted site. Or does Apex SQL workshop have issues with currval.
PMScott, Can you explain a little more about the difference between a hidden item that is set to display never & the other type of item which I am assuming is "display as text saves state" and display never?
When I viewed the source for both of these I could not see the items in source code.
Also for an item that is passed into a popup I am exposing hidden item's identity is there a different way to pass values... here is my example:
<!-- Begin of popup for DNS_NAME -->
<script language="JavaScript" type="text/javascript">
<!--
<!-- window size was 800*600 -->
<!-- window size was 400*300 -->
function popupPage(url) {w = open(url,"winDnsName","Scrollbars=1,resizable=1,width=500,height=450"); if (w.opener == null) w.opener = self; w.focus(); }
//-->
</script>
<script language="JavaScript" type="text/javascript">
function callDnsNamePopup (IPId) {
var IPId = document.getElementById('P103_IP_ID').value;
var url;
url = 'f?p=110:106:2066309280674317::::P106_IP_ID:' + IPId;
w = open(url,"winDnsName","Scrollbars=1,resizable=1,width=800,height=600");
if (w.opener == null)
w.opener = self;
w.focus();
</script>
<!-- END of popup for DNS Name -->
At the same time if I set an item as hidden and display never I cannot use it with a call to a popup... -
Bind variable problem in cascading LOVs
Hi,
after upgrade from APEX 3.0 to 3.1 all my cascading LOVs stopped working correctly. First level LOV is OK, but the second level LOV, which contains a bind variable in its SQL code, fails. Debugging shows that the bind variable referrencing to the value of the first level LOV is empty. It has worked without problems in 3.0. The bind variable format is traditional :ITEM
This is an example of the LOV SQL:
SELECT PSKUP_CZ display_value, ID return_value
FROM PSKUP
WHERE sk_id = :P1_SKUP
ORDER BY 1
Where :P1_SKUP refers to the vaule of the top level LOV.
In Oracle® Database Application Express Release Notes Release 3.1 in chapter "3 Open Bugs and Known Issues", I've only found a short remark called "Problems with Queries Containing a Bind Variable and a String with Two Dashes". The recommended solution here was to use v('P18_X') instead of :P18_X
I tried that but with no effect on my problem.
Anybody has similar experience? Any workarounds?
Thanks in advance,
ZdenekHi Zdenek,
DV, NV, V are an optional component of the ApexLib framework. Actually they don't have anything to do with the framework itself.
Because of the nature of this functions they have to have a hard coded reference to the FLOWS_XXX schema, but which causes problems if APEX is upgraded to a new version and the functions are not altered.
I will probably removed them from the installation instructions or add a big remark that they have to be altered after an upgrade, because this kind of threads are re-occurring after each new released APEX version.
Thanks
Patrick
My APEX Blog: http://inside-apex.blogspot.com/
The APEX Builder Plugin: http://builderplugin.oracleapex.info/ New
The ApexLib Framework: http://apexlib.sourceforge.net/ -
Problem upgrading Apex 2.1 to 3.2.1 in Oracle Database 10g Express Edition
G'Day Apex gurus,
I installed Oracle Database 10g Express edition in my Windows XP PC which comes with Apex 2.1 with no problems. Then I wanted to upgrade Apex 2.1 to 3.2.1 (Currently Apex download in OTN) following the document below:
http://www.oracle.com/technology/products/database/application_express/html/3.1_and_xe.html
I went to the steps:
@apexins SYSAUX SYSAUX TEMP /i/
Then to change the password for the admin account run apxchpwd.sql and when prompted enter a password for the ADMIN account.
@apxchpwd
with not problems
Then I connected to SQL*Plus as SYS by:
sqlplus /nolog
CONNECT SYS as SYSDBA
Enter password: xxxxxxxxxxx
but when I tried to run:
@APEX_HOME/apex/apxldimg.sql APEX_HOME
where APEX_HOME is Apex3.2.1 in my case
SQL> @Apex3.2.1/apex/apxldimg.sql Apex3.2.1 (I get the messages below)
PL/SQL procedure successfully completed.
old 1: create directory APEX_IMAGES as '&1/apex/images'
new 1: create directory APEX_IMAGES as 'Apex3.2.1/apex/images'
Directory created.
declare
*+
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
The system cannot find the path specified.
ORA-06512: at "SYS.DBMS_LOB", line 523
ORA-06512: at "SYS.XMLTYPE", line 287
ORA-06512: at line 15
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Commit complete.
timing for: Load Images
Elapsed: 00:00:00.17
Directory dropped.
Can anyone help me in how to trouble shout this?
I tried to continue by following the steps document
@APEX_HOME/apex/apxxepwd.sql password
(where password is the password of the Application Express internal ADMIN account)
but when I tried to login in:
http://localhost:8080/apex/f?p=4550:1
when I type the credentials
system
system
systempassword
nothing happens
or even If I try:
http://localhost:8080/apex/f?p=4550:10
admin
adminpassword
nothing happens here too.
I appreciate any help
Kind regards
CarlosMy database version is 10.2.0.1.0 Oracle express.
Operating system is Windows Vista.
I started installing using the following commands.
@ C:\temp\apex\apexins.sql
it prompts me for the values of sysaux sysaux temp and c:\temp\apex\images\
If I supply the value for images the sqlplus window closes after scrolling a lot of info.
Enroute it also prompts me for a value for 9:
I don't know what the input shall be.
Then it again stops at enter value for version:
I used 3.2.1.0
The window scrols a while and closes.
later I changed the password and ran the command.
@c:\temp\apex\apxldimg.sql c:\temp
but no success with installation.
the output is as following.
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 27 18:13:43 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect system/sairam as sysdba;
Connected.
SQL> @ c:\temp\apex\apxchpwd
Enter a value below for the password for the Application Express ADMIN user.
Enter a password for the ADMIN user []
Session altered.
...changing password for ADMIN
wwv_flow_security.g_security_group_id := 10;
ERROR at line 3:
ORA-06550: line 3, column 5:
PLS-00201: identifier 'WWV_FLOW_SECURITY.G_SECURITY_GROUP_ID' must be declared
ORA-06550: line 3, column 5:
PL/SQL: Statement ignored
ORA-06550: line 4, column 5:
PLS-00201: identifier 'WWV_FLOW_SECURITY.G_USER' must be declared
ORA-06550: line 4, column 5:
PL/SQL: Statement ignored
ORA-06550: line 5, column 5:
PLS-00201: identifier 'WWV_FLOW_SECURITY.G_IMPORT_IN_PROGRESS' must be declared
ORA-06550: line 5, column 5:
PL/SQL: Statement ignored
ORA-06550: line 8, column 23:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 7, column 15:
PL/SQL: SQL Statement ignored
ORA-06550: line 13, column 32:
PLS-00364: loop index variable 'C1' use is invalid
ORA-06550: line 12, column 9:
PL/SQL: Statement ignored
ORA-06550: line 19, column 5:
PLS-00201: identifier 'WWV_FLOW_SECURITY.G_IMPORT_IN_PROGRESS' must be declared
ORA-06550: line 19, column 5:
PL/SQL: Statement ignored
Commit complete.
SQL> @c:\temp\apex\apxldimg.sql c:\temp
PL/SQL procedure successfully completed.
Directory created.
if wwv_flow_utilities.db_version_is_at_least('11') then
ERROR at line 32:
ORA-06550: line 32, column 25:
PLS-00302: component 'DB_VERSION_IS_AT_LEAST' must be declared
ORA-06550: line 32, column 3:
PL/SQL: Statement ignored
PL/SQL procedure successfully completed.
if wwv_flow_utilities.db_version_is_at_least('11') then --11g only
ERROR at line 16:
ORA-06550: line 16, column 25:
PLS-00302: component 'DB_VERSION_IS_AT_LEAST' must be declared
ORA-06550: line 16, column 3:
PL/SQL: Statement ignored
Commit complete.
timing for: Load Images
Elapsed: 00:00:00.32
Directory dropped.
SQL>
Does this require XE 11 or anything else.
This will happen even if I supply as following(closing of sqlplus in the begining).
@ C:\temp\apex\apexins.sql sysaux sysaux temp c:\temp\apex\images\
Any help. -
Is there a problem using popup LOVs in a portal form with a bind variable?
I have a portal form with 2 LOVs. The second LOV is a dependent LOV whose bind variable can be NULL. I have read Note 263923.1, "How To Create Dependent Lovs In Forms", and my form works as long as I use combo boxes to display the LOVs. I need to use popups so the user can search the LOVs as they are quite lengthy. Plus I want to be able to pick a value from my second LOV without selecting a value from the first LOV -- hence, my bind variable can be null and that is where my problem lies. As long as I select a value from the first LOV, the second LOV popup will work. If I click on the icon to display the second LOV without pre-selected a value from the first LOV, I get the following error:
POPUP LOV ERROR:
LOV: "9A17692880B6B8509F514F5B9CA9EC808DD403218B3CF19A33C04CD1FAB0ADE17ADC33E6B67998A933357CE5264D204E"
Parse Message: Parse as pre-set global: "TORE".
Find Message: LOV is of type DYNAMIC (LOV based on SQL query).
Query: "SELECT ...."
wwv_bind.prepare_bind: ORA-01403: no data found
My form is based on a table with a custom layout. The sql for the second LOV is similar to: SELECT ENAME, EMPNO FROM SCOTT.EMP WHERE (DEPTNO = :DEPT AND :DEPT IS NOT NULL) OR :DEPT IS NULL.
Thanks in advance for any help,
CarolDon't use EPS any more! It does not support transparency nor color management.
If you save vector files from Illustrator, use AI with PDF compatiblity.
If you save image files from Photoshop, use PSD.
If you save image files combined with vector forms and/or text from Photoshop, use PDP which is a Photoshop PDF.
For vectors from Illustrator use CMYK files.
For images use RGB, conversion to CMYK should never done before PDF export, better, if the printer allows it, is to export a PDF with live transparency as it is PDF/X-4
If the printer requires a PDF with CMYK only export a PDF/X-1a. -
Date popup problem in APEX 3.1
Hi
I have a date picker (DD-MM-YYYY HH24:MI) and after upgrading to APEX 3.1 from APEX 3.0.1 the popup window height is too small.
The end user is having to resize the window to click on the OK button.
Is there a file I can edit to increase the height, couldnt find it in templates/themes.
Regards
AdamHi Adam,
This is a bug in APEX 3.1. It was discussed here:
Apex 3.1 Upgrade Issue - dba_lock and date picker display
and here:
Date Picker problem in Apex 3.1
I'll let Carl investigate and provide an official response and recommendation. Although I know where this problem is occurring.
The size of the popup calendar window is hard-wired in the file apex/images/javascript/apex_3_1.js. In APEX 3.0, the size of the popup window was determined programatically at runtime and was a function of the date format, if it included a time component or not.
The uncompressed, readable version of this same file is in apex/images/javascript/uncompressed/apex_3_1.js. Look for p_DatePicker and you'll see what I'm talking about. You'll see the height is hard-wired to 210 and width to 258. In APEX 3.0, the height was set to 255 if the date format contained a time component.
So my suggestion, until Carl provides an official response, is to look for '210' in apex/images/javascript/apex_3_1.js and change this to 255. Granted, all calendar popup windows will be this big, but it won't put as great a burden on the end-user.
I hope this helps.
Joel -
Is it possible to use the SQL Loader within APEX? I want to have a table updated from a csv file... normally I would use the WWV_FLOW_FILES table, but with this file it mixes tabs and commas within the data, so creating a reliable upload script is getting to be a complete nightmare. I'd like to leverage the sql loader so I can specify the delimiter, optional quotes etc. The file will be in the same location on the file system so a scheduled, automated process would be perfect.
If so, does anyone know of a tutorial that might help me out?I really hate computers. I do. I should know by now that it would of course install properly once support is engaged.
It installed properly just now. I was installing to get the error message to send to you. No changes were made yesterday, it's the same schema, same options for installing. I didn't restart any services or reboot the server.
It just works now.
I've been working with computers since 1982 and their capacity for knowing when support people are around continues to astonish me.
I am getting 'no data found' but I was really only installing it to get the error message, so I may have skipped a step.
Thanks all for the prompt replies. -
Hi All,
Is there any way to call the sql loader in Apex to load the table with csv data.
Thanks in advance
DhanDo you need the application to load data for users as a function or are you just trying to load some data. Application Express has loading/unloading utilities from the main workspace menu that you can use for one time loads.
-
Problem in using LOV for validation-JHS 10.1.3
Hi all,
This problem was also noticed by Phil McDermott (Problem in using LOV for validation-JHS 10.1.3
I am following the demo and I noticed that the Use LOV for Validation functionality does not work on the browse page. However, it does work on the details page!
Another effect of this problem is that once you tried to validate on the browse screen, the lov button does not work anymore.
Thanks, Joep
Just found out that is does not work when entering "ph" like suggested in the tutorial. When I enter "p" and then tab to the next field, the lov popup does show.
Message was edited by:
Joep HendrixThanks for your reply Steven.
I had the same problem as Joep reported here, following the steps at:
http://www.oracle.com/technology/products/jdev/tips/muench/jhstutorial/index.html#genandrunagain
Your solution works for me.
The "completed version of the tutorial application" also has this issue:
http://otn.oracle.com/products/jdev/tips/muench/jhstutorial/MyDemo.zip
Are there any other known issues for this tutorial? Where can I find such errata list?
many thanks
Jan Vervecken -
SQL to get a LOV based on a value range (zips based on zipcode range)
I have a requirement to capture state,county,city and zipcode values based on AR Tax tables. I created an DFF with Input field for State, County and City and corresponding LOVs based on the tax tables. I am not sure how to proceed with zipcode (I am not a FORMS expert, that further makes it complicated :) )
For those who are aware of the tax tables - AR_LOCATION_VALUES and AR_LOCATION_RATES, there are no list of zipcode values. zipcodes are maintained at the city record level as a range FROM_ZIP_CODE and TO_ZIP_CODE. So a CITY record for GA.FULTON.ATLANTA has a from_zip of 30301 and to_zip of 30321-9999. I am not worried of the ( +4 ) values, all I care is the 5 digit zip and zip will increment by 1. For this scenario I want to show each zip code as a value in my LOV..so I want to show 30301, 30302, 30303....30320, 30321. Is there a SQL to generate such LOV based on range?
Any SQL experts out there with ideas?
Thx, SureshWilliam Robertson wrote:
Nice, but I think he wants the zip range as 30301 - 30321, discarding the '-9999' (apparently known over there as the '+4' component of the zipcode).Thanks William, i missed out on that detail (though it makes a heck of a lot more sense than generating a LOV with 60,000+ elements :) )
TUBBY_TUBBZ?
with
parsed_data as
select
lower_bound,
substr(range_string, 1, instr(range_string, '-') - 1) as high_bound
from
select
30301 as lower_bound,
'30321-99999' as range_string
from dual
select
lower_bound + level - 1
from
parsed_data
connect by level <= high_bound - lower_bound + 1;
LOWER_BOUND+LEVEL-1
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
21 rows selected.
Elapsed: 00:00:00.01Would be the proper approach based on having a lower bound and having to parse the upper bound from a range string.
William Robertson wrote:
Now if I had a clue how to use MODEL...You're not alone in that boat :) -
How to pass the bind variable value to the sql statement of the LOV
Hi,
I am using Forms 10g builder.
I have a text item which will be populated by a LOV when i press a button, but i have a bind variable in the SQL statement of the LOV. That bind variable should be replaced by a value which is derived from a radio group in the same data block.
For Ex: ( )radio1 ( )radio2
before i click on the push button, I'll select one of the radio button above,so my question is how to assign this radio group value to the bind variable in the sql statement in the LOV?
Pl any hint is appreciated!
Thanks
ReddyThe variable can be taken into account in the SELECT order contained in the Record Group used by the LOV.
e.g. Select ... From ... Where column = :block.radio_group ...Francois -
First problem...
SQL root will not access all databases...
If I try to access al databases using SQL Administrator the connection is refused even if I use root.
all databases are accessable va individual username and password..
Tried changing root password with GUI but makes no difference...
Second SQL problem...
10.4.11 server failed all raid volumes so corrupted no rescue was possible on any volume reinstall failed as well...
Have rebuilt the server using 10.5.6 I will have to manually import the SQL databases from the old server... what do I do ??? I cannot boot the old server so cannot do an SQL export or anything...
Thanks...Hi Jun,
Can i contribute a little for ur 2nd problem.
This error is coz, If u are using a filter against a File "data store" u can't test it, only against RDBMS query will be tested at data store level.
Well, for using that filter and make sure its working, drag and drop the source file in the interface (u can get the filter) and make it to execute on STAGING.
Thanks,
Guru -
Hello,
I have a small SQL problem...
I am designing an online bank using servlets for a university project and it allows customers to view their statements. They select which of their account numbers they want to view the statement for and the start and end date of the statement.
The problem lies with the dates. Here is the SQL:
SELECT date, details, amount, balance
FROM HISTORY
WHERE bankaccnumber=13494925 And date>=1/1/01 And date<=31/1/01;
All of the books I have looked at show dates in '1/1/01' format but whenever I try it this way I get a 'Data type mismatch in criteria expression' error (the 'date' field in the Database IS a Date type).
Although, whenever I run the query in Access and prompt the user to enter the start and end date, it works fine.
I have spoken to a few people and no-one seems to know why it is not working.
Any ideas???
ThanksIf your database is MS Access and you don't expect to switch to something else, then write this:
SELECT date, details, amount, balance
FROM HISTORY
WHERE bankaccnumber=13494925 And [date]>=#1/1/01# And [date]<=#1/31/01#
Note that you MUST format your dates as MM/DD/YY and not as DD/MM/YY, that's an Access rule, and that you will probably have to "quote" your column name "date", which I think is a reserved word in SQL and hence a bad choice for column name.
Personally I always use PreparedStatements. That way my SQL would look like this:
SELECT date, details, amount, balance
FROM HISTORY
WHERE bankaccnumber=13494925 And date>=? And date<=?
and I would use the setDate() method to fill in the parameters. Since this method uses a Date as a parameter, I don't need to fight with date formats, the JDBC driver handles that for me. -
REGEXP works in PL/SQL not in Apex
Hi,
I have a regular expression that works in PL/SQL yet in APex it doesn't work.
1) Have to be numeric
2) Have to have 1-2 digits
3) Optional to have up to 1 decimal points
Can anyone please let me know if this is good? Thanks.
regexp_like(v_expr, '^(\d{0,2})+(\.[0-9]{1})?$')In what way doesn't it work in APEX?
APEX runs PL/SQL, there should be no reason why it doesn't. Are you running this as a validation? -
Problem with Apex: wwv_flow.accept
Hello!
I've developped an application which worked perfect since nearly one year. Now - suddenly - when changing data in an tabular form and pressing the submit button this page appears:
<h1>Not found</h1>
The requested URL /apex/wwv_flow.accept was not found on this server
<br>
From time to time it seems to work again, but then - after changing some data again... it appears again. Turning Debugging on has no effect. Do someone know or give me some advice what went wrong? Thank you Johann Message was edited by: horvatj
I aksed this topic in the APEX Forum - see thread:
Problem with Apex: wwv_flow.accept
Scott answered:
Johann - Check the Apache error log for more details.
Okay, but XE doesn't use Apache!?
How can I access the logfiles?
Where can I find them?
Thank you
JohannIf you believe it or not, I solved without any logfile...
The problem was some kind of corrupt data.
After correcting this everything works fine again. I really don't know why this not found error occurs, but ;-)
Thanks Johann
Maybe you are looking for
-
Question about 2 years warranty extension update to Satellite A200-1MY
Hi, I was registered at the website www.toshiba-europe.com/registration. In the Free Warranty Extension book was wrote that when I register my warranty extension from 1 year to 2 year International Limited Warranty. When I looking at the website http
-
Best Buy needs to reevaluate customer service.
First, let me start by saying that I have always bought all my major appliances and electronics from Best Buy, but that may change soon. On November 30, 2014 I ordered a Whirlpool Convection over the range microwave and a French door Samsung refriger
-
How to create a partition on a Satellite A200-14D?
Hello, I have a problem with my partitions as I first had on the notebook 2 apparent partitions on the HDD, labelled C:\Vista (Vista Home Premium) and E:\Data ( 57GB and respective 55GB ). I've decided to format vista because I had some problems with
-
While connected to Daily Kos website, browser suddenly froze. Upon restarting and returning to web site, I could no longer perform recommend and rate user interface functions. Symbols and buttons allowing these functions do not appear on screen. I ha
-
X220 with Windows 7 (64 bit) Pro using SSD Samsung 840 (500G) drive
I am using a Thinkpad X220 (4291) laptop with 8 gigs of RAM. I recently switched my HDD for an SSD (Samsung 840 which is 500G). I have been following the posts and have set the BIOS accordingly as well as updated firmware for the drive. I use Crys