To_date and select box
Hello! I have a jsp page that interacts with a bean and oracle database. Essentially I have a form on the jsp that calls the bean who executes the query. I am having a problem with the to_Date function. The form has three drop down boxes on it. Two of them are simple strings of numbers that bind without a problem. The third drop down is a user selectable range of dates.. (i.e. current year, last year, 2 years prior).
The sql query is select foo from bar where loc = :location and weekEnd between :weekEndsThe value of the select box is:
To_Date('20030101','YYYYMMDD') AND To_Date('20031231','YYYYMMDD')The error that gets generated from the servlet/jsp is:
Error Message: ORA-00905: missing keyword
Error Code: 500
Target Servlet: null
Error Stack:
java.sql.SQLException: ORA-00905: missing keyword I have no problem if I try to hardcode in the to_date statement but when I try to bind in anything it doesn't work. Even if I do the date equal to a single date it doesn't seem to work. Any suggestions or advice would be appreciated. Thanks in advance!
Here is my query:
SELECT HOURS.LOCATION, EMPLOYEE.LAST_NAME, EMPLOYEE.FIRST_NAME_MI,
HOURS.EMPLOYEE_NBR, EMPLOYEE.EE_STATUS_CODE,
COMMON_DOE.DOE_DESCRIPTION, SUM(HOURS.HOURS_ACCRUED), SUM(HOURS.HOURS_PAID),
SUM((HOURS.HOURS_ACCRUED - HOURS.HOURS_PAID))
FROM HOURS, EMPLOYEE, COMMON_DOE WHERE HOURS.LEVEL1 = EMPLOYEE.LEVEL1
AND HOURS.LEVEL2 = EMPLOYEE.LEVEL2 AND HOURS.EMPLOYEE_NBR =
EMPLOYEE.EMPLOYEE_NBR AND HOURS.DOE_CODE = COMMON_DOE.DOE_CODE AND
HOURS.DOE_CODE NOT IN 'EL' AND HOURS.LOCATION = :Location AND
HOURS.WEEK_ENDING_DATE BETWEEN :WeekEnd GROUP BY HOURS.LOCATION,
EMPLOYEE.LAST_NAME, EMPLOYEE.FIRST_NAME_MI, HOURS.EMPLOYEE_NBR,
EMPLOYEE.EE_STATUS_CODE, COMMON_DOE.DOE_DESCRIPTION ORDER BY LOCATION
ASC, LAST_NAME ASC, FIRST_NAME_MI ASCIf I hardcode in To_Date('20030101','YYYYMMDD') AND To_Date('20031231','YYYYMMDD') where :WeekEnd is I have no problem, but when I try to bind the string in to it (so I can select different years) I get the missing keyword error.
Similar Messages
-
I was wondering how to update a select box with data relevant
to a selection made on a suggest box, something similar to
this,
but with a spry suggest box instead of the first select box on the
example.
I tried the example (two select boxes using two binded data
sets) with my db and it works; when I select something on the first
select box, the second one changes dynamically according to the
selection made.
I have defined two datasets:
var ds1 = new
Spry.Data.XMLDataSet("API/make_entry_list_xml.php","viperdb/entry",{sortOnLoad:"pdb_id",s ortOrderOnLoad:"ascending"});
var ds2 = new
Spry.Data.XMLDataSet("API/get_chains_for_entry_id.php?VDB={ds1::pdb_id}","viperdb/entry/c hain_id");
and defined the suggest and select boxes as:
<div id="suggest_1">
<input type='text' id='vdb1'>
<div id="resultsDIV_1" spry:region="ds1">
<div spry:repeat="ds1" spry:suggest="{pdb_id}"
onClick="ds1.setCurrentRowNumber(this.selectedIndex);"
onchange="ds1.setCurrentRowNumber(this.selectedIndex);">
<div class="suggest_list">{pdb_id}</div>
</div>
</div>
<span spry:region="ds2" id="subdirSelector">
<select spry:repeatchildren="ds2" name="subdirSelect">
<option value="{chain_id}">{chain_id}</option>
</select>
</span>
</div>
Neither onclick nor onchange functions seem to work; on load
the second select does fill up with ds2 data (acording to the first
element of ds1), but when using the suggest box to select something
different, the selectbox doesn't change accordingly, keeping always
the same data.
Am I using the setCurrentRowNumber in the wrong dataset or
tag?I would say if you were to do somthing like this
var ds1 = new
Spry.Data.XMLDataSet("API/make_entry_list_xml.php","viperdb/entry",{sortOnLoad:"pdb_id",s ortOrderOnLoad:"ascending",useCache:false});
see I added the useCache:false
This will stop the browser from cacheing your xml, thenjust
add an onclick to some function like say
update();
then have update do this
function update()
ds1.loadData();
That should cause the browser to update the data set and
update your elements now the only downside is IE has a bug well
more like IE being the bug but anyhow you may have to add things to
your code to get it to work right in IE, I added in some random
number script in my JS so that it will append on the end of my DS
each time so IE thinks its a new XML doc. Hope this helps. -
Webkit select box not working...
Hi folks,
I'm trying to create a simple select box in an air application, and while the select box is populated, it will not drop down. It just flashes and then rolls back up.
The select box on the following simple page fails:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<select name="myselect" id="myselect">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</body>
</html>
What is the trick to getting these select boxes to work properly in webkit? I can use my arrow keys to traverse up and down the options in the select list, but that's not really good enough. I want it to work properly.
Any ideas what the heck is going on?
Thanks,
ChrisOkay, I've got an update on this problem.
Just to test this against another platform that uses the webkit engine, I tried the following code in Safari 4.0.4 for Windows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<select name="myselect" id="myselect">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</body>
</html>
... and even though the select box isn't inside a proper form tag, the code still works just fine. In fact, I tested the following code too:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<form name="myselect">
<select name="myselect" id="myselect">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</form>
</body>
</html>
... and this ALSO works perfectly fine.
However the same simple code fails miserably in AIR 1.5. Does anyone have a clue why that is? Again, should I upgrade to AIR 2.0 beta? A google search for problems with webkit and select boxes has returned nothing helpful. I'll check this forum again, but so far I've not gotten anything helpful here either.
Is nobody using AIR with straight HTML/JavaScript/AJAX? Is that why no one has been able to help me? Is *everybody* using Flex? I'm getting a bit frustrated at this point. -
I'm having problems (1) selecting onscreen text, (2) resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.
1) This is because of software version 1.1. See this
thread for some options as to how to go back to 1.0,
which will correct the problem...
http://discussions.apple.com/thread.jspa?threadID=3754
59&tstart=0
2) This tends to happen after videos. Give the iPod a
minute or two to readjust. It should now be more
accurate.
3) This?
iPod shows a folder icon with exclamation
point
4) Restore the iPod
5) Try these...
iPod Only Shows An Apple Logo and Will Not Start
Up
iPod Only Shows An Apple Logo
I think 3,4, and 5 are related. Try the options I
posted for each one.
btabz
I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again -
I am running 4.0.1 and when I download something the Download box stays blank-even though I have selected in General Preferences 'Show the downloads window when downloading a file' AND selected 'Save files to Downloads'....???
In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.''' -
I have a requirement with select and text boxes. JSP / JDBC
I have a Combo Box which iswritten by a JSP by connecting to DB!
When i click on a <option> corresponding the other two text boxes must be loaded with data!
if i have list of EmpID in <select>, in one text box i should get his CITY and other Occupation !
What i thought is .... getting all the data from database. select empid from emp and write a combo and select city,occupation from emp, intp ARRAYLISTs!
function updatData(){
var index=document.projalloc.associateid.selectedIndex;
}if i onSelect=updateData(), (i will get index of empid,as it is a combobox) using which i have to retrieve the values of city and occupation !!
BUT HOW !
I am gettin the index of empid but how to get the data into textbox !!!!well there are many ways of doing this.
1).Render all the data corresponding to each employee at a time.By making a javascript arrays and try to get back the data from there.
2).Save the ArrayList of DTO beans in the scope of session.Use AJAX call a CGI(Servlet/JSP action) fetch the values from the session render the response as XML now parse the XML data using javascript DOM and then update the consecutive textboxes.
Just as an example checkout my answer in the below post.It was an example given for a dependent drop downs.however, we can definately use the same concept to update textboxes too.
http://forum.java.sun.com/thread.jspa?threadID=5209661&messageID=9844137#9844137
Hope that might help :)
REGARDS,
RaHuL -
How to get the text boxes and select lists dynamically?
Hi,
I have a requirement such that I need to create the text boxes and select lists depending on the user input at the run time. It means that if the user requires four text boxes/select lists then I need to have 4 such thing. If the user need 6 then I need to have 6.
The design may be such that initially only one text box/select list will be available when the page launches. Then as ad when the user asks for more those will be available to the user accordingly.
regards,
Dipankar.You can use Ajax to call textboxes and select list based on what user enters.
Otherwise make those items conditional and based on what user enters you can display textbox or select list.
You can call Single Textbox and Select List using Ajax for any number of conditions.
Regards
Chandra -
Selection boxes in Barracuda Anti Spam and Virus Firewall do not appear in 7.0. They appeared in previous versions, and in IE.
FIXED!
I reverted back to 3.6.23 and all works fine. From everything I can tell; number of problems submitted, breadth of issues, no access to versions 4, 5, 6 (rapid version turnover with no support), and now beta being released for 8, it seems FF is having the user base do all it's alpha/beta testing without consent. Being in product marketing myself, I probably would have lost a significant percentage of my customer base by now. When FF begins to support a new mainstream release, then I'll be interested again. -
Display Key and Text in Variable Selection Box by Default in BEx
Hi Experts,
I have a requirement to display both key and text in the variable selection box by default.
Currently, only the text is being displayed.
The 'wrench' can be used to change the display, but the client would like to see both key and text by default.
Is there a way I can accomplish this?
Thanks,
Points will be assigned!hi experts,
i have done the same settings in development and its working fine and we can see key/text bydefault in variable selection in Dev. and when i transport the cube into quality the settings are reflecting but in analyzer(QA) variable selection screen still its giving text(DEFAULT). could you please provide me the solutions to do it.
thanks & Regards
vadlamudi -
Laughing sound, media keys funny, and black select boxes
I've only had my macbook for 2 weeks and its gone weird today. It starts with a black select box around icons, popup windows, and the task bar. Then i try to listen to the new mac holiday add when i hear weird laughing. Then the laughing starts when i click on something, anything. I try to turn down the volume with the media key (F12) then dashboard comes in. The contrast keys dont work, and F11 makes firefox browser move to the top right of the screen out of view.
HELP ME i am in mac ****.Hi Doug,
Thank you for your help. I have done some more problem solving and I found something strange in the activity monitor. So i 'quit the process' and shut down. Its all fixed now.
Thanks again, Merry Christmas -
ColdFusion 11, hot fix 3 installed but did not help. There are no binds.
This one has been driving me crazy and I have finally figured out that it is the first column in each grid where there is a select box via "valuesdisplay" that is the issue. Select box results are switching grids!
Example of how it is coded to display:
Grid 1 - gridcolumn should have a dropdown with 1,2,3
Grid 2 - gridcolumn should have a dropdown with a,b,c
Grid 3 - gridcolumn should have a dropdown with x,y,z
However, the results in the dropdowns in the grids are:
Grid 1 - x,y,z (should be 1,2,3)
Grid 2 - 1,2,3 (should be a,b,c)
Grid 3 - a,b,c (should be x,y,z)
This only happens with the first dropdown for each grid. Any other columns with dropdowns do not have any issues and do not swap out to the wrong grid.
Sample of my code from the grids:
Grid 1:
<cfgrid name = "evalgrid"
height="200"
autowidth="no"
font="arial" fontsize="12"
query = "getevalfinal"
SORT="Yes"
selectmode="edit"
format="html"
insert="yes"
delete = "#deletevalue#">
<CFGRIDCOLUMN NAME="numberofschools" HEADER="numberofschools"
HEADERALIGN="LEFT" DATAALIGN="LEFT"
BOLD="Yes" ITALIC="No"
SELECT="Yes" DISPLAY="Yes"
HEADERBOLD="Yes" HEADERITALIC="No"
VALUES = " ,NA,1,2,D"
VALUESdisplay = "Blank,NA,1,2,D" valuesDelimiter=","
width=50>
</cfgrid>
Second Grid:'
<cfgrid name = "SecondGrid"
height="100" width="700"
font="arial" fontsize="12"
query = "getsecurity"
SORT="Yes"
selectmode="edit"
format="html"
insert="yes"
delete = "#deletevalue#"
autowidth="yes"
>
<CFGRIDCOLUMN NAME="userrole" HEADER="userrole"
HEADERALIGN="LEFT" DATAALIGN="LEFT"
BOLD="Yes" ITALIC="No"
SELECT="Yes" DISPLAY="Yes"
HEADERBOLD="YES" HEADERITALIC="No"
VALUES = "#olduserrole#"
VALUESdisplay = "#olduserrole#" valuesDelimiter=","
WIDTH=300
font="arial" fontsize="12">
</cfgrid>
In the above code, userrole values end up being in the wrong grid where numberofschools values should be and vice versa.
Appreciate any help!
B.You may find this article useful: [http://balusc.blogspot.com/2007/10/populate-child-menus.html].
-
3 select Box and 2 dynamic one
Hi guys,
I have 3 select box.
First one will change the second one values, and second one will change third one values
So Im doing this :
<h:selectOneMenu style="width:320px;" value="#{class.info1}"
valueChangeListener="#{class.changeInfo2}"
id="info1Id"
onchange="enableDisableElements(\'#{rich:clientId('info2Id')}\')">
<f:selectItem itemLabel="#{messages.IRS_PageBlock1Select1}" itemValue="-1"/>
<f:selectItems value="#{class.getListInfo1()}"/>
<a:support event="onchange" reRender="#{rich:clientId('info2Id')}"/>
</h:selectOneMenu>
<h:selectOneMenu style="width:320px;" value="#{class.info2}"
id="info2Id" required="true" styleClass="disabledTrigger"
valueChangeListener="#{class.changeInfo3}"
onchange="enableDisableElements(\'#{rich:clientId('info3Id')}\')">
<f:selectItem itemLabel="#{messages.IRS_PageBlock1Select2}" itemValue="-1"/>
<f:selectItems value="#{info2List}"/>
<a:support event="onchange" reRender="#{rich:clientId('info3Id')}"/>
</h:selectOneMenu>
<h:selectOneMenu style="width:320px;" value="#{class.info3}"
id="info3Id" required="true" styleClass="disabledTrigger">
<f:selectItem itemLabel="#{messages.IRS_PageBlock1Select3}" itemValue="-1"/>
<f:selectItems value="#{info3List}"/>
</h:selectOneMenu>in Java :
public void changeInfo2(ValueChangeEvent e) {
newinfo2Id = (Long) e.getNewValue();
callMethodToUpdateInfo2List();
public void changeInfo3(ValueChangeEvent e) {
newinfo3Id = (Long) e.getNewValue();
callMethodToUpdateInfo3List();
}callMethodToUpdateInfo2List and callMethodToUpdateInfo3List are methods returning List<SelectItem>
So when I arrive on my page, select first drop down, second drop down is well updated, but then if I try to change some values in this one I get :
Caused by java.util.NoSuchElementException with message: ""
javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:117)
javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:144)
javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:49)
javax.faces.component.UISelectOne.matchValue(UISelectOne.java:164)
javax.faces.component.UISelectOne.validateValue(UISelectOne.java:137)
javax.faces.component.UIInput.validate(UIInput.java:867)
javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
javax.faces.component.UIInput.processValidators(UIInput.java:666)
javax.faces.component.UIForm.processValidators(UIForm.java:229)Is it because the render of the component is bad updated ?? or something like that ?
Thx guys
Edited by: xtof83 on Jun 12, 2008 8:03 AMYou may find this article useful: [http://balusc.blogspot.com/2007/10/populate-child-menus.html].
-
HT201210 iPhone 4 lost its touch-screen-ability and created selection-boxes around apps
Why has my iPhone 4 lost its touch-screen-ability and created selection-boxes around apps, etc.. that require a double-tap to operate/execute?
VoiceOver is on. Triple-pressing the Home button may be set to turn it on or off.
Settings > General > Accessibility
While it is on, you need to use three fingers to scroll. -
when i right click and select 'view image info', that info box and the browser window lock up. i have to manually close firefox to reset the browser and gain access. sometimes, i have multiple firefox browsers open when this happens, and both browsers lock up, and all three (both browsers and the image info window have to close down together..
I'm using 3.6.13 on Windows XP.You're welcome
-
With recent update, all my check boxes and selection circles have disappeared. I tried to uninstall FF, reinstall, but nothing fixed it. When I run safe-mode, it's fine, but then no youtube or other internet fun stuff. Tried to update plug-ins but still all jacked up. any ideas? also, my side scroll bar screws up too.
Do you mean Firefox safe mode or Windows Safe mode?
If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
* Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
* Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
If you mean Windows Safe-mode then check your security software.
Maybe you are looking for
-
JDev 10.1.3 and JDK1.2.2 use javac problem
I have an old application that I need to compile in 1.2.2, and have tried the "use javac" checkbox on the project properties compile page. The compiler seems to run, but there is an intential error in the code. I put it there, because the class file
-
how to extract war file? explain technoloby behind in war
-
EMERGENCY: what kind of jdbc driver should I use?
Suppose one machine with 9iAS standarv version installed, and another one with oracle8.1.6 installed. OSE is used for JSP and servlet engine. In this case, Oracle internal JDBC driver does not apply, am I right? Then what kind of JDBC should I used t
-
ORA-12721: operation cannot execute when other sessions are active
Hi, I started my DB like following : 1) Change INIT.ORA file; unset parallel_server parameter. 2) Execute these commands: STARTUP MOUNT ; ALTER SYSTEM ENABLE RESTRICTED SESSION; ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0; ALTER SYSTEM SET AQ_TM_PROCESSE
-
Why i try to buy an application from my iPhone5 i get an Error message!!
why i try to buy an application from my iPhone5 i get the message (your purchase could not be completed) ! I have an updated IOS (6.1.4)