How to get Previous Record
Dear All,
i have a query, kindly request to help me out
Thanks for all ur help
Create Table tab1
( ID NUMBER,
NAME VARCHAR2(20),
MODE VARCHAR2(20),
MOVEDT DATE
INSERT INTO TAB1 VALUES(1,'HONDA','ROAD','1-JAN-2010');
INSERT INTO TAB1 VALUES(2,'HONDA','SEA','25-JAN-2010');
INSERT INTO TAB1 VALUES(3,'HONDA','AIR','15-FEB-2011');
INSERT INTO TAB1 VALUES(4,'HONDA','TRAIN','20-MAR-2011');
INSERT INTO TAB1 VALUES(5,'HONDA','ROAD','1-APR-2011');
can we get output like this
get records which happend before 20-MARCH-2011 whose mode is in Train,Air,Sea in one line
PREVIOUS PREVIOUS-PREVIOUS
ID NAME MODE MOVEDT ID NAME MODE MOVEDT ID NAME MODE MOVEDT
5 HONDA TRAIN 20-MAR-2011 3 HONDA AIR 15-FEB-2011 2 HONDA SEA 25-JAN-2011
Dear All,
i have a query, kindly request to help me out
Thanks for all ur help
Create Table tab1
( ID NUMBER,
NAME VARCHAR2(20),
MODE VARCHAR2(20),
MOVEDT DATE
INSERT INTO TAB1 VALUES(1,'HONDA','ROAD','1-JAN-2010');
INSERT INTO TAB1 VALUES(2,'HONDA','SEA','25-JAN-2010');
INSERT INTO TAB1 VALUES(3,'HONDA','AIR','15-FEB-2011');
INSERT INTO TAB1 VALUES(4,'HONDA','TRAIN','20-MAR-2011');
INSERT INTO TAB1 VALUES(5,'HONDA','ROAD','1-APR-2011');
can we get output like this
get records which happend before 20-MARCH-2011 whose mode is in Train,Air,Sea in one line
PREVIOUS PREVIOUS-PREVIOUS
ID NAME MODE MOVEDT ID NAME MODE MOVEDT ID NAME MODE MOVEDT
5 HONDA TRAIN 20-MAR-2011 3 HONDA AIR 15-FEB-2011 2 HONDA SEA 25-JAN-2011
Similar Messages
-
How to get latest record on top of the result list
Hi Gurus,
How to get latest record on top of the result list when you open the record.
saved data method in BT120H_CPL of OverView page and result list in ICCMP_INBOX.
Regards,
RaviHi
Try sort descending by on fileld "changed at ".
manipulate the sort depends on your requirement
Regards
Logu -
How to get multiple records using fn-bea:execute-sql()
Hi,
I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
Regards,
Nagaraju
Edited by: user10373980 on Sep 29, 2008 6:11 AMHi,
Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
For example:
fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
Id Name
01 XXX
02 YYY
03 ZZZ
I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
<student>
<Name>XXX</Name>
</student>
I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
Please suggest.
regards,
Venkat -
How to get the records of the particluar day when delta laod failed (Urgent
Hello BW Gurus,
We are facing one serious issue. Here is the scenario.
1st time the Delta was init and for next consective two loads delta ran sucessfully... then next time delta got failed and the status is in red..... even though system started next delta loading and it has fetched the records and status is in green but not activated ,,,,,its happening still past one month so almost there are 20 requests which are to be get activatetd.
How to resolve this issue.
<b>And how to get the records of the partilcular day when the delta got failed.
</b>
Anyone have come across with this strange issue then help me out and i will rewarrd the points.
Urs,
Raki.Hi
Can you provide more details about your extractor and data targets.
Are you loading delta to an ODS ??
If you are loading to an ODS, The only solution i can see is to get the missing delta records via FULL UPDATE. Because if you delete the error request from ODS it will also delete the 20 successful requests above it.
Cheers
Praveen
null -
How to get the records which has a specified x/y coordinates
Hi,
How to get the records which has a specified x/y coordinates. I have a table which has street data. And another table has a point data. Now I just want to get the records from street data which includes the points in the point data table. Can any one give your suggestions
Thanks and Regards
AravindanAravinda,
If you want to find the line segments which intersect the given
set of points, you can do that with SDO_RELATE.
siva -
I don't have owner's phone number, how to get previous owner's Apple ID(email address) and send him a email let him remove the device from the account
There is no way for anyone on this forum to assist you. Apple will also not assist you. If you purchased the device thru ebay, file a claim. If you purchased it some other way, I'm sorry. there is nothing anyone can do to help you.
-
How to fetch previous record from internal table?
Hi,
My final internal table (it_final) has all the data month wise year wise.(opening and closing qty)
but if
Material Batch Month Year opening_qty closing_qty
FC5431 abc 08 2008 100 50
FC5431 ABC 09 2009 0 100
Suppose I want to take PREVIOUS record(closing_qty = 50 in my 09/2009 openin_qty = 50) how will Ido this?
Any solution????????? BTW i m using S033 for opening an closing qt monthwise.
Plz reply soon if anyone knows.
Thanks and Regards,
ArchanaHi,
Test the following Sample code hope will solve out your problem,
TYPES: BEGIN OF ty_test,
m(3),
open_qty TYPE i,
close_qty TYPE i,
END OF ty_test.
DATA: it_test TYPE STANDARD TABLE OF ty_test WITH HEADER LINE,
wa_test LIKE LINE OF it_test,
ctabix LIKE sy-tabix,
ptabix LIKE sy-tabix.
it_test-m = 'AAA'. it_test-open_qty = 100. it_test-close_qty = 50. append it_test.
it_test-m = 'AAA'. it_test-open_qty = 0. it_test-close_qty = 100. append it_test.
LOOP AT it_test.
ctabix = sy-tabix.
IF sy-tabix > 1.
ptabix = sy-tabix - 1.
READ TABLE it_test into wa_test INDEX ptabix.
IF sy-subrc = 0.
it_test-open_qty = wa_test-close_qty.
ENDIF.
MODIFY it_test INDEX ctabix.
ENDIF.
ENDLOOP.
LOOP AT it_test.
WRITE: it_test-m, it_test-open_qty, it_test-close_qty, /.
ENDLOOP.
Regards,
Faisal -
How to get previous day of the date
Hi,
for a given date I need one day minus as a result date
my input would be any date
for example :
Input Date : 2006-03-22 ( yyyy-mm-dd)
Output should be : 2006-03-21
If my input is 1st of April 2006, output i would expect is 31st March 2006
Please suggest how to achieve this
Thanks in advance
NileshFind below the code to get previous day of the current date
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class PreviosDay
public static void main(String[] args)
DateFormat dateFormat = new SimpleDateFormat( "MM/dd/yyyy");
Calendar cl = Calendar.getInstance();
// you can use a Date object's getTime() method , which is initialiazed
// to desired date here directly ex: Date dt = new Date("10/10/2004");
// cl.setTimeInMillis(dt.getTime());
cl .setTimeInMillis(System.currentTimeMillis());
cl.add(Calendar.DAY_OF_MONTH, -1);
System.out.println("Previous date : "+dateFormat.format(
new Date(cl.getTimeInMillis() ) ) );
} -
How to get previous day data if i dont have current day data.
Hello Gurus,
I have a stock levels data in ODS. when there is no movements, we are not getting any stocks into ODS. So we have to get previous day data as it is for current day data into another ODS.
Could you please help me in this regard.
Thanks in advance,
RamaRama -
0CALDAY can't help us in this scenario .
Step 1 :
To do this - You have to add one ZDATE (InfoObject ) to 1st ODS. ZDATE is updated by itself from current date of system when ever you are loading data to 1st ODS.
Step 2:
You have to do full update to 2nd ods.At the selection screen of InfoPackage (from 1st ODS to 2nd ODS ) you have to write following code for ZDATE.
pseudo Code:
1) Select fields "Rec_INSERT","Time stamp","Request Status" and "Request ID" where ICUBE = ODS1 from table "RSMONICDP"
2) Populate above selected fields data in INTERNAL TABLE
3) Sort INTERNAL TABLE by Time stamp .
4)
If (Record Count = ' 0 ' for current date in internal table )
update records from ODS1 to ODS2 where ZDATE = "yesterday date"
else
update records from ODS1 to ODS2 where ZDATE= "today date"
endif.
Make sure this is full update not delta update from ODS1 to ODS2
I am sorry, I m not good in Coding but I am sure if u use this logic,You can meet your requirement.
I hope you can understand my logic. Let me know if you have any questions,
Anesh B . -
Data merging: how to get multiple records in single text frame?
Hi
I'm experimenting with data merging in InDesign CS3. The biggest stumbling block I've come across is trying to get my records to flow as continuous text in a single text frame (which would, ideally, autoflow onto new pages in the document). The records vary considerably in length, and so I can't just create a standard text frame to repeat on the page.
Perhaps data merging isn't the best way of doing this and I should be learning to script instead. I feel like I'm just one step away, though.
Any suggestions would be appreciated.OK, new scenario now:
Is it possible to set a text box to auto-resize to fit the content that comes in during the data merge?
I have placed one of my data fields in a text box with a stroke and fill, and placed this as an anchored object in the main text box with the other fields. The problem is that the length of text in this field varies considerably, and I'd like the text to fit snugly within its box. Ideally this text box would not appear at all if the field is blank for a particular record.
I hope I've explained all of that clearly enough. Any ideas? -
How to get changed records in a table
I have a table t1 as
create table t1( num number, name varchar2(35),code char(2));
my data looks like
num name code
1 xy c1
2 zx c2
3 qq c5
after 2 hr i have changed my value to:
1 zx c3
2 za c2
3 qq c5
i need to get a select statement which gives the changed rows:
my output looks like:
1 zx c3
2 za c2
how to get these changed rows
Thanks in advance"It's not working" - fabulous feedback.
Really any reply to that should be just left at "because you're doing it wrong" however....
The flashback query syntax doesn't work like that.
Has to be more like this:
select t1.column,t2.column
from t1 ,t2
where t1.column=t2.column
MINUS
select t1.column,t2.column
from t1 AS OF TIMESTAMP TO_TIMESTAMP('27.04.2011 10:00:00', 'DD-MM-YYYY HH24:MI:SS')
, t2 AS OF TIMESTAMP TO_TIMESTAMP('27.04.2011 10:00:00', 'DD-MM-YYYY HH24:MI:SS')
where t1.column=t2.column;The documentation is great for seeing how things should work, syntax etc.... you should try it. -
How to get the record set into array?
Hi,
I want to get the record set into array in the procedure and do the processing of the array later in procedure.
below is the stored procedure i am working on:
procedure bulk_delete_group(p_group_id in Array_GroupListID) as
begin
for i in p_group_id.first..p_group_id.last loop
--Here I have to get the list of user id before deleting group
SELECT user_id into *<SOME ARRAY>* FROM group_members WHERE group_id = p_group_id(i);
DELETE group WHERE group_id = p_group_id(i);
--Process the user id array after group deletion..
end loop;
end bulk_delete_group;
Thanks in advance
AdityaSomething like this ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.20
satyaki>
satyaki>
satyaki>select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
9999 SATYAKI SLS 7698 02-NOV-08 55000 3455 10
7777 SOURAV SLS 14-SEP-08 45000 3400 10
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 4450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 7000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
13 rows selected.
Elapsed: 00:00:02.37
satyaki>
satyaki>create type np is table of number;
2 /
Type created.
Elapsed: 00:00:03.32
satyaki>
satyaki>Create or Replace Procedure myProc(myArray np)
2 is
3 i number(10);
4 rec emp%rowtype;
5 Begin
6 for i in 1..myArray.count
7 loop
8 select *
9 into rec
10 from emp
11 where empno = myArray(i);
12
13 dbms_output.put_line('Employee No:'||rec.empno||' Name:'||rec.ename);
14 end loop;
15 End myProc;
16 /
Procedure created.
Elapsed: 00:00:00.88
satyaki>
satyaki>
satyaki>declare
2 v np:=np(9999,7777);
3 begin
4 myProc(v);
5 end;
6 /
Employee No:9999 Name:SATYAKI
Employee No:7777 Name:SOURAV
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.30
satyaki>Regards.
Satyaki De. -
How to get previous values based on date filters
Hi
i have two fields gldate and startdate
gldate values are like 1/31/2011,2/28/2011,3/31/2011,4/30/2011,5/31/2011 ...
startdate values 1/1/2011,2/1/2011,3/1/2011,4/1/2011,5/1/2011 ...
i need a condition like gldate<startdate
if startdate is 11/1/2011 then i get all the values before 11/1/2011 values
im using filter for date filed
let us filter values is startdate--11/1/2011 and gldate is 11/30/2011 but that cond falls
how to get this condition
plz its urgent to meHi
i have two fields gldate and startdate
gldate values are like 1/31/2011,2/28/2011,3/31/2011,4/30/2011,5/31/2011 ...
startdate values 1/1/2011,2/1/2011,3/1/2011,4/1/2011,5/1/2011 ...
i need a condition like gldate<startdate
if startdate is 11/1/2011 then i get all the values before 11/1/2011 values
im using filter for date filed
let us filter values is startdate--11/1/2011 and gldate is 11/30/2011 but that cond falls
how to get this condition
plz its urgent to me -
How to delete previously recorded audio in slideshow
My recorded slideshow audio comes out with previously recorded audio intact (like with an echo) . Choosing "Record from Beginning" made no difference. Clearing recording made no difference either.
Can anyone help? Thank youHere is a manual that may help:
http://help.apple.com/imovie/ipad/1.4/index.html -
Hi Team,
1) I need Query to get the orphan records in the wf_notification tables to purge them.
2) Same way I need to purge unwanted records in WF NOTIFICATION OUT table.Can you please let me know the process to get unwanted records in
WF NOTIFICATION OUT table and the process to purge them.
Thanks in Advance!
Thanks,
RakeeshHi Rakeesh,
Please review notes:
11i-12 Workflow Analyzer script for E-Business Suite Workflow Monitoring and Maintenance [Video] (Doc ID 1369938.1)
bde_wf_data.sql - Query Workflow Runtime Data That Is Eligible For Purging (Doc ID 165316.1)
What Tables Does the Workflow Purge Obsolete Data Program (FNDWFPR) Touch? (Doc ID 559996.1)
Workflow Purge Data Collection Script (Doc ID 750497.1)
FAQ on Purging Oracle Workflow Data (Doc ID 277124.1)
Thanks &
Best Regards,
Maybe you are looking for
-
Change country - same Apple ID
There are four things that I do not understand about the problems faced when changing countries (France to the UK in my case) with the same Apple ID. 1. I understand from this site and others that I am obliged to repurchase my apps. Why? - when I mov
-
Using Michael Wohl et al's FCPX Advanced Editing book in 10.1
Hi I got Final Cut Pro X Advanced Editing (by Michael Wohl, Alexis Van Hurkman and Mark Spencer) out of the library. It has 2 dvds set up with events and projects folders as per pre-10.1. I've followed instructions and copied the sparseimages to an e
-
A question regarding Management pack dependency.
Hi All, I am new to SCOM, I have a question regarding management pack dependency. My question is, Is Dependency is required when New alerts are created in a unsealed MP and the object class selected during alert creation is (i.e Windows server 2012 f
-
Handling "$" in a String
Hi there, I am trying to manipulate two strings. One of the string contains �$� (not �\$�) character, reads from a file. For example: String str1 = �Replace XYZ with�; String str2 = �The value is $10.00�; // read from a file I used replaceAll method
-
AppIntegrator zip file download path
Dear All, I am using NW Portal 7 and want to use Appintegrator to connect yahoo and some other websites.Please let me know the path to download com.sap.portal.howtos.webapp.par file for EP7. I have gone through the following link but unable to get co