Get result
Hi,
I have a below code, and table contains the rows which is for particular date.
From the table I have to select, last column of previous days value.
i.e, if current date is 31July2009, I have to select 30July2009 and print the value 9
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<table border="1">
<tr>
<td>C1</td>
<td>C2</td>
<td>C3</td>
<td>C4</td>
<td>C5</td>
<td>c6</td>
<td>C7</td>
<td>C8</td>
</tr>
<tr>
<td>29July2009</td>
<td>2.00</td>
<td>3</td>
<td>8</td>
<td>3</td>
<td>7</td>
<td>1</td>
<td>4</td>
</tr>
<tr>
<td>30July2009</td>
<td>4</td>
<td>67</td>
<td>1</td>
<td>7</td>
<td>7</td>
<td>1</td>
<td>9</td>
</tr>
<tr>
<td>31July2009</td>
<td>9</td>
<td>3</td>
<td>78</td>
<td>78</td>
<td>678</td>
<td>678</td>
<td>678</td>
</tr>
</table>
</body>
</html>
Whoops, misunderstanding, sorry :( Its six in the morning here, I shouldnt think of IT-related stuff that early anyhow.
Similar Messages
-
Help me in calling stored procedure and getting results
hi
i have a SP like this
CREATE OR REPLACE PACKAGE P1 AS
TYPE g_con_ref_cursor is REF CURSOR ;
TYPE g_con_error IS RECORD
error_code NUMBER,
error_desc varchar2(2000)
PROCEDURE PROC_CURSOR
(i_str_userid IN VARCHAR2,
o_cur_ref_cur OUT g_con_ref_cursor,
o_rec_error OUT g_con_error,
o_num_status OUT NUMBER);
END;
and i now i am trying to call this SP using my java program
i am able to register the out put params for 2nd and 4 th variable
my doubt is how i can register the output param for g_con_errorand how i can get result from this ????
my java program is like this
Connection connection = DatabaseHelper.prepareConnection();
CallableStatement proc = connection.prepareCall("{ call P1.PROC_CURSOR(?, ?, ?, ?) }");
proc.setString(1,"jn26557");
proc.registerOutParameter(2,oracle.jdbc.driver.OracleTypes.CURSOR);
proc.registerOutParameter(3,Types.STRUCT,); //HOW TO SET THIS ?????
proc.registerOutParameter(4,oracle.jdbc.driver.OracleTypes.NUMERIC);
proc.execute();
plz help me in this
i have no idea how to do it
any help would be appreciated
Thanks in advance
Jaya Prakash NalajalaYou have the requirements to build the stored procedure, what have you got so far?
Post your attempt and any errors or issues that you might be experiencing. Writing the whole procedure for you (without the table structure even) is going to be difficult. -
How do I insert new record and get results on a landing page
how do I insert new record and get results on a landing page
It's not clear from your post what you are asking. In a SQL database, you use the INSERT statement to insert a row into a table. You use the SELECT statement to retrieve rows. Here's some basic info on how to do that within PHP
PHP MySQL Insert Into
PHP MySQL Select -
How to get result without single cotes in ''Cast(Multiset( '' Result.
select cast(multiset(select column_name
from user_tab_columns
where table_name = 'DAILY_PRODN_MIS'
and column_name like '%STOCK%'
order by column_name) as tab_type) result from dual;
RESULT
TAB_TYPE('BAGS_STOCK', 'BLUE_DUST_STOCK', 'CEMENT_STOCK', 'CEMENT_STOCK_33', 'CEMENT_STOCK_43', 'CEMENT_STOCK_53', 'CK_ADJ', 'COAL_IND_D_STOCK', 'COAL_IND_D_STOCK_ADJ', 'COAL_IND_E_STOCK', 'COAL_IND_E_STOCK_ADJ', 'COAL_IND_F_STOCK','OCK_ADJ', 'MTD_COAL_IMP_D_STOCK_ADJ', 'MTD_COAL_IMP_E_STOCK_ADJ', 'MTD_COAL_IND_A_STOCK_ADJ', 'MTD_COAL_IND_B_STOCK_', 'YTD_COAL_IMP_B_STOCK_ADJ', 'YTD_COAL_IMP_C_STOCK_ADJ', 'YTD_COAL_IMP_D_STOCK_ADJ', 'YTD_COAL_IMP_E_STOCK_ADJ')
How can i get result without single cotes for each column.Your query currently returns a collection type (tab_type) whereas it appears you want to return a delimited string.
There are actually quite a few ways to achieve this - with your own function, with a user-defined aggregate functions (e.g. Tom Kyte's stragg), with the MODEL clause or with CONNECT BY, e.g.
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> SELECT table_name,
2 SUBSTR (MAX (SYS_CONNECT_BY_PATH (
3 column_name, ',')), 2) column_names
4 FROM (SELECT table_name, column_name,
5 ROW_NUMBER () OVER (
6 PARTITION BY table_name
7 ORDER BY column_id) column_order
8 FROM user_tab_columns
9 WHERE table_name = 'BANK_ACCOUNT'
10 AND column_name LIKE '%U%') utc
11 START WITH column_order = 1
12 CONNECT BY column_order = PRIOR column_order + 1
13 AND table_name = PRIOR table_name
14 GROUP BY table_name;
TABLE_NAME COLUMN_NAMES
BANK_ACCOUNT ACCOUNT_NAME,ACCOUNT_NUMBER
SQL> -
How to get result of Select from stored function.
I need to get result of select from a stored function.
In the end of my stored function I makes final select (four columns).
How it can be retrived from function?Hi,
A function can only return one value, but it sounds like you want to return 4 values.
The one value that you return can be a record, with many columns, such as a ROWTYPE, or a TYPE that you define.
You can return an XMLTYPE that has whatever elements you want.
You can write a procedure that has several OUT parameters. (You can have OUT parameters in a function, but a lot of people find that confusing.)
In very special circumstance, you might consider returning a string that is a delimited list of values, such as '7639,SMITH,,17-DEC-1980'.
Someoneelse has a good point.
We could give a better answer if you ask a specific question, like:
"I have this table ...
I want a function such that, if I call it with these parameters ... I get ...
but if I call it like this ... then I get ..." -
Not getting Result please Help
Hi All
query_string VARCHAR2(2000);
query_string are EMPNO,ENAME
for rec1 in (SELECT query_string FROM p_table_name ) loop
utl_file.put_line(v_file, rec1.result1);
END LOOP;
not getting Result please Help
RegardsYou may look at this:
michaels> DECLARE
cur sys_refcursor;
query_string VARCHAR2 (2000) := '';
p_table_name VARCHAR2 (30) := UPPER ('emp');
p_stmt LONG;
BEGIN
FOR c IN (SELECT ROWNUM rn, column_name, COUNT (*) OVER () cnt
FROM user_tab_cols
WHERE table_name = p_table_name AND hidden_column = 'NO')
LOOP
query_string :=
query_string || c.column_name
|| CASE
WHEN c.rn != c.cnt
THEN ' || ''|'' || '
END;
END LOOP;
p_stmt := 'select ' || query_string || ' FROM ' || p_table_name;
-- DBMS_OUTPUT.put_line (p_stmt);
OPEN cur FOR p_stmt;
FOR rec1 IN (SELECT EXTRACTVALUE (t.COLUMN_VALUE, '/ROW//text()') result1
FROM TABLE (XMLSEQUENCE (cur)) t)
LOOP
/* replace with utl_file in case ... */
DBMS_OUTPUT.put_line (rec1.result1);
END LOOP;
CLOSE cur;
END;
7369|SMITH|CLERK|7902|17-DEC-80|800||20
7499|ALLEN|SALESMAN|7698|20-FEB-81|1600|300|30
7521|WARD|SALESMAN|7698|22-FEB-81|1250|500|30
7566|JONES|MANAGER|7839|02-APR-81|2975||20
7654|MARTIN|SALESMAN|7698|28-SEP-81|1250|1400|30
7698|BLAKE|MANAGER|7839|01-MAY-81|2850||30
7782|CLARK|MANAGER|7839|09-JUN-81|2450||10
7788|SCOTT|ANALYST|7566|19-APR-87|3000||20
7839|KING|PRESIDENT||17-NOV-81|5000||10
7844|TURNER|SALESMAN|7698|08-SEP-81|1500|0|30
7876|ADAMS|CLERK|7788|23-MAY-87|1100||20
7900|JAMES|CLERK|7698|03-DEC-81|950||30
7902|FORD|ANALYST|7566|03-DEC-81|3000||20
7934|MILLER|CLERK|7782|23-JAN-82|1300||10
PL/SQL procedure successfully completed. -
Question
I have one problem and I think it is a settings issue. When I google the web I get results. Now, I visited some website and then I want to return to my search results and pick another search result. And there is a problem: I don't have any markers (diffrent link colour for visited sites in IE) that would help me to distinguish visited and not visited sites.Why start a new and very similar thread to your other one which you have not responded to (have you read the replies?)
I suggest that no response is made to this duplicate thread. -
Web services and ADF 11g- get Result from backing bean
I'm executing an action from backing bean (call Web service that returns complex data types)
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("unesiPonudu");
Object result = operationBinding.execute();
result is instance of oracle.adf.model.adapter.dataformat.XMLHandler$DataCollection but DataCollection is not accessible.
How to get results from method?
Tnx,
AndrejaHi,
there should be a result iterator in the Executables section which cotnains the result. If not, create it from the WS result entry in the DC palette. Once this iterator gets updated, you get the data from this iterator as it would be the case of a table accesses the WS
Frank -
select * from tablename ------always running,but get nothing
select top 1 * from tablename -------get result quickly
select top 2 * from tablename -------get result quickly
select top 14259 * from tablename --------get result quickly
select top 14260 * from tablename --------always running,but get nothing
the thread is:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:150)
java.net.SocketInputStream.read(SocketInputStream.java:121)
com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1782)
com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:4838)
- 已锁定com.microsoft.sqlserver.jdbc.TDSReader@54269910
com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6150)
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:402)
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
- 已锁定java.lang.Object@320b1499
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:332)when I run the below sql of Uri Dimant,I get many rows,I think you are right!
Do you have some method to handle this problem?
Or do you have some information for me to Learn?
Thanks a lot.
SELECT
owt.session_id AS waiting_session_id,
owt.blocking_session_id,
DB_NAME(tls.resource_database_id) AS database_name,
(SELECT SUBSTRING(est.[text], ers.statement_start_offset/2
+ 1,
(CASE WHEN ers.statement_end_offset = -1
THEN LEN(CONVERT(nvarchar(max), est.[text])) * 2
ELSE ers.statement_end_offset
END
- ers.statement_start_offset
) / 2)
FROM sys.dm_exec_sql_text(ers.[sql_handle]) AS est) AS waiting_query_text,
CASE WHEN owt.blocking_session_id > 0
THEN (
SELECT
est.[text] FROM sys.sysprocesses AS sp
CROSS APPLY sys.dm_exec_sql_text(sp.[sql_handle]) as est
WHERE sp.spid = owt.blocking_session_id)
ELSE
NULL
END AS blocking_query_text,
(CASE tls.resource_type
WHEN 'OBJECT' THEN OBJECT_NAME(tls.resource_associated_entity_id, tls.resource_database_id)
WHEN 'DATABASE' THEN DB_NAME(tls.resource_database_id)
ELSE (SELECT OBJECT_NAME(pat.[object_id], tls.resource_database_id)
FROM sys.partitions pat WHERE pat.hobt_id = tls.resource_associated_entity_id)
END
) AS object_name,
owt.wait_duration_ms,
owt.waiting_task_address,
owt.wait_type,
tls.resource_associated_entity_id,
tls.resource_description AS local_resource_description,
tls.resource_type,
tls.request_mode,
tls.request_type,
tls.request_session_id,
owt.resource_description AS blocking_resource_description,
qp.query_plan AS waiting_query_plan
FROM sys.dm_tran_locks AS tls
INNER JOIN sys.dm_os_waiting_tasks owt ON tls.lock_owner_address = owt.resource_address
INNER JOIN sys.dm_exec_requests ers ON tls.request_request_id = ers.request_id
AND owt.session_id = ers.session_id
OUTER APPLY sys.dm_exec_query_plan(ers.[plan_handle]) AS qp
GO -
Result handler of a remote call not executed till the other remote calls get result
I have 3 remote calls in sequence.
Say RemoteCall1, RemoteCall2 and RemoteCall3. RemoteCall1 takes the least time say 5 seconds to get results. RemoteCall2 also 5 seconds and RemoteCall3 takes 30 seconds. But the resulthandler for RemoteCall1 does not execute till the RemoteCall3 gets results from server. Any fixes to call resulthander for RemoteCall1 as soon as it gets result without waiting for RemoteCall3 results.
by the way I am usindg Robotlegs framework and AsyncToken.Don’t make remoteCall3 until you get the results from remoteCall2, etc. That’s the only way I know to guarantee order.
Fllash queues up all remote calls until the end of the frame and sends them all at once, although a network monitor should show that the go out in the order you made the calls.
Similarly, Flash processes all available results at the end of a frame. Results are asynchronous, but if all three results arrive in the same frame, they will all get deserialized. And, the server may not be guaranteed to return results in the order requested, especially if different servers are handling the individual calls.
I’m not sure if your time to get results is gated by server response or Flash processing the results. I suspect it is the latter. You also have the option of changing the resultFormat to get something that doesn’t need processing like XML and process it later. -
Get result from google by java
after greeting
i want to know how to make search and get result from google through jsp and display it in jsp
if anyone has answer
please send me it as soon as possible
thanksCheck what API's google provides and make use of it.
Start here: [http://code.google.com]. -
I want to disable 'Spotlight' for repairing my disk "Macintosh HD" , but somehow the command 'sudo mdutil -a -i off' does not work in 'Terminal'. I get result as ' bash: sudo: command not found' .I am using OS 10.10. Please help.
It appears that you may not have a properly installed OS X system.
You must be connected to the Internet to reinstall OS X.
In the menu bar, choose Apple menu > Restart. Once your Mac restarts (and the gray screen appears), hold down the Command (⌘) and R keys.
Select “Disk Utility,” and then click Continue.
Select your startup disk from the list on the left, and then Repair Disk.
After disk is repaired, select Reinstall OS X, then click Continue.
Follow the onscreen instructions. In the pane where you select a disk, select your current OS X disk -
I want to get the TS2013 result list to custom the report in labview vi, but it error at get the property object of "MainSequenceResult->TS", please help me ,thanks
Solved!
Go to Solution.
Attachments:
get value.jpg 49 KBI' m sorry, Because my English is not very good, so it may not very clear presentation
I use windows7 and TS2013, The attachment"get result list size.jpg" is looking at the variables in the sequence editor while at a breakpoint, attachment"Error.jpg" is error information when access variable "TestSocket.MainSequenceResult->TS.SequenceCall.ResultList", Why I want to get the ResultList,because it include all step's result and other information
Now the problem I encountered was I don't know what is the "Referenced Object", When I use the mouse to click on it, it goes blank, I copy the "ResultList" and paste it in a string, it show like this "TestSocket.MainSequenceResult->TS.SequenceCall.ResultList"
Attachments:
get result list size.jpg 51 KB
Error.jpg 175 KB -
Create a Java file runtime and Execute to get result
Hi,
Is this possible to generate a Java Class run time and execute it to get result..if yes how...any example or site reference..
ThanksYes: http://www.java2s.com/Code/Java/JDK-6/CompilingfromMemory.htm
It would be better if you tell us what the problem is that you want to solve.
The above may not be optimal, as it requires you provide your users with a part of the JDK (not JRE!): tools.jar, placed correctly in a jre directory, if I remember well. -
hi,
is any possible to get result after click alert view by using [[UIApplication sharedApplication] openURL:@"itms-services://?action=download-manifest&url...
when i close app, the alert view ([[UIApplication sharedApplication] openURL) is aleady exist, is it not uialertview?, i can't find any alert view by
for (UIWindow *keyboardWindow in [[UIApplication sharedApplication] windows]) {
if ([[keyboardWindow description] hasPrefix:@"<UIALERT"] == YES) {
isExists = YES;
any help, thanks.I have the MS-6968 device and i want to use driver 1.4.x or 3.0.x. I found the driver 1.4.2.10 but i cannot find any WIDCOMMSecurity code.
So, can anyone give me a link for BTWPatcher.exe???
It cannot be found here (Jon's Bluetooth ) anymore.
Thanks -
How to get result of MDM validation expression with type warning?
I need to get result of MDM validation expression with type WARNING (in automatic execution),
but - method validationResult.getFailedValidations(..) returns validation if it has type ERROR,
so all Warnings treated only as success despite it returned false or true.
My question - how can I get that 'false or true' expression resut for validation.
thanksHello Vladimir
By my opinion, hook warning exception isn't make sense because after warning message data will be change(upload).
Moreover if you start validation from WF Warning exception doesn't work at all.
If you want to do some data changes you should use and hook Error exception.
Regards
Kanstantsin Chernichenka
Maybe you are looking for
-
Differences with iphone 4 to 4s
i have spoken to a few people who have iphone 4s they think there is no real difference between them is this true or is there a major thing i need to know between the two, what are the real differences
-
Hi- I looked in other topics, but none of them answered my question. I opened up itunes and clicked edit, and went to preferences. However, there are only 7 tabs that show up, ipod not being one of them. The ones that show up are general, podcats, pl
-
I would have posted this on the Facebook Developers Forum, but it seems to be down for the moment. I have the code for a "Like" button on my site, but the code also allows for the amount of people who have clicked the Like button. Is there a way to d
-
I wish to print my own cards using iPhoto 11 (9.1.1). I have chosen a theme and layout but I cant print the pastel-colored borders and patterns, only the photos and the text actually print. What am I doing wrong?
-
Custom Authentication in 4.2 will not save Authentication Function Name
Upgrade from 4.0 to 4.2. When creating a new Custom Authentication the Authentication Function Name will not save in the Apex Create\Edit screen. After the Apply Changes button is clicked and the authentication scheme reopened - the Authentication Fu