Retrieval Problem !
hi -
I have some doubt regarding some retrieving data.
Here is my table data :
id1 id2 name
35 30 java
35 31 c
36 32 cpp
36 33 vc
37 34 abc
35 tool
36 temp
37 mydir
here is the logic :
if id2 equals to id1 , then i can get retrive the results.
if id1 is null , i can retrieve results too
but if id2 is not equal to id1 ( values are not there in id1 , eg, 34 ) , i could not able to retrieve the results.
how can i get the results of 34 .
i guess , u guys understood the problem.
thanks in advance.
- bregoty
Here is code for your referrence.
import java.util.*;
parentId id name
35 30 java
35 31 c
35 32 cpp
37 33 vc
37 34 abc
null 35 tool
null 36 temp
null 37 mydir
public class Example
public static void main(String[] args)
HashMap itemMap = new HashMap();
HashMap parentNullMap = new HashMap();
Item it = null;
/* parentId , id and name values coming from the
he database and that will be stored.
Hashmap having counter and Item object .*/
for (int i=0;i<10;i++)
String parentId = resultSet.getString(1);
String id = resultSet.getString(2);
String name = resultSet.getString(3);
it = new Item();
it.setParentId(parentId);
it.setId(id);
it.setName(name);
itemMap.put(String.valueOf(i),it);
// saving id values into the Map if parentId is
is null
if (parentId == null)
parentNullMap.put(parentId,id);// YOUR parentNullMap will only have one value--the key will be "null", the value will be whatever "id" comes last.
// Item it1 = new Item(); // Unnecessary initialization--just declare value:
Item it1;
for (int i=0;i<parentNullMap.size();i++ ) // will be at most 1, as explained above.
String pnm = parentNullMap.get(String.valueOf(i)); // You didn't use String representations of int as keys.
for (int j=0;j<itemMap.size() ;j++ )
it1 = (Item)itemMap.get(String.valueOf(j))
// if id is equals to parentId
if (pnm.equals(it1.getId()))
// will get the results if it equals
// need to get the results if it is not
if it is not there in parentId column .
// i mean i need to get the record of
the record of 36.
Make parentNullMap a HashSet. Put the id values into it. Use an Iterator to loop through it.
Similar Messages
-
I create one function to retrieve PDF file in BLOC column and store the result
in UNIX file to be able to see it with ACROBAT.
see my function
CREATE OR REPLACE FUNCTION GET_PDF_STATEMENT ( p_filename IN VARCHAR2,
p_request_id IN NUMBER )
RETURN NUMBER
IS return_code NUMBER;
temp_blob BLOB;
data_buffer RAW (1);
temp_buffer VARCHAR2(1);
amount BINARY_INTEGER := 1;
position INTEGER := 1;
filehandle utl_file.file_type;
error_number NUMBER;
error_message VARCHAR2(100);
v_error VARCHAR2(100);
directory_statement VARCHAR2(100);
length_count INTEGER;
BEGIN
SELECT statement_pdf_file
INTO temp_blob
FROM nat_statement_pdf
WHERE filename = p_filename
and request_id = p_request_id;
length_count := dbms_lob.getlength(temp_blob);
dbms_output.put_line('Internal LOB size is: ' || length_count);
SELECT directory_path
into directory_statement
from dba_directories
where directory_name = 'STATEMENT_PDF_REPORT_DIR';
filehandle := utl_file.fopen(directory_statement,
p_filename,'W');
WHILE length_count <> 0 LOOP
dbms_lob.read (temp_blob, amount, position, data_buffer);
temp_buffer := utl_raw.cast_to_varchar2(data_buffer);
utl_file.put (filehandle, temp_buffer);
position := position + 1;
length_count := length_count - 1;
data_buffer := null;
END LOOP;
return_code := 0;
dbms_output.put_line('Exit the loop');
utl_file.fclose(filehandle);
dbms_output.put_line('Close the file');
return(return_code);
EXCEPTION
WHEN OTHERS THEN
BEGIN
v_error := sqlerrm;
insert into message_marc ( message) values ( v_error );
error_number := sqlcode;
insert into message_marc ( message) values ( to_char(error_number) );
return_code := error_number;
error_message := substr(sqlerrm ,1 ,100);
dbms_output.put_line('Error #: ' || error_number);
dbms_output.put_line('Error Message: ' || error_message);
utl_file.fclose_all;
commit;
return(return_code);
END;
END;
I have the problem with file bigger than 32 ; i printed the value of sqlerrm and sqlcode
the results ar sqlerrm = User-defined exception
sqlcode = 1
Ony body can help me
Thanks
MarcHi
Call the function without exepction handling and post the error message and the number of the line where the error occures.
Ott Karesz
http://www.trendo-kft.hu -
Random record retrieval problem
At this point I'm sort of desperate as this has been going on
for a few weeks now. I missed this part of the forum an dposted the
problem here:
thread
If anyone can help I would very much apprecfiate that!tragik,
ahh... the sql part should have read: ORDER BY
'#CreateUUID()#'
None the less it did not work. I think the reason is that the
CreateUUID part is only run once, when the page is fetch and not
every time a record is retrieved. Hence, the value of the unique
hex number is always the same during the whoole sql statement
execution in the database. Correct me if I'm wrong... -
BEA 10 WSRP digitial cert retrieval problem
Hello,
We are running two BEA portal applications within the same domain and are connecting the two using WSRP (local proxy). Not long ago we ran into a problem where our remote portlet classes were not able to retrieve the user's digital certificate through:
X509Certificate[] certs = (X509Certificate[])
servletReq.getAttribute(
"javax.servlet.request.X509Certificate");
This code works fine in a non-WSRP environment. The response from BEA was that this was specifically stripped from the request object prior to sending it to the producer. This answer came from a BEA trouble ticket and from the following BEA forum thread: http://forums.bea.com/thread.jspa?threadID=5700000376
So, as far as getting the cert in the producer portlet class goes, we moved to use BEA's Custom Data Transfer mechanism and all is well.
However..... we are seeing the same problem with servlets. In the case of the remote portlets, there was no "javax.servlet.request.X509Certificate" request attribute to recieve. In the case of the servlets, it does exist but the retrieved X509Certificate[] object has 0 certs. It is not "null", but rather is a good object with just 0 items.
So, we fixed the problem for how a remote portlet class can retrieve the user's digistal certificate, but now how can we retrieve the cert in a remote servlet?
Thanks - peterPeter,
Yes the /<web-app>/resource? URL is the resource proxy servlet.
We understand the issues with WSRP and JSR-168. The good news is WSRP
2.0 and JSR-286 will address some of these issues. See: serveResource
and clientAttributes. In addition, we are working with the committees to
standardize things like Custom Data Transfer.
In your particular case it would be dangerous to set
"javax.servlet.request.X509Certificate" on a request which did not
receive that particular certificate. So, at best you might be able to
write a servlet which worked with all WSRP consumers.
Good Luck,
Nate
Peter Len wrote:
Nate,
Thanks for the reply. Well, I am not sure specifically about if we are using the consumer's resource proxy servlet. The URL that gets generated in our Producer for calling our servlet starts like:
https://ri.ic.mcdonaldbradley.com:443/PortalWAR/resource?_windowLabel=T2400557971208964511199&wsrp-urlType=resource........
so it looks like a resource servlet. I would assume that adding a ResourceHeaderFilter is something that is done by the consumer, not the producer, just like the Custom Transfer backing file resides on the consumer. We don't own the consumer portal, however, and so having them add stuff like this might be problematic. In any case, it would seem that if they did add something like that, the producer's servlet would have to change how it was looking for the cert object (servletReq.getAttribute(
"javax.servlet.request.X509Certificate")).
The problem I am seeing is that our portal-neutral JSR-168 portlets are starting to become BEA-specific JSR-168 portlets because we have to change our code to handle BEA classes (ex SimpleStateHolder) for a BEA solution to a BEA WSRP implementation issue. Not sure, for example, if other portals would still send the user certificate in a WSRP request object, which is something that BEA did not want to do.
In any case, I will have to do more research into how to implement a ResourceHeaderFilter solution.
Thanks - Peter -
Excel Retrieve problem using Default Aliases
Using version 5.0.2 patch 14 on Windows 2000 client.When option "use aliases" is selected in Excel, we have started experiencing inconsistant and unreliable retrieves.Example:After first retrieve and zoom on Parent, display is:Parent__Child A__Child B__Child CRetrieve again, results:Parent__Child A__Child C__Child CLost the retrieve for Child B.Missing rows and zeros are NOT selected.Has anyone experienced this issue?
Thanks for the reply, Sergey. I have solved my problem using different approach.
First suggestion is ok and helpful which after I forgot to add in when I post this thread. Second suggestion would result on this:
<Styles>
<Style ss:ID="" ss:Name="Normal"> --- Attribute ID would be empty
<Alignment ss:Vertical="Bottom" />
<Font />
<Interior />
<NumberFormat />
<Protection />
</Style>
</Styles>
I modified previous approach and here is my code:
[code]
xmlTextWriter.WriteStartElement("Styles");
xmlTextWriter.WriteStartElement(string.Empty, "Style", sheet);
xmlTextWriter.WriteAttributeString("ID", sheet, "Default");
xmlTextWriter.WriteAttributeString("Name", sheet, "Normal");
xmlTextWriter.WriteStartElement("Alignment");
xmlTextWriter.WriteAttributeString("Vertical", sheet, "Bottom");
xmlTextWriter.WriteEndElement();//End Alignment
xmlTextWriter.WriteStartElement("Font");
xmlTextWriter.WriteEndElement();//End Font
xmlTextWriter.WriteStartElement("Interior");
xmlTextWriter.WriteEndElement();//End Interior
xmlTextWriter.WriteStartElement("NumberFormat");
xmlTextWriter.WriteEndElement();//End NumberFormat
xmlTextWriter.WriteStartElement("Protection");
xmlTextWriter.WriteEndElement();//End Protection
xmlTextWriter.WriteEndElement();//End Style
xmlTextWriter.WriteEndElement();//End Styles
xmlTextWriter.WriteStartElement(string.Empty,"WorkSheet", sheet);
xmlTextWriter.WriteAttributeString(string.Empty,"Name", sheet, "Sheet1");
xmlTextWriter.WriteStartElement(string.Empty, "Table", sheet);
xmlTextWriter.WriteAttributeString("ExpandedColumnCount", sheet, "2");
xmlTextWriter.WriteAttributeString("ExpandedRowcount", sheet, "2");
xmlTextWriter.WriteAttributeString("FullColumns", excel, "3");
xmlTextWriter.WriteAttributeString("FullRows", excel, "1");//To be modified
[/code] -
Indic Langauge Search and Retrieval Problem
I went to www.guruji.com. Generated a Gujarati string "Guruji". I copied it to clipboard.
Next, I went to Microsoft Word 2007 and pasted that string into a document. Also, I pasted that string in Find in Microsoft Word. I could find the string. I also selected the string and copied it to clipboard. I got the same string.
Next, I generated two PDF fiies using Microsoft Word's own PDF generator and other with doPDF 7.1. I do not have access to Acrobat.
I could not search the Gujarati text in both files though it looked the same as in Microsoft Word.
When I copied the text from the PDF files to clipboard I got garbage.
I suspect that PDF generators may be a problem. But I am not sure.
As a side comment, Adobe Reader search text-box cuts bottom pixel row from Gujarati 'u's. FoxIt does not.I am using portal 6.0 and have content that is
delivered by roles. The role membership is determined
by groups or attributes in a separately maintained
LDAP directory. And then through scripts the Role in
the Portal is updated to match the information in
that separate directory.
The problem that I am seeing is in the use of the
AMRole object. The following code where 'role' is a
valid AMRole object:
Set userDNs = role.getUserDNs();Throws the following exception:
Unable to get members::LDAP Error:The search
found more than the maximum number of
results.I have tried doing an ldapsearch from the command
line and I can retrieve all 1326 member's DNs that
way. I have checked the portal's directory server
setting for maximum results allowed to be returned
and it is way more than 1326., which is confirmed by
the command line search.
Any idea why the AMRole getUserDNs method is having a
problem while command line is not? This code works on
roles with fewer members.fewer members mean less than 100?? There is a sizelimit constraint configurable by IS admin in the adminconsole service, this is by default 100, tune this value . also if you look at the DS access logthat would show the error code and the number of entries resturned. the error code is 4 -
E71 automatic retrieval problems
Just bought the Nokia E71 but having problems with the email automatic retrieval. I have done all the required settings for it but it does not automatically retrieve. I had an E61i until now and the auto frretrieval worked fine so I know what it's about...any advice??? one thing is that when I go into the email setting and the auto retrieval section ans then come back out it starts to retrieve automatically but only that once...all other times I have to manually retrieve...I am using Eircom Net email system in Ireland...please advise
17-Dec-2008 01:44 AM
emgphoto wrote:
Just bought the Nokia E71 but having problems with the email automatic retrieval. I have done all the required settings for it but it does not automatically retrieve. I had an E61i until now and the auto frretrieval worked fine so I know what it's about...any advice??? one thing is that when I go into the email setting and the auto retrieval section ans then come back out it starts to retrieve automatically but only that once...all other times I have to manually retrieve...I am using Eircom Net email system in Ireland...please advise
I also moved from an e61i to and E71 but didn't have any problems moving my mail accounts. I have three on the phone (MFE, POP3, and IMAP4). All work fine.
Can you connect manually to the Eircom Net email service?
What settings are you using for the "Access point in use" under the "Connection settings"? I've never had any luck getting this to work using WIFI and have all 3 accounts setup to use my ATT 3G Connection.
Also, check your "Retrieval settings" and "Automatic Retrieval" configuration to make sure they are correct. -
Retrieving problems. No data
When I retrieve, there are no numbers. Nothing, just blank cells. One minute, I'm retreiving just fine, the next there is nothing. We've re-installed the Excel Add-in 2-3 times. You can zoom and everything. It acts like the data is there, but the cells where the #'s are is blank.
The admin logged in as his ID and it's the same thing. I can go to a different PC and retrieve the same just fine, so it's PC specific.
Any ideas?I just ran into a similar problem, but actually figured it out. When I was trying to retrieve actual balances in Excel, no values were being populated within the cells. After going through my headers, I realized that one of the members did not have the " ' " apostrophe in front of it. In the spreadsheet I have built I have the years in a drop down box, but in my case the year did not have the apostrophe in front of it. Once I made the change, I was able to pull current balances.
-
Html form-jsp retrieval problem..very urgent plz help
i have created the following html form.
<form method="POST" action="b.jsp" >
Insert Feed URL <input type="text" name=""></br></br>
<input type="submit" value="Search"> <input type ="reset" value ="Reset">now when i click search i should be able to get that url which i inserted in the text box through b.jsp which has the code for retrieving it. it is basically a .xml url. hence i have used
object.put("1", " ");
in the b.jsp(just a part of the code)
what value should i put in between the quotes(" ") so that i retrieve the info as per the url input in the html form.
kindly help
very urgent
cheersok i tried but i got the following error:
symbol : variable request
location: class org.apache.jsp.b_jsp.FeedServer
object.put("1",request.getParameter("feedURL"));
^
1 error
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:246)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)i also tried this
String feedURL = request.getParameter("feedURL");
object.put("1","feedURL");
but still errors
Generated servlet error:
.java:30: feedURL is already defined in org.apache.jsp.b_jsp.FeedServer
String feedURL = request.getParameter("feedURL");
^
Generated servlet error:
java:30: cannot find symbol
symbol : variable request
location: class org.apache.jsp.b_jsp.FeedServer
String feedURL = request.getParameter("feedURL");
^
2 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:246)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362) -
I moved my Mail file from Applications to Documents, and when I realized I could not get my new or old mail by clicking on the Mail Icon, I then moved my Mail folder back from Documents to Applications. But unfortunately, I still cannot retrieve my mail. All it says in the mailbox is: No Mailbox Selected. Any solutions?
Message was edited by: Garbage Band
Message was edited by: Garbage BandI think I figured it out. Thanks!
-
Lenovo T430s, T530, W530 update retriever problems
Hey
We have just got these models to our Company, and we are having trouble with update retriever.
When we add these models to update retriever and search for updates, we only get "Winodows Patch updates" and som "Lenovo special updates". No updates for chipset, graphic, media card reader, bluetooth, WAN, sound.
But, when we use System Update, everything is coming up.
Have tried to delete det system in update retriever and add it again, but no success.
Please helpCan you tell the team that the ThinkPad Tablet Button Driver 1.05 and ThinkPad Enhanced Multitouch Driver 7.0.2.29 is not present in retriever? I see Tablet button driver 1.04 but only for X64 and not x86
Thanks Ed! -
Time Machine Backup Retrieval Problem
Hi all (especially Podini!), hoping for some help with the following. I recently did a clean install for Mavericks (wiping my MBPro hard drive) - I only wanted to restore files from my backups (photos, music, docs, etc). After the clean install, I then began to configure my computer and in doing so, opened up Time Machine Preferences and turned it "on". It began to do a backup of my new "basically empty" HD. When I went to the Time Machine to pull my files from old backups - they no longer show, it only shows the latest backup of the "basically empty" HD.
I'm not positive, but I think part of the problem is that the TIme Capsule thinks I am a new user? I do not know the exact names of my drives from before the wipe.
Any help would TRULY be appreciated. Bascially my whole life of digital memories and work are in the balance.
Thank you, ~ScottThe bad news first - unfortunately Pondini is no longer with us.
If you look on your backup drive, how many backups do you see?
Inherit a Backup
Inherit a Backup (2)
Time Machine Troubleshooting
Time Machine Troubleshooting Problems -
Data retrieval problem - Urgent!!!
Hi all,
Have a very queer problem.I have a program which queries data from a Z table. The problem is that it does not work for some entries of the ztable. The user enters 4 details in the sel-screen and all these 4 are used for the query.
Some entries when queried through the program gives me sy-subrc 4 even though all input values are correct ( please donot reply suggesting me to check my inputs).
I separately queried using the same values in se16 and the record is fetched.but it doesnot happen in through the program.
Any idea guys..if you have faced such problems before.??hi rahul....
please check your code gain and just check if there is some zero padding or some other conversion exit required..many times this is the major problem while fecthing the data.
please check whther the data is coming with some zero padding or some other conversion. -
Itunes on NAS MetaData retrieval problem
I have a large library from a cd collection stored as .wav files. The library is on a 2TB IOmega Stor Senter. I have no problems accessing the tunes but the artist, album & artwork are not recognized. I originally imported the CD's with the windows media player, which does recognize the data. Do I have to put the files on the hard drive or convert the format or is there an easier way to fix in itunes?
iTunes does not support storing metadata in WAV files, in normal use it will store the metadata separately in the iTunes library file.
If your looking for a lossless format for your music, one that can be shared between iTunes and Windows Media Player then the only practical choice is Apple Lossless. iTunes of course fully supports Apple Lossless, and with a free directshow filter WMP can play Apple Lossless as well, and with a free plugin WMP can also be made to read the metadata inside Apple Lossless files. -
EMAIL AUTOMATIC RETRIEVAL PROBLEM
Hi,
I just detected a strange behavior I cannot explain.
I have my n95-4 configured with AUTOMATIC RETRIEVE to get MESSAGES with a maximum size of 5kb by a POP account.
The messages are retrieved, but some of them, when you open them are EMPTY. ALWAYS messages smaller than 5kb. If you pres RETRIEVE again you get the complete message.
This happends in a RANDOM basis, but a lot of times a day.
I have detailed screen shoots if someone is interested.
Any ideas?
Información sobre Symbian / NSERIES en Español en http://symbianespanol.wordpress.comThis sounds like a reasonable request, is the v11 firmware just broken in this regard?
Maybe you are looking for
-
my macbook pro 13.3 (OS XLion 10.7.4) is one month old, few days ago it got freezed(hanged) at that time only 2 apps were running google chrome and xcode, i pressed power button (hold it for few seconds) to restrat. Today when i opened the lid(as my
-
Date input & differences between MX & CS
Have got several forms that I use & they all input dates, all ASP VB. The ones that I have created in dreammweaver MX input the date in the correct, UK format for me. eg: dd-mm-yy If I create in CS3 or CS5.5 dates appear in US format eg: mm-dd-yy If
-
Numerous updates to Keynote, Speaker, and Numbers?
I've received numerous software update notifications for iWork (Keynote, Speaker, Numbers) over the past two months, and four within the past 30 days. I update the software, but the notifications continue to return. Anyone else having this issue?
-
My icons keep disappearing. For instance: 1) In the top panel I know there is volume control and a Universal Access settings icons but I can't see them. If I click on the top panel roughly where I suspect they are I get their drop down menus. 2) Ico
-
Leopard 5 user lincence with new iMac?
I am getting ready to buy a new iMac, and I assume the OS disk that comes with it can not be installed on more than one computer. I also have a MBP that came shipped with Tiger, and would like to have the same OS on both of them. Can the OS disk that