Get last datas ina timeseries to fill missing data
Hello everybody,
I have to fill missing information in daily timeseries data
and when it is empty
i have to load data from last rows in database
so for example my table is table1
desc table1
CREATE TABLE table1
TICK VARCHAR2(22 BYTE) NOT NULL,
My_TIME TIMESTAMP(3) NOT NULL,
PRICE NUMBER(20,8),
VOLUME NUMBER(20,8),
My_time tick price volume
26/02/2008 14:24 MAC DODOL 50.16 4680926.8
26/02/2008 14:25 MAC DODOL 50.17 4685326.333
26/02/2008 14:26 MAC DODOL 50.17 4688907.389
26/02/2008 14:27 MAC DODOL 50.19 4697578.133
26/02/2008 14:28 MAC DODOL 50.23 4703991.636
26/02/2008 14:29 MAC DODOL 50.25 4707964.25
26/02/2008 14:30 MAC DODOL 50.24 4712001.167
26/02/2008 14:31 MAC DODOL 50.25 4719389.769
26/02/2008 14:32 MAC DODOL 50.25 4727232.033
26/02/2008 14:33 MAC DODOL 50.3 4744975.208
26/02/2008 14:34 MAC DODOL 50.35 4768389.946
26/02/2008 14:35 MAC DODOL 50.33 4780110.957
26/02/2008 14:36 MAC DODOL 50.28 4787568.143
26/02/2008 14:37 MAC DODOL 50.28 4795504.061
26/02/2008 14:38 MAC DODOL 50.28 4803979.947
26/02/2008 14:39 MAC DODOL 50.3 4818803.025
26/02/2008 14:40 MAC DODOL 50.35 4861607.508
26/02/2008 14:41 MAC DODOL 50.35 4894889.552
26/02/2008 14:42 MAC DODOL 50.35 4909506.875
26/02/2008 14:43 MAC DODOL 50.36 4917993
So I have to fill mising datas until 20:00:00
how can i do this
I can create the dates series
with this query
select all_dates.d missing
from (
select to_date('20080227 20:30:00','yyyymmdd HH24:MI:SS')-1+rownum d from dual
connect by level<=15) all_dates, table1 x
where all_Dates.d = x.my_time(+)
and x.my_time is null
So i have to load
26/02/2008 14:43 MAC DODOL 50.36 4917993
for all missing times until 20:00:00
how can I do ?
Thank
Consider using a Pipelined Table function to dynamically generate the data instead.
There is a demo here:
http://www.psoug.org/reference/pipelined.html
Look at the "Generate Date List" demo
Similar Messages
-
Filling Missing Dates on Chart Axis in Web Template
Hi,
I have a chart in a web template that uses a range of data that is organized by date. The data does not contain every date in the range, for example:
Record 1: Jan 1/09
Record 2: Jan 14/09
Record 3 Feb 4/09,
Record 4: etc
The requirement for this chart is to display the dates on the category axis with the axis displaying all the dates between the first and the last date even if records for the dates do not exist. This can be done in a chart in Excel, but I have not found a way to duplicate this in a BW3.5 web template.
Our envionment is BI7 SP13, but we are still using the BW3.5 front end tools.
Thanks,
MelHi Mel,
you can solve this with a structure. First entry with variable date and all others with offset.
regards Sven -
Data integrator for HP-UX missing data quality and data profiling
Hi All,
I have installed ODI 10.1.3.40.0 from odi_unix_generic_10.1.3.4.0.zip in HP unix 11.23.
Data quality and data profiling is missing in that zip ? Could anyone please help me how to get installer of data quality and data profiling for Oracle data integrator in HP UX 11.23.
Any response will be highly appreciated.
Thanks in advance.
regards
Umapada
Edited by: user10612738 on Nov 28, 2008 1:54 AMThe integrated packaged( ODi, data quality and data profiling) for HP-UX wount available till 10.1.3.5.0 which will be released by this year end.
-
Need formula in my subreport to get last month date - CR XIr2
Post Author: olesco
CA Forum: Formula
I need to pass the value (#of units) from the subreport to the main report u2013 I know how to do that but my problem is I donu2019t know what formula should I put in my subreport to get last month date.
Both main report and subreport have a date parameter (Field link - {?DatePrompt}. What I need is when I fill in the current month date to the main report the subreport should process the last moth date.
Main report u2013 Date Range (2007-10-1) (2007-10-31) - result #of units = 22
u201CRecord Selection Formula Editor
DateRecd = {@DatePrompt} [i.e. current month]
Subreport u2013 should have data from last month - result #of units = 25
u201CRecord Selection Formula Editor
DateRecd < {@DatePrompt} [last month] ??????
There are 22 3 units this month and 25 units last month.
Any help is greatly appreciated.Post Author: SKodidine
CA Forum: Formula
DateRecd in dateadd('m',-1,minimum({@DatePrompt})) to dateadd('m',-1,maximum({@DatePrompt})) -
How to Get Missing Dates for Each Support Ticket In My Query?
Hello -
I'm really baffled as to how to get missing dates for each support ticket in my query. I did a search for this and found several CTE's however they only provide ways to find missing dates in a date table rather than missing dates for another column
in a table. Let me explain a bit further here -
I have a query which has a list of support tickets for the month of January. Each support ticket is supposed to be updated daily by a support rep, however that isn't happening so the business wants to know for each ticket which dates have NOT been
updated. So, for example, I might have support ticket 44BS which was updated on 2014-01-01, 2014-01-05, 2014-01-07. Each time the ticket is updated a new row is inserted into the table. I need a query which will return the missing dates per
each support ticket.
I should also add that I DO NOT have any sort of admin nor write permissions to the database...none at all. My team has tried and they won't give 'em. So proposing a function or storable solution will not work. I'm stuck with doing everything
in a query.
I'll try and provide some sample data as an example -
CREATE TABLE #Tickets
TicketNo VARCHAR(4)
,DateUpdated DATE
INSERT INTO #Tickets VALUES ('44BS', '2014-01-01')
INSERT INTO #Tickets VALUES ('44BS', '2014-01-05')
INSERT INTO #Tickets VALUES ('44BS', '2014-01-07')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-03')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-09')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-11')
So for ticket 44BS, I need to return the missing dates between January 1st and January 5th, again between January 5th and January 7th. A set-based solution would be best.
I'm sure this is easier than i'm making it. However, after playing around for a couple of hours my head hurts and I need sleep. If anyone can help, you'd be a job-saver :)
Thanks!!CREATE TABLE #Tickets (
TicketNo VARCHAR(4)
,DateUpdated DATETIME
GO
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-01'
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-05'
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-07'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-03'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-09'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-11'
GO
GO
SELECT *
FROM #Tickets
GO
GO
CREATE TABLE #tempDist (
NRow INT
,TicketNo VARCHAR(4)
,MinDate DATETIME
,MaxDate DATETIME
GO
CREATE TABLE #tempUnUserdDate (
TicketNo VARCHAR(4)
,MissDate DATETIME
GO
INSERT INTO #tempDist
SELECT Row_Number() OVER (
ORDER BY TicketNo
) AS NROw
,TicketNo
,Min(DateUpdated) AS MinDate
,MAx(DateUpdated) AS MaxDate
FROM #Tickets
GROUP BY TicketNo
SELECT *
FROM #tempDist
GO
-- Get the number of rows in the looping table
DECLARE @RowCount INT
SET @RowCount = (
SELECT COUNT(TicketNo)
FROM #tempDist
-- Declare an iterator
DECLARE @I INT
-- Initialize the iterator
SET @I = 1
-- Loop through the rows of a table @myTable
WHILE (@I <= @RowCount)
BEGIN
-- Declare variables to hold the data which we get after looping each record
DECLARE @MyDate DATETIME
DECLARE @TicketNo VARCHAR(50)
,@MinDate DATETIME
,@MaxDate DATETIME
-- Get the data from table and set to variables
SELECT @TicketNo = TicketNo
,@MinDate = MinDate
,@MaxDate = MaxDate
FROM #tempDist
WHERE NRow = @I
SET @MyDate = @MinDate
WHILE @MaxDate > @MyDate
BEGIN
IF NOT EXISTS (
SELECT *
FROM #Tickets
WHERE TicketNo = @TicketNo
AND DateUpdated = @MyDate
BEGIN
INSERT INTO #tempUnUserdDate
VALUES (
@TicketNo
,@MyDate
END
SET @MyDate = dateadd(d, 1, @MyDate)
END
SET @I = @I + 1
END
GO
SELECT *
FROM #tempUnUserdDate
GO
GO
DROP TABLE #tickets
GO
DROP TABLE #tempDist
GO
DROP TABLE #tempUnUserdDate
Thanks,
Shridhar J Joshi
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
How Get last five quarters data using ssrs expression
Hi All,
i have an ssrs report where i have to get last five quarters data and also last five months data when i select quarterly/monthly parameter.....
is there any possibilty that we can get this using ssrs expression
any help please.........Hi Mr.SMK,
According to your description, there is an SSRS report, you want to create a parameter, when you select quarterly, data of last five quarters will be displayed. If you select monthly, data of last five months will be displayed. If that is the case, please
refer to the following steps:
1. In design surface, in Report Data pane, right-click Parameters and click Add Parameter.
2. Type parameter name and prompt, set Data Type to Date/Time.
3. Click Available Values in left pane, select Specify values.
4. Click Add button, in Label text box, type Quarterly, then click (fx) button and type the expression like below:
=DateAdd("q",-5,Today())
5. Click Add button, in Label text box, type Monthly, then click (fx) button and type the expression like below:
=DateAdd("m",-5,Today())
6. Right-click the dataset used to retrieve data for the report and open Dataset Properties dialog box.
7. Click Filters in left pane, click Add button, select Data from Expression drop down list, set Operator to >=, in Value text box, type [@ParameterName].
The following screenshots are for your reference:
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
Hi all, can someone help me in getting last login date of a user in CQ5 please?
Hi all, can someone help me in getting last login date of a user in CQ5 please?
CQ is REST based and does not have the concept of session. So there is no feature to track login or logout details. Most of our customers use some kind of central authentication Ex- SSO hence no need arises to have such functionality built in. However if needed you have the ability to implement such at a project level solution. Ex:- custom login modules or auth-handler by taking project specific constraints and requirements into account
-
How to get last modified date and time of a file which is in apache server.
Hi ,
I need to get last modified date and time of a file in remote machine.
This file is in remote machine which has apache server installed.
I am trying to get this information by connecting to apache server from client by giving absolute URI of the file to file object.
URI is got from apache server URL by using toURI method.
when I use lastModified method , its throwing exception , because scheme of URI is not file.
I can't give scheme as file because ftp server is not installed on that server
Is there any other way to get this information .No, unless you can use an FTP client.
-
How to get last Build date of a dll in the real time target
Info On My Project
I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...
I am facing some problems while checking Build date of my Application file( .dll)
I have tried to use GetFileDate API. But it is not supporting for realtime Target..
So i have tried __DATE__ macro.. That also having some problems..
How to get last Build date of a dll from the real time target ??
Please Help to solve this....
Thanks
Vaishakh A KPlease reply if any one have suggestion...
-
Since the last update for "numbers", everytime I open numbers I get a notice that a font is missing. I don't care that it's missing and I would like to not see that message. How can I get rid of it?
A document you had open at the time you quit Numbers has a font that you do not have (probably Calibri). You can change the font to one you have OR close the file before you quit Numbers. Numbers will open files you had open when you quit.
Looks like:
The other thing you can do is check the box "Close windows when quitting an application" in "System Preferences > General" -
Using Fiscal/Year Period to get last year all months data
Hi,
Had a requirement to get Last Years 1-12 months data based on Fiscal/Year Period. So here i am using Fiscal/Year period as my input. Please let me know with code.
Regards,
VishnuHi ,
Where you want to write code ?
Well the basic logic will be like :
TYPES: BEGIN OF ty_range,
sign TYPE c LENGTH 1,
option TYPE c LENGTH 2,
low TYPE c LENGTH 8,
high TYPE c LENGTH 8,
END OF ty_range.
DATA : t_range TYPE TABLE OF ty_range,
w_range LIKE LINE OF t_range.
DATA :v_lastyear type c length 4 .
v_lastyear = sy-datum(4) - 1 .
w_range-sign = 'I'.
w_range-option = 'EQ'.
concatenate v_lastyear '001' t into w_range-low.
concatenate v_lastyear '012' t into w_range-high.
APPEND w_range TO t_range.
****it will select data from source package for last one year .Internally year and period store like YYYYPPP (2011001)
select SOURCE_PACKAGE WHERE 0fiscper IN t_range.
you can modify selection statement as per your requirement .
hope this will be helpful .
Regards,
Jaya Tiwari -
Need FM to get Last change date of Objects in package
Hi All,
Is there any Function module to get Last changed date of all Objects in a package .
How to get the last change date of class,methods,function module.....
I can get last change date of programs from TRDIR....UDAT....Similarly how can I get for Function Module and Class Methods.
With Thanks,
Dina.
Message was edited by: Dinamol SasidharanGo/double click on the affected cubes you want to see the time stamp.
click the Extras(tab on the upper of part of SAP) or simply 'Ctrl + F5'.
Box will appear.
Click on Logs for Save/Activate so you will see the linfo for the users who used this cube.
Then put time restriction for From and To(always the current day and time).
Then execute, all of the users who changed then saved/activated that cube will appear on that timeframe you view.
Hope this help. -
What is the table name for getting Last Receipt & issue date of material?
Hi Friends,
What is the table name for getting Last Receipt & issue date of material?
*Case 1:*
Here, I am running report in May 2008. But, if there is no goods receipt for the respective material since last 13th March 2007.
Then in this case Last goods receipt date should be 13th March 2007.
Please guide me.
Regards
SivaI checked MSEG table. But, I didn't find any field for date.
Can you tell me field name.
Regards
Siva -
Date when the cube was filled with data for the last time
Hi!
We are using a SAP BW System and on top of it BOBJ for reporting. Within BEx Web Application Designer, it's very simple to access the data, when the cube was filled with data for the last time. Is it possible to access this information within BOBJ, too?
Thanks for your help!
Greetings
StefanHallo Ingo,
thanks for your answer. That was exactly what we were looking for.
We will have to think about a workaround now.
Greetings
Stefan -
Get last changed date by Program ID/Object type/Object name of a task
Hi to all.
I'm looking for a way to get last changed date of an object by task number(CR). Any SAP function or utility someone has??
For example if I have a task with the object list:
R3TR PROG ZSD_ORD_COND_P
R3TR TABL ZCNDSLCTN
LIMU REPS ZSD_ORD_COND_CLS
R3TR TRAN ZZDIS
R3TR VIEW ZSD_VBAK_KONV
I need to get last changed date for each object.
Thanks,
Yuval Kaduri, Cellcom, Israel.
Edited by: yuval kaduri on Mar 2, 2008 2:59 PMHi Venu, thanks for the input.
In the table I don't have all changes made in objects that the CR is not released. I need to know all changed date of objects even if the CR is not released. There are few tables containing the date and time object last changed for the deferent types but I'm looking for a function or some utility someone wrote that gets the CR line info as - PgmID/Obj/Object name - and gives back last changed date and time.
Thanks,
Yuval Kaduri, Cellcom, Israel.
Maybe you are looking for
-
I have an website application. We are using Weblogic server. The application is an online purchase payment gateway. The payment gateway is done by a third party. Languages used : Struts, JSP and JAVA i created one jsp(confirmPaymnt.jsp) like this and
-
Hi Can anyone help me with the exact syntax to create temp table in Oracle 8i in Stored Proc. Eg. CREATE PROCEDURE MROSiteNoVendors @IDCustomer INT AS SELECT DISTINCT s.IDCustomer, SiteName, Address , AddressII, City, State, Zip, s.IDSite INTO #TempT
-
I'm a sudent at uni, and so often go out for the evening, and return sometime in the early hours of the next morning. Is it at all possible to change the settings so tat a day begins at 4 a.m. rather than midnight?
-
Recently I've created a new itunes account without credit,but unfortunately fail to buy any free apps. When I press the "download" button, a pop-up appear and ask me to complete the billing info. The point is that many of my friends can buy free apps
-
Hi all, My client needs standard way of Printing LIST PRICE from SAP. I know we can use V/LD pricing reports but is there any way to print Price List by customer/Material except using V/LD reports. Thanks, Manny