Missing dates in the table
HelloI have a table that could have a record for the day with the sale of information, but for some reason, there are missing dates, is it somehow I could find the witch dates are missing.
Example table:
Sales_Date | value
2010-01-01 | 20
2010 01-02 | 30
04-01-2010 | 40
The output of the query by the example above could only return the missing date (2010-01-03).
Thanks in advance
Might be a way
SQL> with t as
2 (
3 select to_date('2010-01-01','YYYY-MM-DD') sales_date, 20 val from dual union all
4 select to_date('2010-01-02','YYYY-MM-DD'),30 from dual union all
5 select to_date('2010-01-04','YYYY-MM-DD'),30 from dual union all
6 select to_date('2010-01-06','YYYY-MM-DD'),30 from dual union all
7 select to_date('2010-01-07','YYYY-MM-DD'),30 from dual union all
8 select to_date('2010-01-12','YYYY-MM-DD'),40 from dual
9 )
10 select (select min(sales_date) from t)+ level-1 dt from dual
11 connect by level <= (select max(sales_date) - min(sales_date) from t)+1
12 minus
13 select sales_date from t order by 1
14 ;
DT
-----------
1/3/2010
1/5/2010
1/8/2010
1/9/2010
1/10/2010
1/11/2010
6 rows selected
SQL>
Tags: Database
Similar Questions
-
How to select the missing data in the table?
< p >
< strong > I have a list of strings as follows (in the table):
"aaaaa".
"bath".
"momo".
I have a x VARCHAR column in table T1. Here is the data under x
"aaaaa".
"momo".
I would like to make a request as it will bring 'bath' as 'bath' is not in the table. Help, please!
Thank you.
< facilities >
< /p >Is it possible to have a sql using only is not a second table?
You might have fun with the unions:
SQL> select 'aaaaa' x from dual union all 2 select 'bbbbb' x from dual union all 3 select 'ccccc' x from dual 4 minus 5 select x from t1; X ---------- bbbbb
-
Hi experts,
I tried to load the data of EBS in HFM via FDMEE.
Importing data in the rule of loading, I have encountered an error in loading.
2014-11-21 06:09:18, 601 INFO [AIF]: beginning of the process FDMEE, process ID: 268
2014-11-21 06:09:18, 601 [AIF] INFO: recording of the FDMEE level: 4
2014-11-21 06:09:18, 601 [AIF] INFO: FDMEE log file: D:\fdmee\outbox\logs\TESTING_268.log
2014-11-21 06:09:18, 601 [AIF] INFO: user: admin
2014-11-21 06:09:18, 601 INFO [AIF]: place: Testing_loc (Partitionkey:3)
2014-11-21 06:09:18, 601 [AIF] INFO: name: OCT period (period key: 31/10/14 12:00 AM)
2014-11-21 06:09:18, 601 INFO [AIF]: name of the category: real (category key: 1).
2014-11-21 06:09:18, 601 INFO [AIF]: name rule: Testing_dlr (rule ID:8)
2014-11-21 06:09:19, 877 [AIF] INFO: Jython Version: 2.5.1 (Release_2_5_1:6813, September 26 2009, 13:47:54)
[JRockit (R) Oracle (Oracle Corporation)]
2014-11-21 06:09:19, 877 INFO [AIF]: Java platform: java1.6.0_37
2014-11-21 06:09:19, 877 INFO [AIF]: connect the file encoding: UTF-8
2014-11-21 06:09:21, 368 [AIF] INFO: - START IMPORT STEP -
2014-11-21 06:09:24, 544 FATAL [AIF]: error in CommData.insertImportProcessDetailsTraceback (most recent call last): File '< string >", line 2672, in insertImportProcessDetail
RuntimeError: No periods have been identified for the loading of the data in the table 'AIF_EBS_GL_BALANCES_STG'.
2014-11-21 06:09:24, 748 FATAL [AIF]: load balances data launch GL error
2014-11-21 06:09:24, 752 [AIF] INFO: end process FDMEE, process ID: 268
I found a post related to this error, but did not respond.
I know I'm missing something, gurus please help me to overcome this error.
~ Thank you
I managed to overcome this problem,
This was caused due to an error in the map of the time.
In the mapping of source, the name of period should be defined exactly as displayed in the EBS.
for example: {EBS--> OCT - 14} FDMEE {mapping source--> OCT - 14}
The names of the time must be identical.
-
Hi, I have the problem on coding when I use the table to display the data in the table. I don't know what Miss me in the code, data appears only in the first row and second row appears empty. I have spent a lot of time to find the solution but I am not successful.
I need your help. Thank you.
This is the encoding that puts the button: click
var part1 = new Array ("A", "3", 78, 9)
var part2 = new Array("E","2",45,8);
var part3 = new Array("C","1","14",9);var b = new Array("",part1,part2,part3)
var a = new Array()
a = form1.page1.Table1.Row1.TextField1 [0];
a = form1.page1.Table1.Row1.TextField2 [1];
a = form1.page1.Table1.Row1.TextField3 [2];
a = form1.page1.Table1.Row1.TextField4 [3];
a = form1.page1.Table1.Row2.TextField5 [4];
a = form1.page1.Table1.Row2.TextField6 [5];
a = form1.page1.Table1.Row2.TextField7 [6];
a = form1.page1.Table1.Row2.TextField8 [7];
a = form1.page1.Table1.Row3.TextField9 [8];
a = form1.page1.Table1.Row3.TextField10 [9];
a = form1.page1.Table1.Row3.TextField11 [10];
a = form1.page1.Table1.Row3.TextField12 [11];
for (var i = 0; i <.) Length; i ++) {}
for (var j = 0; j < b.length; j ++) {}
a [i] = b [j] [i] .rawValue;
}}
Hello
Try this.
var i = 0;
for (var j = 0; j)< b.length="" ;="">
for (var k = 0; k)< b[0].length="" ;="">
a [i] = b [j] [k] .rawValue;
i ++ ;
}
} -
Read xls file and display the data in the table.
Hello
Try to read the data from an xls or csv file and fill the same data in the table. If I need to use the table to store the data from the file and display, hoping that someone could help.
Thank you
Hari
Hi hari,.
One thing that is very important when you use the Excel activeX interface (in case you need it) is good termination of worksheet/workbook/lettering handles.
You need these handles to specify what cell in which file you are trying to access.
If you are unable to throw each handle you have, then you will be left with ghost Excel process in your task manager, devours your system's memory.
Thus, when debugging of your application, open the Task Manager and the watch as Excel treats created/destroyed and make sure that you end up with zero Excel process running when your application is closed.
Also consider the case of fault for your program. Check that your exit routes did not omit any termination of handle.
-
How can insert different types of data in the table?
Hello
How can I insert different types of data in the table, (e.g., numeric and string) in the same index of a table.example:
index0 car 10 greencar red 11 index1
Index2 car Blue 12where green car red and blue car as string and 10, 11 and 12 in the numeric form.
then I extracted 10, 11 and 12 a digital tableand, the green car, red car, blue car in a string array
Help!
Use 'Analysis of the chain' as in the picture as an attachment. This will extract the number and color that you can add tables later.
-
problem with the storage of the data in the table
Hello
I'm having the problem on the storage of data in the table. My problem is that whenever he makes a loop, the table just keep replacing them rather save to the next index. At 0, the value is 123, and 1 is 234. But I saw that all the data capture all crush to 0 until the last data see the 0. How can I fix this problem?
-
How to add data to the table changed in sql developer at Apex and vice versa
Hello
I had tables of database with sql developer. But now, I have modified the database (new tables added + changed the data in the tables). However, in the Apex, I the old database. Is it possible to get the new Apex database with the data of the table changed so this database in both places (sql and apex developer) is exactly the same... Also the other way around.
Thank you
The database schema that contains the tables, is it associated with the workspace even you are searching through the APEX product t development? Why I'm asking is, if they are the same schema, the tables that you MODIFIED should be appear in the sql for APEX workshop part. Now reports and forms will NOT see the changes (unless you have actually added or updated definitions for column).
Can you explain what exactly you were doing the SQL Developer to the tables in your schema?
Thank you
Tony Miller
Los Alamos, NM -
How to add data to the table using Manager POST for restful Apex application
Hi all
I managed to create a service application web Manager restful using GET for the Restful service module. I am able to get the data in row on the presentation of a table row id in the application. But I can't find an appropriate example, how the new data in the table can be posted or deleted. I created a POST handler for a URI scheme and look forward on how to proceed. Any help would be really appreciated.
Source for the POST Manager:
Start
insert into ALL_BOOKS values(:id,:book);
end;
Also created 2 parameters id and the book.
Hi jerry2134,
jerry2134 wrote:
I managed to create a service application web Manager restful using GET for the Restful service module. I am able to get the data in row on the presentation of a table row id in the application. But I can't find an appropriate example, how the new data in the table can be posted or deleted. I created a POST handler for a URI scheme and look forward on how to proceed. Any help would be really appreciated.
Source for the POST Manager:
Start
insert into ALL_BOOKS values(:id,:book);
end;
Also created 2 parameters id and the book.
Check out the following tutorials OBE, that explains the creation of GET and POST RESTful Web Services and how to use them in the APEX.
- Creation and use of RESTful Web application services Express 4.2
- Creation and use of RESTful Web application services Express 5.0
Also what yo mean "looking forward on how to proceed? Do you want to or created for use/consume in your Oracle APEX application hosted RESTful web services?
If Yes, in your Application, you must create a RESTful Web Service reference -> shared components. Then, create a form/report based on Web Service reference.
Kind regards
Kiran
-
Hello
Search page, I developed with two buttons, go and clear.and data sought are displayed in the table on the page.
using the 'clear' button I can able to clear data from text boxes, but I want to data displayed in the table on the page must also be clear.
Please provide assistance to achieve this.
and iam also getting a problem more clearly by clicking the button twice, the first time it is deletion of the data, where, like the second time, it's
What gives exception.how to prevent null pointer is not to get a null pointer exception.
Hello
in, click clear, you want data from the table are evacuated, do you want to text boxes to clear snow?
You can achieve this by extending the controller and clear data that VO, so to clear the table.
1 handle the button click clear
If (oapagecontext. GetParameter("ClearBtn")! = null)
2 claire VO associated table
SVO OAViewObject = (OAViewObject) am.findViewObject ("yourVO"););
svo.setWhereClause ("1 = 2");
svo.executeQuery ();
3. If you want to clear the text boxes you can use following code
OAMessageTextInputBean mtib = (OAMessageTextInputBean) webBean.findIndexedChildRecursive ("bean_id");
if(MTIB!=null)
mtib.setValue (pageContext, null);
-
Button insert data to the table
Hello
I use APEX 4.2.3 with XE, I try to insert data into the table using code below but nothing happen when I press the button, create this button like 'create a button to point to page'-> 'dynamic action'-> 'run pl/sql '.
begin insert into dummy values('xx'); commit; end;
So to clarify, you have
(1) created a button that "action" is "defined by the dynamic action.
(2) created a dynamic action that executes pl/sql at the click on the button and you are pl/sql?
-
How to export data from the table with the colouring of cells according to value.
Hi all
I use jdeveloper 11.1.1.6
I want to export data from the table with a lot of formatting. as for color cells based on value and so much. How to do this?
You can find us apache POI-http://poi.apache.org/
See this http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html
-
Is it possible to see/get the data from the table to a dump file
I have files dmp generated using expdp on oracle 11 g...
expdp_schemas_18MAY2013_1.dmp
expdp_schemas_18MAY2013_2.dmp
expdp_schemas_18MAY2013_3.dmp
Can I use a settings file given below to get the data from the table in the file sql or impdp the only option to load the data of table in database.
VI test1.par
USERID = "/ as sysdba".
DIRECTORY = DATA
dumpfile=expdp_schemas_18MAY2013%S.dmp
SCHEMAS = USER1, USER2
LOGFILE = user_dump_data.log
SQLFILE = user_dump_data. SQL
and impdp parfile = test1.par.
No,
DataPump cannot retrieve a dumpfile data in a flat file.
Dean
-
Hello
It comes to my table
Insertion of the data in it with the procedure which takes 2 parameters of date format:CREATE TABLE TEMP_LEAP ( "DATE_FROM" DATE )
Now lets fill in the data in the table:CREATE OR REPLACE PROCEDURE "T_PROC" (p_dat_from date, p_dat_to date) IS BEGIN DECLARE day number := 0; st NUMBER := 0; BEGIN day := p_dat_to+1 - p_dat_from; for p in 1 .. day loop insert into temp_leapp (date_from) values (p_dat_from+st); st := st+1; end loop; commit; END; END;
Data are now filled in the table.execute T_PROC(TO_DATE('01.01.2010','DD.MM.YYYY'),TO_DATE('17.08.2013','DD.MM.YYYY'));
I want to do is do a select statement that will make the following output data:
I want is to get the leap year if there is a. I only need of days in the year, so don't mind the months.01.01.2010 - 31.12.2011 01.01.2012 - 31.12.2012 01.01.2013 - 17.08.2013
I need to check if there is a leap year in considering the p_dat_from and p_dat_to.
If it isn't then you will get a single record of our instruction select and values will be made of: p_dat_from - p_dat_to.
If there is a leap year in our period we will arrive after statements (example above).
01.01.2010 - 31.12.2011 <-first date is p_dat_from and second is the last day before the leap year
01.01.2012 - 31.12.2012 <-this is leap year. First date is the beginning of the leap year and the last date is the end of the leap year or p_date_to (if it ends in leap years).
01.01.2013 - 17.08.2013 <- and this is the period after the leap years.
It is a piece of code that I fell or with up to now:
OK, that's all. I hope that its understandable that I do.SELECT MIN(date_from), MAX(date_from) FROM temp_leap WHERE remainder(to_number(to_char(date_from,'yyyy')),4) = 0 union SELECT MIN(date_from) over (partition by to_char(date_from,'yyyy')), MAX(date_from) OVER (PARTITION BY to_char(date_from,'yyyy')) FROM temp_leap WHERE remainder(to_number(to_char(date_from,'yyyy')),4) <> 0 ORDER BY 1,2;
If you have a questions please ask away.
PS is there anything I need to do. You don't have to bother with the questions "what i February is after before etc." I don't love about it. All the other logic is already fixed all I need is what I wrote above.
Thank you.
Published by: BluShadow on March 14, 2013 08:24
Fixed barcode labelsHere's a way...
SQL> create table temp_leap(date_from DATE) 2 / Table created. SQL> SQL> insert into temp_leap 2 select date '2010-01-01' + rownum - 1 3 from dual 4 connect by rownum <= (date '2013-08-17' - date '2010-01-01') + 1 5 / 1325 rows created. SQL> SQL> commit 2 / Commit complete. SQL> ed Wrote file afiedt.buf 1 select min(date_from)||' - '||max(date_from) 2 from 3 (select date_from 4 ,sum(leap_yr_switch) over (order by date_from) as leap_yr_switch_cnt 5 from ( 6 select date_from 7 ,case when lag(leap_yr) over (order by date_from) != leap_yr then 1 else 0 end as leap_yr_switch 8 from ( 9 select date_from 10 ,case when mod(to_number(to_char(date_from,'YYYY')),400) = 0 11 or ( mod(to_number(to_char(date_from,'YYYY')),4) = 0 12 and mod(to_number(to_char(date_from,'YYYY')),100) != 0 13 ) 14 then 1 else 0 end as leap_yr 15 from temp_leap 16 ) 17 ) 18 ) 19 group by leap_yr_switch_cnt 20* order by min(date_from) SQL> / MIN(DATE_FROM)||'-'||MAX(DATE_FROM) ------------------------------------------- 01-JAN-2010 00:00:00 - 31-DEC-2011 00:00:00 01-JAN-2012 00:00:00 - 31-DEC-2012 00:00:00 01-JAN-2013 00:00:00 - 17-AUG-2013 00:00:00
Published by: BluShadow on March 14, 2013 08:51
a slight correction in the calculation of the leap year, forgotten 100 years being does not leap. -
What trigger to use to insert data into the table db forms
Hello
My form is current having a block of database with the table reference. When you enter data into the form field and click Save. Automatically record is inserted in the database table.
I want to do this under manual insert. I changed the block of data to a data non-base. Where should I write the insert statement to insert data into the table.
Is - shutter release key of the form-level validation?
Please notify.
Thank you
Didi.You can guide me how to remove the message FRM-40401 no changes to save and instead, I wanted to put 1 transaction record successful... some like it like that.
Hi didi.
And this is my last post I'll sleep. ;)
Take form level trigger named preform
and write on it:SYSTEM.MESSAGE_LEVEL := 5;
I hope this works...
Hamid
Mark correct/good to help others to get the right answers. *
Maybe you are looking for
-
When I turn on my new macbook air, the fan starts to make the strong nose. I got this less tha a month ago and I took good care of yhis. I'm tired of ressetting as MSC, but it did not work. Help, please
-
CAM is locked by another application
Hi, I have been using my built-in webcam since I started to install yahoo Messenger about a month ago and it's working properly, every time I use it and even last night. But this morning when I tried to open my webcam in yahoo Messenger, the webcam i
-
I am running Win XP Professional Edition, version 2003, Service Pack 3 (beyond that, I don't know!). I'm putting images (jpeg, for the most part) ON a 4 GB SD card that I can use it in a digital photo frame. I got 231 photos on the card using a card
-
I charge my new touchpad on an HP docking station. However, I would like to be able to copy music from my PC to the toudhpad. However, supposedly in a touchpad manual, it was stated the touchpad should not be connected to a PC USB. So, what's the mic
-
Hi all We use a 4.0 (5) IPCCX bonus for our call centres. CRS Server meets with CCM 4.1.3. I can set up services in CCM so that Agents can connect through an IP phone. Extension mobility of IP phones users. So before a connection Agent for answering