How handle the date of the leap year in the query?
Dear ExpartsHope you will be fine.
Here is my banner
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
I have a date field name birth_date where I stored the date of birth. I need to choose the date of birth in a given range. For exampleBIRTH_DATE
-------------------------
01-FEB-1980
12-FEB-1984
29-FEB-1992
01-MAR-1986
01-APR-1986
22-APR-1988
01-MAR-1992
The setting of my research isbrith_date between 01/02/13 and 01/04/13
I want the file01-FEB-1980
12-FEB-1984
29-FEB-1992
01-MAR-1986
01-APR-1986
Here is the scriptcreate table
CREATE TABLE DATE_OF_BIRTH
(
BIRTH_DATE DATE
);
inserting datainsert into DATE_OF_BIRTH
values(to_date('01-FEB-1980','DD-MON-RRRR'));
insert into DATE_OF_BIRTH
values(to_date('12-FEB-1984','DD-MON-RRRR'));
insert into DATE_OF_BIRTH
values(to_date('29-FEB-1992','DD-MON-RRRR'));
insert into DATE_OF_BIRTH
values(to_date('01-MAR-1986','DD-MON-RRRR'));
insert into DATE_OF_BIRTH
values(to_date('01-APR-1986','DD-MON-RRRR'));
Thanks in advance... (Thanks to Frank Kulash)ask2Learn
Published by: asked to learn, on 24 February 2013 19:40
select *
from date_of_birth
where to_char(birth_date,'mmdd') between '0201' and '0401'
/
BIRTH_DAT
---------
01-FEB-80
12-FEB-84
29-FEB-92
01-MAR-86
01-APR-86
SQL>
SY.
Tags: Database
Similar Questions
-
How do the query select outer join to a report of the APEX
Hi all
I'm Ann.
I have a select statement that is used to calculate statistics for a month (October 2012 in this example)
Select ph.phase_number
sum ((case
WHEN ph.date_finished IS NULL or ph.date_finished > last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
THEN last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
Of OTHER ph.date_finished
END)
(-ph.date_started + 1) / count (def.def_id) as avg_days
Ph phase_membership
inner join court_engagement this on ph.mpm_eng_id = ce.engagement_id
join in-house defendant def on ce.defendant_id = def.def_id
where def.active = 1
and ph.date_started < = last_day (TO_DATE (' ' Oct 2012 ', ' MY YYYY' "))
and ph.active = 1
and UPPER (ce.court_name) LIKE '% '.
Rollup Group (phase_number)
;
The result is as below
Phase_Number AVG_DAYS
Phase One 8.6666666666666667
Phase two 14.6
Phase three 12
11.4615365
I have another list of selection mainly the list of months between two date value.
Select to_char (which_month, 'LUN YYYY') as display_month
de)
Select add_months (to_date (' ' August 2012 ', ' MY YYYY' "), rownum-1) which_month
of object
where
rownum < = months_between (to_date (' ' Oct 2012 ', ' MY YYYY' "), add_months (to_date (' ' August 2012", "MY YYYY"), - 1))
order of which_month)
The query result is as below
DISPLAY_MONTH
AUGUST 2012
SEP 2012
OCT 2012
Is it possible I can join these two select statement above to generate a comparable result:
Days of month Phase number Avg
August 2012 Phase One 8.666
Sep 2012 Phase One 7.66
Oct 2012 Phase One 5,66
August 2012 Phase two 8.666
Sep 2012 Phase two 7.66
Oct 2012 Phase two 5,66
August 2012 Phase three 8.666
Sep 2012 Phase three 7.66
Oct 2012 Phase three 5,66
Or
Days of month Phase number Avg
August 2012 Phase One 8.666
August 2012 Phase two 7.66
August 2012 Phase three 5,66
Sep 2012 Phase One 8.666
Sep 2012 Phase two 7.66
Sep 2012 Phase three 5,66
Oct 2012 Phase One 8.666
Oct 2012 Phase two 7.66
Oct 2012 Phase three 5,66
And it can be controlled by Phase number or month.
My other colleague suggested I should use a left outer join, but after having tried many ways, I'm still stuck.
I tried select is
Select a.display_month, b.* in)
Select to_char (which_month, 'LUN YYYY') as display_month
de)
Select add_months (to_date (' ' August 2012 ', ' MY YYYY' "), rownum-1) which_month
of object
where
rownum < = months_between (to_date (' ' Oct 2012 ', ' MY YYYY' "), add_months (to_date (' ' August 2012", "MY YYYY"), - 1))
order which_month)) a left outer join
(Select to_char (ph.date_finished, 'MY YYYY') as join_month, ph.phase_number)
sum ((case
WHEN ph.date_finished IS NULL or ph.date_finished > last_day (TO_DATE (a.display_month, 'MY YYYY'))
THEN last_day (TO_DATE (a.display_month, 'MY YYYY'))
Of OTHER ph.date_finished
END)
(-ph.date_started + 1) / count (def.def_id) as avg_days
Ph phase_membership
inner join court_engagement this on ph.mpm_eng_id = ce.engagement_id
join in-house defendant def on ce.defendant_id = def.def_id
where def.active = 1
and ph.date_started < = last_day (TO_DATE (a.display_month, 'MY YYYY'))
and ph.active = 1
and UPPER (ce.court_name) LIKE '% '.
To_char (ph.date_finished, 'MY YYYY'), group (phase_number) rollup) b
On a.display_month = b.join_month
but then I get an error
SQL error: ORA-00904: "A." "" DISPLAY_MONTH ": invalid identifier
I need to view a report on the APEX with option for people to download at least format CSV.
Already 1 inteactive report in the page, so I don't think adds another interactive report without using the iframe trick.
If any of you have any ideas, please help.
Thank you very much.
AnnHello Ann,.
Frank has done a very good job. I am also impressed.
Is in regard to your correction to his question, the problem is on this replacement you did
last_day(TO_DATE(am.which_month,'MON YYYY'))
AM.which_month is already a date type, and you don't need to convert it to this day.
Here is the correct way:last_day(am.which_month)
There are also sometimes with the data you've posted have no line for this month. So I also added a function NVL to display 0 under avg_days for these cases.
Here is my corrected query:
DEFINE startmonth = "Aug 2012"; DEFINE endmonth = "Oct 2012"; WITH all_months AS ( SELECT ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM-1) AS which_month , ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM ) AS next_month from all_objects where rownum <= months_between(to_date('&endmonth','MON YYYY'), add_months(to_date('&startmonth','MON YYYY'), -1)) ) SELECT TO_CHAR (am.which_month, 'Mon YYYY') AS month , ph.phase_number , NVL(sum ( (CASE WHEN ph.date_finished IS NULL OR ph.date_finished > last_day(am.which_month) THEN last_day(am.which_month) ELSE ph.date_finished END ) - ph.date_started + 1 ) / count(def.def_id), 0) as avg_days FROM all_months am LEFT OUTER JOIN a_phase_membership ph PARTITION BY (ph.phase_number) ON am.which_month <= ph.date_started AND am.next_month > ph.date_started AND ph.date_started <= last_day(am.which_month) -- May not be needed AND ph.active = 1 LEFT OUTER JOIN a_engagement ce ON ph.mpm_eng_id = ce.engagement_id AND ce.court_name IS NOT NULL -- or something involving LIKE LEFT OUTER join a_defendant def ON ce.defendant_id = def.def_id AND def.active = 1 GROUP BY ROLLUP(phase_number, am.which_month) ORDER BY am.which_month , ph.phase_number ; The output is: MONTH PHASE_NUMBER AVG_DAYS -------- -------------------- ---------- Aug 2012 PHASE ONE 0 Aug 2012 PHASE THREE 0 Aug 2012 PHASE TWO 0 Sep 2012 PHASE ONE 12 Sep 2012 PHASE THREE 1 Sep 2012 PHASE TWO 9 Oct 2012 PHASE ONE 8 Oct 2012 PHASE THREE 0 Oct 2012 PHASE TWO 14 PHASE ONE 11 PHASE THREE 1 PHASE TWO 11.5 9.71428571
I don't know if that's really what you want. In the case check it and let me know.
Kind regards.
Al -
How to find date of creating index?
How to find date of creating index?You query all_obejcts and you will find last_ddl_time when is - it has changed...
-
How to check leap year between the years earn a new degree?
Hi all
I developed a report to print a report of emplyees who earn a new degree between towing dates entered by two parameters of the user.
I used this code to do this:
SELECT ALL E.EMP_SID, E.EMP_FULL_NAME, E.FINANCIAL_NO
(CASE WHEN E.qualification_sid = 1104 AND E.degree_sid = 8 THEN
(TO_DATE (E.degree_DATE, 'DD-MM-RR') +(365*M.spe_per) + 1).
ON THE OTHER
(TO_DATE (E.degree_DATE, 'DD-MM-RR') +(365*M.yea_per) + 1).
END)
COMM_degree,
OF INDUSTSRIE E, M DEGREES
WHERE (CASE WHEN E.qualification_sid = 1104 AND E.degree_sid = 8 THEN
(TO_DATE (E.degree_DATE, 'DD-MM-RR') +(365*M.spe_per) + 1).
ON THE OTHER
(TO_DATE (E.degree_DATE, 'DD-MM-RR') +(365*M.yea_per) + 1).
END)
BETWEEN TO_DATE (: P_F_DATE, 'DD-MM-RR') AND TO_DATE (: P_L_DATE, 'DD-MM-RR')
AND (E.degree_SID = M.SID)
ORDER BY M.SID DESC, E.EMP_FULL_NAME
Now there is an error in the data led to some employees with a leap year in the year to earn income
for example: an employee has a degree date of 10/01/2011 and win it supposed the next level is 10/01/2016 but the report gives as 30/09/2016 because there's one year leap year 2012 which have 366 days 365 days I count in the code!
If there is something mysterious in the code, please do not hesitate to ask!
Please how to fix this?
Note: I use reports 6i.Hello
Try ADD_MONTHS(SYSDATE,12) - instead of 365 DAYS
IF ANY PROBLEM WE THE KNOW
-
Bug or error during the handling of leap years with WDS/DS
Hi all
I discovered a difference in results with the construction and to debug (without frame) and generate and debug with the revisions of Web or server of determinations when calculating the days in leap years.
I use the DayDifferenceInclusive function to calculate the number of days in a period of insurance.
the number of days of insurance period = DayDifferenceInclusive (the start date of the insurance, the date of the end of insurance)
With the tester of regression or generation and debugging (without frame), I get the following result for the following entry:
* 93 = DayDifferenceInclusive (02-29-2008, 05-31-2008) *.
When we use the revisions of Web or server of determinations we get the value of * 92 * for exactly the same data entry when it should be 93.
Is this a bug in the java code? How can we fix this or is there a work around it?
We are in the middle of integration testing system for a huge project to help is very appreciated!
Best regards
Niels RoestNiels,
Thanks for that - and it seems that in the Netherlands DST began March 30, 2008, that is, as far as I know, the trigger for this error.
I have reproduced the issue against 10.1 using the period from 1st October 2010 to 30 October 2010, which contains the date this summer time began in Australia.
Regarding the ways to work around the problem, I can offer 3:
* wait 10.2 - it is in beta at the moment (but given your opening remarks, may not be an option for you)
* set your locale of the server to that which has no DST
* work around the issue in the rules:First of all, the question is that the retail version fails because it does not realize that one of these days is shorter than the standard 24 hours.
The trick is to replace the DayDifference function with the HourDifference function and round up the number of days.
Thus given a rule that looks like:
result = DayDifference (date one, date two)
It can be rewritten in the form:
The result = round (HourDifference (one at 00:00:00, date two to 00:00:00) / 24, 0)
* the "at 00:00:00 ' is necessary because HourDifference works on dates/hours, not dates.
Sorry for the inconvenience.
Concerning
Andrew -
How is the best way to improve my office from Vista to Windows 10 to 15/02/16 date?
Original title: Conversion of Vista to win 10
How is the best way to improve my office from Vista to Windows 10 to 15/02/16 date?
Buy a full version of Win10 & do a clean install - assuming that you think 10 + years material will be compatible Win10.
-
How to display data on the screen and save the data in a file at the same time?
The code can display acceleration on the screen of the playbook.
But, when fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ") runs, debug displays no source available.
??
Does anyone know how to solve the problem, which writes data to a file?
The code is below.
/*
* Copyright (c) 2011 Research In Motion Limited.
*
Licensed under the Apache License, Version 2.0 (the "license");
* You may not use this file except in compliance with the license.
* You can get a copy of the license at
*
www.Apache.org/licenses/license-2.0
*
* Unless required by the applicable law or agreement written, software
* distributed under the license is distributed on an "AS IS" BASIS.
* WITHOUT WARRANTIES OR CONDITIONS of ANY KIND, express or implied.
* See the license for the specific language governing permissions and
* limitations under the license.
*/#include
#include
#include
#include
#include
#include
#include
#include
#include
#include/**
The milliseconds between the accelerometer readings. It's the same thing
* rate in which the accelerometer data will be updated
* material. The update of material rate is below to help
* accelerometer_set_update_frequency (FREQ_40_HZ).
*/
public static const int ACCELEROMETER_MAX_POLL_INTERVAL = 25;public static screen_context_t screen_ctx;
public static screen_window_t screen_win;
dialog_instance_t main_dialog = 0;paused int = 0;
The forces of the accelerometer
float force_x, force_y, force_z;file elements
int _logcounter = 0;
FullName Char [256];
FILE * f;/**
* Use the PID to set the id of Group window.
*/
public static char
get_window_group_id()
{
public static char s_window_group_id [16] = "";
If (s_window_group_id [0] == '\0') {}
snprintf (s_window_group_id, sizeof (s_window_group_id), "%d", getpid());
}
Return s_window_group_id;
}/**
* Set up a basic screen, so that the browser will be
* Send window state events when the State of the window changes.
*
* @return @c EXIT_SUCCESS or EXIT_FAILURE @c
*/
public static int
setup_screen()
{
If (screen_create_context (& screen_ctx, SCREEN_APPLICATION_CONTEXT)! = 0) {}
Return EXIT_FAILURE;
}
If (screen_create_window (& screen_win, screen_ctx)! = 0) {}
screen_destroy_context (screen_ctx);
Return EXIT_FAILURE;
}
use of int = SCREEN_USAGE_NATIVE;
If (screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_USAGE, & use)! = 0) goto fail;
If (screen_create_window_buffers (screen_win, 1)! = 0) goto fail;
If (screen_create_window_group (screen_win, get_window_group_id())! = 0) goto fail;
buff screen_buffer_t;
If (screen_get_window_property_pv (screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void *) & buff)! = 0) goto fail;
buffer_size int [2];
If (screen_get_buffer_property_iv (buff, SCREEN_PROPERTY_BUFFER_SIZE, buffer_size)! = 0) goto fail;
int attributes [1] = {SCREEN_BLIT_END};
If (screen_fill (screen_ctx, chamois, attributes)! = 0) goto fail;
int dirty_rects [4] = {0, 0, buffer_size [0], buffer_size [1]};
If (screen_post_window (screen_win, buff, 1, (const int *) dirty_rects, 0)! = 0) goto fail;
Return EXIT_SUCCESS;
in case of failure:
screen_destroy_window (screen_win);
screen_destroy_context (screen_ctx);
Return EXIT_FAILURE;
}/**
* Rotates the screen at the specified angle.
*
@param angle angle to rotate the screen. Must be 0, 90, 180 or 270.
*
* @return @c EXIT_SUCCESS on success, to another @c EXIT_FAILURE
*/
public static int
rotate_screen (int angle)
{
If ((angle! = 0) & (angle! = 90) & (angle! = 180) & (angle! = 270)) {}
fprintf (stderr, "Invalid Angle\n");
Return EXIT_FAILURE;
}
int rc;
int rotation;
RC = screen_get_window_property_iv (screen_win, SCREEN_PROPERTY_ROTATION, & rotation);
If (rc! = 0) {}
fprintf (stderr, "error getting the window of the screen rotation: %d\n", rc);
Return EXIT_FAILURE;
}
int size [2];
RC = screen_get_window_property_iv (screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size);
If (rc! = 0) {}
fprintf (stderr, "error getting size memory buffer window screen: %d\n", rc);
Return EXIT_FAILURE;
}
int temp;
switch (angle - rotation) {}
case - 270:
case - 90:
decision 90:
case 270:
Temp = size [0];
size [0] = size [1];
size [1] = temp;
break;
by default:
break;
}
RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_ROTATION, &angle);)
If (rc! = 0) {}
fprintf (stderr, "screen rotation window for parameter error: %d\n", rc);
Return EXIT_FAILURE;
}
RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_SIZE, size);
If (rc! = 0) {}
fprintf (stderr, "error creating window screen size: %d\n", rc);
Return EXIT_FAILURE;
}
RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_SOURCE_SIZE, size);
If (rc! = 0) {}
fprintf (stderr, "error creating window screen size: %d\n", rc);
Return EXIT_FAILURE;
}
RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size);
If (rc! = 0) {}
fprintf (stderr, "error creating window buffer size of the screen: %d\n", rc);
Return EXIT_FAILURE;
}
Return EXIT_SUCCESS;
}/**
To manage an event of navigator.
*
* @return @c the value true if the application should shut down, another fake.
*/
public static bool
handle_navigator_event(bps_event_t *Event)
{
bool should_exit = false;
switch (bps_event_get_code (event)) {}
case NAVIGATOR_EXIT:
should_exit = true;
break;
case NAVIGATOR_ORIENTATION_CHECK:
navigator_orientation_check_response (event, true);
break;
case NAVIGATOR_ORIENTATION:
{
int angle = navigator_event_get_orientation_angle (event);
If (rotate_screen (angle) == EXIT_FAILURE) {}
should_exit = true;
}
navigator_done_orientation (Event);
break;
}
}
Return should_exit;
}
/**
* Display an alert dialog box that contains the location data.
*/
public static void
show_main_dialog()
{
If {(main_dialog)
return;
}
dialog_create_alert(&main_dialog);
dialog_set_alert_message_text (main_dialog, "Acceleration to first fix");
dialog_set_size (main_dialog, DIALOG_SIZE_FULL);
dialog_set_group_id (main_dialog, get_window_group_id());
dialog_set_cancel_required (main_dialog, true);
dialog_show (main_dialog);
}/**
* Displays geolocation data in the main dialog box.
*/
public static void
display_acceleration_data (float force_x, float force_y, float force_z) {}
char buf [1024];
snprintf (buf, sizeof buf,
"\tX: m\n % 7.3.f.
"\tY: m\n % 7.3.f.
"\tZ: m\n % 7.3.f."
force_x, force_y, force_z);
dialog_set_alert_message_text (main_dialog, buf);
dialog_update (main_dialog);
}void createafile() {}
sprintf (fullname, "shared/documents/Raw-%d.txt",_logcounter);
{if(f==null)}
file does not exist
f = fopen (fullname, "r");
{while(f!=null)}
file exists
fclose (f);
++ _logcounter;
sprintf (fullname, "shared/documents/Raw-%d.txt",_logcounter);
f = fopen (fullname, "r");
}
}
}write data to the file
void writedataintofile() {}
f = fopen (fullname, "w");
fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ");
fprintf (f, "" 7% 7% .3f, .3f, %7.3f\n ', force_x, force_y, force_z ");
fclose (f);
}/**
* A sample application shows the native APIs of BlackBerry for accelerometer.
* The example initializes and reads the accelerometer periodically until one
* NAVIGATOR_EXIT event is received.
Enforcement also tuned to changes status window in the browser so that
* It can stop reading the accelerometer when the application is no longer visible.
*/
int main (int argc, char * argv {})
bool exit_application = false;
/*
* Until we can listen for events from the BlackBerry Tablet OS platform
* services, we need to initialize the BPS infrastructure
*/
bps_initialize();
/*
* Once the BPS infrastructure has been initialized, we can save to
* events of different services of BlackBerry Tablet OS platform. The
* Browser service manages and provides the life cycle of application and
* events of visibility.
For the example, we ask browser events so that we can follow when
* the system ends the application (NAVIGATOR_EXIT event). This allows to
* us to clean up resources in the application.
*/
navigator_request_events (0);
dialog_request_events (0);
/*
* Initialize the screen so that the Windows Id is correctly set, to allow
* dialogs to display.
*/
If (setup_screen()! = EXIT_SUCCESS) {}
fprintf (stderr, "Failed to initialize the screen.");
Exit (-1);
}
/*
* Once the BPS infrastructure has been initialized, we can save to
* events of different services of BlackBerry Tablet OS platform. The
* Browser service manages and provides the life cycle of application and
* events of visibility.
*
For the example, we ask browser events so that we can follow when
* the system ends the application (NAVIGATOR_EXIT event).
*
* We ask events of dialogue so that we can be notified when the service of dialogue
* answers to our queries/requests.
*/
If (BPS_SUCCESS! = navigator_request_events (0)) {}
fprintf (stderr, "error asking navigator events: %s", strerror(errno) (errno));
Exit (-1);
}
If (BPS_SUCCESS! = dialog_request_events (0)) {}
fprintf (stderr, "error asking dialog events: %s", strerror(errno) (errno));
Exit (-1);
}
/*
* Create and display the dialog box that displays the data from the accelerometer.
*/
show_main_dialog();
/*
Prior to initialize the accelerometer function, we must ensure the unit
* takes in charge
*/
If (sensor_is_supported (SENSOR_TYPE_ACCELEROMETER)) {}
/*
* If the device does not support the accelerometer so warn the user,.
* clean in and out
*/
public static const int SENSOR_RATE = 40;
sensor_set_rate (SENSOR_TYPE_ACCELEROMETER, SENSOR_RATE);
sensor_request_events (SENSOR_TYPE_ACCELEROMETER);}
/*
* Initialize the accelerometer setting the rate at which the
* accelerometer values will be updated material
*/
accelerometer_set_update_frequency (FREQ_40_HZ);/*
Treat browser events and take the accelerometer readings periodically
* until we receive a NAVIGATOR_EXIT event.
*/
createafile();
f = fopen (fullname, "w");While (! exit_application) {}
/*
* By setting the timeout to bps_get_event to ACCELEROMETER_MAX_POLL_INTERVAL,
* We assign the maximum duration (in millis) who will wait before
* release so that we can take a reading of the accelerometer.
*/
bps_event_t * event = NULL;
bps_get_event (& event, ACCELEROMETER_MAX_POLL_INTERVAL);If {(event)
If (bps_event_get_domain (event) is {sensor_get_domain()})
/*
* We woke up. See if we are in the paused state. If not,
take a reading of the accelerometer
*/
If (! pause) {}
sensor_event_get_xyz (event, & force_x, & force_y, & force_z);
display_acceleration_data (force_x, force_y, force_z);
fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ");
fprintf (f, "" 7% 7% .3f, .3f, %7.3f\n ', force_x, force_y, force_z ");
} //paused
}
/ * If this is an event of the dialog box, determine the response code and handle
* the event accordingly.
*/
{ElseIf (bps_event_get_domain (event) == dialog_get_domain() {)}
;
}
/*
* If it's a NAVIGATOR_EXIT event and then set the exit_application
* indicator so that the application stops processing events, clean and
* output.
*/
{ElseIf (bps_event_get_domain (event) == navigator_get_domain() {)}
exit_application = handle_navigator_event (event);
}
} //if event
} //while
/*
* Destroy the dialog box, if it exists.
*/
If {(main_dialog)
dialog_destroy (main_dialog);
}fclose (f);
/*
* Clean the infrastructure bps and output
*/
sensor_stop_events (SENSOR_TYPE_ACCELEROMETER);
bps_shutdown();
screen_destroy_window (screen_win);
screen_destroy_context (screen_ctx);
return 0;
} //mainHello
As I said on your other thread:
In order to write in the shared directory/documents, your application should request action "access_shared" and it must be granted by the user. Make sure you have
access_shared in your bar - descriptor.xml.
Also note that the shared documents folder may not be the best place to write the application log data. There is one connects / in the sandbox to this effect, or the application directory data / directory if the information should be persisted. The documents/shared/folder is designed for documents that the user creates or interacts with.
HTH,
Christian
-
How to handle the onTriggered many ActionItem created dynamically
Hi, I created the ActionItem dynamically using (loop)
because data is from webservice
How to handle the onTrigerred?
If my code is like this:
for (int i = 0; i)< alist.count();="">
{
My page page * = iRoot-->
findChild ("SpecificObject");
ActionItem * action = ActionItem::create () .title (aList [i] .name);bool res = QObject::connect (action, SIGNAL (triggered ()), this, SLOT (handleAction (())); what I'm confused because I don't know what action is triggered
Q_ASSERT (res);
Q_UNUSED (res);my page-> addAction (action, ActionBarPlacement:efault);
}
MyClass::handleAction() Sub
{
aFunction(); This parameter of function required of aList, said user.user aList [i]
}
Do I need to create handleAction() as well as added actionItem SLOT
But I don't know how much action added because it is dynamic server
Thank you
There are a few options:
Create a single location and connect all the signals. You can then call sender() into the slot to retrieve the object that sent the signal and go from there. You can also use a QSignalMap that maps each signal to a value and send this value to a single location. You can also use QSignalMap::sender() to get the sender object.
I used the QSignalMap to do something similar for handling created dynamically successfully drop-down lists.
-
How to handle the end makes arriving in OWB
Hello everyone
I have a table of facts related to a dimension with SCD type2. My problem comes when I files in fact arrive late (a few documents that belong to the past are coming now and I have to connect them to records in dimension to this date in the past). I created a card and fill in the ACTIVE_DATE field in effect at the relevant date (INFO_DATE). The query that is generated from this map is like this:
SELECT * s "STG" JOIN "DIM" d
"" "ON s." CRNC_CD "= d." DETAIL_BUSINESS ".
WHERE
(d."DIMENSION_KEY" (= d."DETAIL_PK") AND (d."DETAIL_PK" IS NOT NULL) AND
(
( d." Correspondents' is null) OR
( d." ("" "" ' Correspondents' IS NOT NULL AND s."INFO_DATE" BETWEEN d. "EFFECTIVE_DATE" AND d. ' correspondents ' )
)
Let's say we have an element with 2 revisions in my dimension table:
CORRESPONDENTS
EFFECTIVE_DATE
CRNC_CD
29 SEP-14
JUNE 10, 14
02
NULL VALUE
29 SEP-14
02
Now, if a recording made happen with his return date to the "request" 28-SEP-14, in the foregoing conditions highlighted are correct and the two dimension rows are returned, which isn't what I want. How can I handle this?
What I did as a solution was to modify the generated code and run this as a package, instead of executing the plan:
SELECT * s "STG" JOIN "DIM" d
"" "ON s." CRNC_CD "= d." DETAIL_BUSINESS ".
WHERE
(d."DIMENSION_KEY" (= d."DETAIL_PK") AND (d."DETAIL_PK" IS NOT NULL) AND
(
( d." (' ' ' Correspondents' IS NULL AND s.' INFO_DATE ' > = d. "EFFECTIVE_DATE") OR
( d." (' "'" ' Correspondents' IS NOT NULL AND s."INFO_DATE" BETWEEN d. "EFFECTIVE_DATE" AND d. "CORRESPONDENTS")
)
-
How to create data animations on the fly, as SWF but not using SWF
Hi all
I used no Flash for several years but has done a bit in the past
I need to create an animation that pulls in the data and images from an external source. I know how I would do it a few years ago (by exporting a SWF movie that can load in pieces), but these days I need something that will work on all devices.
Is there another way? Flash produces something different which can accept external data while playing live in a browser (html5 maybe?)
ID thought to After Effects and render a movie file each time on a server (as it appears that AE can accept scripts and external data)
What options do we have for this sort of thing these days?
Thank you very much
Steve
Flash pro can publish easeljs html5 and supports directly. Easeljs (in part, the api preloadjs) contains classes for loading xml and images from json data.
-
Re: How does the data retention?
Hello guys
How does the conservation of data in vC Ops? In the document it says data retention in the company is 900 days. But in the vSphere user interface, we can keep up to 4 years, which is by default and the minimum level. These two does not?
There are also resolutions different weeks, monthly, quarterly, and annual. Suppose for example that if we maintain weekly resolution as 12 weeks and months 10, all the quarters 9 and annual 5 years as shown in the picture how it works? I mean after 12 weeks the data will be deleted, but we said 5 years for recall information. How this is achieved.
Please help me
Thank you
VK
Let me be more specific:
1. the colelctor collects data interval 20 seconds every 5 min
2. it is wrapped in a 5 min avg and max value.
3. these values 5 min is rolled up to hourly, daily, weekly... ect... for two reasons: capacity and analysis of dynamic thresholds which is stored in two databases diffenent calculations.
It does not compress the stats... it gets stats avg. (Analysis uses avg to get trends used for forcasting ability... ect)
-
How to load data from ms sql to the by the file rules and maxl essbase
Hi, everybody!
Pretty Shure the kind of topic exists already on the forum, but unfortunately can't find it.
I want to understand, how to load data from the database to ms sql for the PB of essbase application.
(I) so I have:
1. a request for 'society '.
2 and its database 'Plan '.
3. with simple outline, which contains only two dimensions:
-The time period < 1 > (Label only)
-Total year (~)
-Qtr1 (+)
Jan (+)
Feb (+)
Mar (+)
-Qtr2 (+)
APR (+)
May (+)
Jun (+)
-Accounts < 1 > (Label only)
-Lost / based (~) (Label only)
-Revenues (+)
L1.1 (+)
L1.2 (+)
-Costs (-)
L2.1 (+)
L2.2 (+)
(II) also, I created a rules file called "CO_DWH" and associated with this schema
It (Rules file) a 3 columns:
Data of the 'period', 'account '.
There is also the option checked "load data".
(III) in MS SQL Server, I have a database of "hypdb" and "essadmin" with "password" login
(IV) I executed my bat file:
C:\Hyperion\EssLoad.bat
There is only one line:
EssLoad.bat-
startMaxl.cmd EssLoad.txt
----------------------------------------------
EssLoad.txt-
login password admin on erpserver;
Import database data Company.Plan connect in essadmin password using the server rules_file 'CO_DWH' error abort;
disconnection;
"exit";
--------------------------------------------
All plans that I copied well worked ERP system, but I don't understand, this is exactly table in the MS SQL database, data loading to essbase db?TOU have to do a few things
1. on the server of Essbase, put in place a system odbc for your MySQL database connection
2. in the State of charge, go to the file menu and select open source SQL database and in the source of data in your SQL statement. A few tips. Where it says select, don't put in the select Word and when he says to not put in of. The system adds for you. TI enter a simple SQL statement is to do this in the box so select if your SQL would be normanlly as select * from myTable just enter the code as * from myTable in the upscale neighborhoodThe ol/recover the click and fill your connection information. Should bring back the data in the State of charge. Save the State of charge and use
-
How to erase data from the iphone if I lost and iphone is offline
How to erase data from the iphone if I lost and iphone is offline
< post branched out by host >
Hello
What to do if your iOS device is turned off or offline?
If your missing device is turned off or offline, you can still implement this Mode lost, lockor remote wipe. The next time your device is online, these measures will take effect. If you remove the device from your account while it is offline, pending actions for the device will be cancelled.
If your iPhone, iPad or iPod touch is lost or stolen - Apple supports
-
How display the date of my last update of OSX in my Mac?
How display the date of my last update of OSX in my Mac?
If it was in the last 30 days, the updates will often (not always) show the Mac App store on your page of updates, under the heading "updates installed in the last 30 days.
-
How to display date / time in the browser console?
How to display date / time in the browser console?
You can set through the Options (gear icon) page in the Web Console (Firefox/tools > Web Developer).
This applies to the browser console and the Web console.
Maybe you are looking for
-
HP LJ M1530 MFP Scanner - scanner not seen
I recently replaced my HP LJ M1530 MFP with a new HP LJ M1530 MFP... even at the same. I guess it was stupid to think that the computer accepts just the new machine... I reinstalled the drivers and cannot scan. The first time around, installation inc
-
I just bought the SmartBand especially for the pulse and stress. It is the only part of the whole SmartBand that does not work. Everything else works fine. Any ideas?Thank you!
-
Cannot add the titles to Windows Media Player
I was able to repeatedly add titles to my media player library. Construction is 11.0.6002.18311 if that helps. Whenever I record my music into playlists, delete all the files in the appdata/local/microsoft/media reader, re - import playlists and I am
-
My computer is complaining that I'm not back up my files. I bought the icloud backup storage. When I tried to download, Windows said it was incompatible. Windows said that everything I try to download. Then, sometimes he said: Windows has not ins
-
clock_watchdog_timeout error!
Hello! I recently did some updates and now my computer keeps a clock_watchdog_timeout blue screen. This often happens when I play any video, game, or sometimes just randomly freeze my computer. I did some research on the error, and he mentions someth