Addition of number to a timestamp
Hi,
I have a variable
v_time_stamp timestamp(6);
v_number number;
I derive the number dynamically.
I derive v_time_stamp from a table.
when i add v_time_stamp and v_number i face a strange problem.
the millisecond part of the result is lost.
can someone solve this problem....
Its urgent!!!!
Thnx in advance...
In Oracle/PLSQL, the numtodsinterval function converts a number to an INTERVAL DAY TO SECOND literal.
The syntax for the numtodsinterval function is:
numtodsinterval( number, expression )
number is the number to convert to an interval.
expression is the unit. It must be one of the following values: DAY, HOUR, MINUTE, or SECOND.
Applies To:
Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g
For example:
numtodsinterval(150, 'DAY') would return '+000000150'
numtodsinterval(1500, 'HOUR') would return '+000000062'
numtodsinterval(15000, 'MINUTE') would return '+000000010'
numtodsinterval(150000, 'SECOND') would return '+000000001'
Similar Messages
-
How do I add an additional iPhone number to my iMessage on my iPad to receive text messages?
How do I add an additional iphone number to imessage to receive text messages from the second iphone device?
You can only add iPhone phone numbers which are actively signed into your apple ID on iMessage.
-
INTRASTAT additional id number on cover sheet
Hello Guys,
I have 4.6C version for my client.( germany)
I have issue related to Intrastat decleration. T code ENPA , whenever i process this t code (RVEXDAID) for generating cover sheet.
we have option to give our own Vat additional number , I give 002 so that it would be printed on cover sheet.but by default it is printing 001. this 001 is set at company code global data.
please guide me how to get my own additional ID number on my cover sheet
Regards,
AMolhttp://discussions.apple.com/thread.jspa?messageID=1188299�
-
Requirement to maintain additional serial number during Goods Receipt
We have a requirement to maintain an additional field external serial number while doing Goods Receipt for a PO using movement type 101. This requirement is in addition to the create serial number
automatically. Which is enabled already.
Can anybody please let me know how to take care of this requirement.
Regards,
Chandra KumarBADI available MB_MIGO_BADI to take care of the requirement for additional custom field
-
Hi,
i have date column in the db as datatype Number - 1354874161000 . i want a query to convert this into timestamp. pls helpAPC wrote:
What sort of timestamp is it?
It's not an Oracle timestamp rendered as a number because the figures don't match to meaning time elements. Unless the joker who stored the data forgot to pad the parts with leading zeroes, it which case you have absolutely no chance of converting the string into a timestamp with any degree of certainty about the validity of the outcome.
Cheers, APC:D -
No option for buying additional Skype NUMBER year ...
It is stunning how invisible this payment option which should be simple is.
I have a skype number. My initial payment was paypal, and for 3 months. Now, no matter where I look, I have the option of changing the payment type (to visa etc), cancelling the subscription, or paying another quarter. However, all the HELP everywhere says 'no problem' sign up for 3 month or a year. I'm completely stumped, after an hour of searching for what should take 3 minutes.jeroen842014 wrote:
No Skype credit payment option for buying a Skype number, added sufficient credit to my account, but no payment option to buy with Skype credit!?
Purchasing Skype Number using Skype Credits is only available in selected countries
Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.
If you found my post useful, please give "Kudos".
If it helped to answer your problem/question, please mark it as "Accepted Solution" so other people can find it easily. -
How do you add an additional serial number to TestStand logfile name?
I have two boards that are tested as a pair and I would like to have the log name show both serial numbers for tracking purposes. The logfile name is currently set up to show the serial number of the mainboard. I put the second serial number into a StationGlobal after it is scanned it in. How can I add the second serial number to the logfile name?
Thanks
TraceyHi vocollect,
I have found a Community Example that demonstrates how to modify the report name in Report Options. The pictures may not show exactly what you see If you are using TestStand 2012, but the steps are essentially the same. I hope this helps!
How to Add User Information to a Report Name: https://decibel.ni.com/content/docs/DOC-21744
Regards,
Jason D
Applications Engineer
National Instruments -
Get additional local skype to go number
Hi,
I'm one of the users with an old account and one central skype-to-go number with voice menue (a much better system, but that's not the issue now). I used to be able to get an additional local number to use on holidays for example. Just last December I set up an additional number for New Zealand for example. Now I can't find this function anymore. Is it still possible?
Many thanksGo to your Skype To Go tab in My Account and there change your nearest location to the place were you need another local Skype To Go number.
Then, when you are back the main Skype To Go tab, in the bottom right you will see a link "View old number". That's where you can then find the central number for the new location. -
Hi,
I have a number data type column in a table that stores timestamps in format hhmiss
For example
95338 - convert to 09:53:38
101816 - convert to 10:18:16
123456 - convert to 12:34:56
83417 - convert t0 08:34:17
Can anyone recommend the best way to convert the number format to timestamp(hh:mi:ss). The problem seems to lie with numbers < 10 as they are missing a zero e.g. 95338
ThanksHi,
Try this
WITH T AS(
SELECT 95338 AS VAL FROM DUAL UNION ALL
SELECT 101816 FROM DUAL UNION ALL
SELECT 123456 FROM DUAL UNION ALL
SELECT 83417 FROM DUAL)
SELECT VAL, TO_CHAR(TO_TIMESTAMP(LPAD(VAL,6,0), 'HHMISS'),'HH:MI:SS') TIME FROM Tcheers
VT -
How do I change the phone number associated with messages on my Mac?
My computer is posting messges meant for my wife. How do I delete her phone number from my iMac Messages?
Hi,
Remove the Apple ID from any iPhone you don't want it linked to.
On the Mac go to the Messages app and Sign Out of the Apple ID in iMessages account.
Quit the App.
Now open a Finder window
In the Go Menu use the ALT key at the same time and select the Library that appears.
In here navigate to the Preferences folder.
Delete the com.apple.ids.service.com.apple.madrid.plist file (Drag to Trash).
This will delete all Aliases and Alternatives in the iMessages account.
Re-open Messages and Add the Apple ID you want to use.
Now Add the Apple ID to any iPhone you do want to use it with.
Restart Messages on the Mac and when the pop ups appear to say what the iPhone is using Accept the option.
If any iPhone number appears in a pop up that you do not want to use then Deny the pop up.
(it will still add the Apple ID or phone number to the Alternative/Aliases list and the Start Conversation From drop down but they will not be active).
Basically once any two iPhone number become linked via iMessages it is very difficult to remove this link.
An Additional iPhone number on your iPhone as an alternative cannot be removed.
Only deleting the .plist will remove it (at that point in time) on the Mac.
Whilst denying fresh pop ups helps the items still seem to be listed.
I have two iPhones using two different Apple IDs and obviously two numbers along with an iPad and the Mac running Messages.
Periodically each devices gets a pop up saying Messages is trying to display all the options on all devices again
As William said the simplest method is to Untick the item in the list of Alternatives.
8:38 pm Wednesday; January 15, 2014
iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad -
Document Number generation as per the client requirment
Hi,
I would like to generate the document no as per our client's document numbering logic. This is not available in standard.
In additional data tab am collecting information from user (Characteristics values) to generate document number.
E.G.
I have 2 characteristics
1. Part Type:
Values: A - Type 1
B - Type 2
2. Part Code:
Values: 01- Part 1
02 - Part 2
03 - Part 3
When am creating document am selecting Part Type = A & Part code = 02 so my document number is A-02. ("-" : constant).
I am planning to use BADI "DOCUMENT_MAIN01" - method "ASSIGN_NUMBER".
In this method how can i get the characteristics values which filled user on screen ? Is there any Function Module for that ?
I tried Function Module "CTMS_DDB_CLOSE" but this is not released also this is not working in Easy DMS.
Is there any other way i can take i/p from user to generate document number ?
Regards,
Sunny
Edited by: Sunny on Sep 25, 2008 9:09 PMHi Sunny,
An experienced ABAPer can capture the required information from the sub screen(additional data) number (4000) and the subscreen program (SAPLCTMS). This data can be used in the method of the BADI.
Regards,
T T Subudhi -
Wrong number or types of argumnet in a call to error
Hi all,
Below is my stored proc and it has a input parameter 'c_count_or_perc' . I have passed value to this parameter as in the if block.
But I got the error as "wrong number or types of argumnet in a call to ' .
I really dont know how to pass input value to this parameter .
Could anyone please help?
{code}
PROCEDURE edr_rpt_gen_error_by_hour
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
c_count_or_perc IN VARCHAR2 ,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
{code}
In below 'IF THEN ELSE' block , ( based on the <condition> ) , I dont know how to pass value to input parameter c_count_or_perc .
{code}
IF (c_count_or_perc = 'ERROR BY HOUR') THEN
my_error_text := get_row_error_text;
my_total_text := get_row_total_text;
ELSE
my_error_text := get_row_error_text;
my_total_text := '';
DELETE edr_report_by_hour_output
WHERE row_type = 'Summary Row'
AND row_type = 'Final Row';
END IF;
{code}
Here I have pasted the full package. Could please tell me , what are ways tht I could pass value to the given input parameter.
{code}
CREATE OR REPLACE PACKAGE edr_rpt_error_by_hour_package AS
PROCEDURE edr_rpt_gen_error_by_hour
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
c_count_or_perc IN VARCHAR2 ,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
FUNCTION error_data
in_lane_id edr_report_by_hour_output.lane_id%TYPE,
in_direction_id edr_report_by_hour_output.direction_id%TYPE,
in_interval_start_date_time edr_report_by_hour_output.interval_start_date_time%TYPE,
in_interval_end_date_time edr_report_by_hour_output.interval_end_date_time%TYPE,
in_hour_start edr_report_by_hour_output.hour_start%TYPE,
in_hour_end edr_report_by_hour_output.hour_end%TYPE,
in_min_error NUMBER,
in_max_error NUMBER
RETURN NUMBER;
END edr_rpt_error_by_hour_package;
CREATE OR REPLACE PACKAGE BODY edr_rpt_error_by_hour_package AS
FUNCTION error_data
in_lane_id edr_report_by_hour_output.lane_id%TYPE,
in_direction_id edr_report_by_hour_output.direction_id%TYPE,
in_interval_start_date_time edr_report_by_hour_output.interval_start_date_time%TYPE,
in_interval_end_date_time edr_report_by_hour_output.interval_end_date_time%TYPE,
in_hour_start edr_report_by_hour_output.hour_start%TYPE,
in_hour_end edr_report_by_hour_output.hour_end%TYPE,
in_min_error NUMBER,
in_max_error NUMBER
RETURN NUMBER
IS
my_count_result NUMBER(18);
BEGIN
SELECT NVL(SUM(error_count), 0 )
INTO my_count_result
FROM
SELECT site_lane_id
FROM edr_rpt_tmp_report_lanes
WHERE edr_rpt_tmp_report_lanes.output_lane_id = in_lane_id
AND edr_rpt_tmp_report_lanes.output_direction_id = in_direction_id
) report_lanes
JOIN edr_error_by_hour_report_data
ON edr_error_by_hour_report_data.site_lane_id = report_lanes.site_lane_id
AND edr_error_by_hour_report_data.bin_start_date_time >= in_interval_start_date_time
AND edr_error_by_hour_report_data.bin_start_date_time < in_interval_end_date_time
AND edr_error_by_hour_report_data.hour >= in_hour_start
AND edr_error_by_hour_report_data.hour < in_hour_end
AND edr_error_by_hour_report_data.error_code >= in_min_error
AND edr_error_by_hour_report_data.error_code <= in_max_error
return my_count_result;
END error_data;
FUNCTION get_row_error_text
RETURN VARCHAR2
IS
my_row_error_text VARCHAR2(10000);
my_row_error_entry VARCHAR2(10000);
CURSOR row_error_text IS
SELECT 'edr_rpt_error_by_hour_package.error_data('
||'lane_id, '
||'direction_id, '
||'interval_start_date_time, '
||'interval_end_date_time, '
||'hour_start, '
||'hour_end, '
|| error_code || ', '
|| error_code || ') "'|| error_message.error_short_message || '"'
FROM error_message
WHERE error_code >= 0 and error_code < 19
ORDER BY error_code;
BEGIN
my_row_error_text := '';
my_row_error_entry := '';
-- generate the error code function calls
OPEN row_error_text;
LOOP
FETCH row_error_text INTO my_row_error_entry;
EXIT WHEN row_error_text%NOTFOUND;
my_row_error_text := my_row_error_text || ', ' || my_row_error_entry;
END LOOP;
CLOSE row_error_text;
RETURN my_row_error_text;
END get_row_error_text;
FUNCTION get_row_total_text
RETURN VARCHAR2
IS
my_row_error_text VARCHAR2(10000);
BEGIN
my_row_error_text := '';
-- generate the 'total' column function call
SELECT 'edr_rpt_error_by_hour_package.error_data('
||'lane_id, '
||'direction_id, '
||'interval_start_date_time, '
||'interval_end_date_time, '
||'hour_start, '
||'hour_end, '
|| MIN(error_code) || ', '
|| MAX(error_code) || ') "Total"'
INTO my_row_error_text
FROM error_message
WHERE error_code >= 0 and error_code < 19;
RETURN (', ' || my_row_error_text);
END get_row_total_text;
FUNCTION get_error_data_pct
in_lane_id edr_report_by_hour_output.lane_id%TYPE,
in_direction_id edr_report_by_hour_output.direction_id%TYPE,
in_interval_start_date_time edr_report_by_hour_output.interval_start_date_time%TYPE,
in_interval_end_date_time edr_report_by_hour_output.interval_end_date_time%TYPE,
in_hour_start edr_report_by_hour_output.hour_start%TYPE,
in_hour_end edr_report_by_hour_output.hour_end%TYPE,
in_min_error NUMBER,
in_max_error NUMBER
RETURN NUMBER
IS
my_count NUMBER(18);
my_total NUMBER(18);
my_count_pct NUMBER(18);
my_count_result NUMBER(18);
BEGIN
my_count_pct := 0 ;
my_count_result := error_data (
in_lane_id,
in_direction_id,
in_interval_start_date_time,
in_interval_end_date_time,
in_hour_start,
in_hour_end,
in_min_error,
in_max_error
IF (my_count_result > 0 ) THEN
my_total := error_data (
in_lane_id,
in_direction_id,
in_interval_start_date_time,
in_interval_end_date_time,
in_hour_start,
in_hour_end,
1,
19
my_count_pct := ROUND((my_count_result / my_total) * 100 ,2);
END IF;
return my_count_pct;
END get_error_data_pct;
PROCEDURE edr_error_by_hour_use_per_veh
in_report_parameter_id IN report_tasks.report_task_id%TYPE
IS
BEGIN
DELETE FROM edr_error_by_hour_report_data;
INSERT INTO edr_error_by_hour_report_data
site_id,
site_lane_id,
bin_start_date_time,
hour,
error_code,
error_count
SELECT
site_id,
site_lane_id,
bin_start_date_time,
hour,
error_code,
COUNT(1)
FROM (SELECT site_id,
site_lane_id,
( SELECT NVL(MAX(interval_start_date_time), date_time)
FROM edr_rpt_tmp_grouping_table
WHERE interval_start_date_time <= date_time) bin_start_date_time,
TO_NUMBER(TO_CHAR(date_time, 'hh24')) hour,
NVL(traffic_error.error_code, 0) error_code
FROM edr_error_by_hour_veh_data
LEFT OUTER JOIN traffic_error
ON traffic_error.record_id = edr_error_by_hour_veh_data.record_id
) vehicles
GROUP BY
site_id,
site_lane_id,
bin_start_date_time,
hour,
error_code;
END edr_error_by_hour_use_per_veh;
PROCEDURE edr_error_by_hour_data_type
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
in_data_type IN VARCHAR2,
out_data_type_used OUT VARCHAR2
IS
my_bin_entry_count NUMBER(12,0);
my_veh_entry_count NUMBER(12,0);
BEGIN
IF(UPPER(in_data_type) = 'BINNED') THEN
-- Error information can only be read from Per Vehicle data records
-- - using bins-only is not a supported option
RAISE_APPLICATION_ERROR(-20101,'Binned data cannot be used for this report.');
ELSIF (UPPER(in_data_type) = 'PERVEHICLE')
OR (UPPER(in_data_type) = 'COMBINED')
THEN
out_data_type_used := 'Per Vehicle (All Vehicles)';
edr_error_by_hour_use_per_veh( in_report_parameter_id );
ELSE
RAISE_APPLICATION_ERROR(-20101, 'The data type specified is not recognized.');
END IF;
END edr_error_by_hour_data_type;
PROCEDURE edr_error_by_hour_get_veh_data
in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER
IS
BEGIN
--Clear the edr_error_by_hour_veh_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_error_by_hour_veh_data;
INSERT INTO edr_error_by_hour_veh_data
site_id,
site_lane_id,
record_id,
date_time,
vehicle_error_count,
vehicle_status
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
traffic_record.record_id,
traffic_record.datetime,
NVL((SELECT COUNT(1)
FROM traffic_error
WHERE traffic_error.record_id = traffic_record.record_id), 0) vehicle_error_count,
NVL((SELECT SUM(status_code)
FROM traffic_status
WHERE traffic_status.record_id = traffic_record.record_id), 0) vehicle_status
FROM traffic_record
LEFT OUTER JOIN traffic_class
ON traffic_record.record_id = traffic_class.record_id
JOIN site_to_data_source_lane_v
ON traffic_record.data_source_id = site_to_data_source_lane_v.data_source_id
AND traffic_record.lane = site_to_data_source_lane_v.data_source_lane_id
JOIN edr_rpt_tmp_report_lanes
ON site_to_data_source_lane_v.site_lane_id = edr_rpt_tmp_report_lanes.site_lane_id
JOIN edr_rpt_tmp_report_classes
ON NVL(traffic_class.v_class, 0) = edr_rpt_tmp_report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table
ON TRUNC(traffic_record.datetime) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND traffic_record.datetime >= in_start_date_time
AND traffic_record.datetime < in_end_date_time
AND traffic_class.class_level >= in_report_level_min
AND traffic_class.class_level <= in_report_level_max;
END edr_error_by_hour_get_veh_data;
PROCEDURE edr_rpt_gen_error_by_hour
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
c_count_or_perc IN VARCHAR2 ,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
AS
my_date_format_mask VARCHAR2(50);
my_start_date_time TIMESTAMP;
my_end_date_time TIMESTAMP;
my_lane_grouping VARCHAR2(10);
my_interval_duration NUMBER(2);
my_site_id sites.site_id%TYPE;
my_selected_data_type VARCHAR2(50);
my_used_data_type VARCHAR2(50);
my_report_data_statement VARCHAR2(25000);
my_chart_data_statement VARCHAR2(25000);
my_good_weight_viol_total NUMBER(12,0);
my_data_type_used VARCHAR2(50);
my_per_vehicle_total NUMBER(12,0);
my_binned_vehicle_total NUMBER(12,0);
my_error_vehicle_total NUMBER(12,0);
my_status_vehicle_total NUMBER(12,0);
my_good_weight_total NUMBER(12,0);
my_status_clear_total NUMBER(12,0);
my_good_weight_statuses_mask NUMBER(12,0);
my_error_text VARCHAR2(25000);
my_total_text VARCHAR2(25000);
my_error_row_pct_report VARCHAR2(25);
BEGIN
my_date_format_mask := edr_rpt_generic_package.edr_rpt_get_date_format_mask(in_report_parameter_id);
my_start_date_time := edr_rpt_generic_package.edr_rpt_get_start_date_time(in_report_parameter_id, my_date_format_mask);
my_end_date_time := edr_rpt_generic_package.edr_rpt_get_end_date_time(in_report_parameter_id, my_date_format_mask);
my_lane_grouping := edr_rpt_generic_package.edr_rpt_get_lane_grouping(in_report_parameter_id);
my_site_id := edr_rpt_generic_package.edr_rpt_get_site_id(in_report_parameter_id);
my_selected_data_type := edr_rpt_generic_package.edr_rpt_get_data_type(in_report_parameter_id);
-- ensure selected classes and lanes temp tables have been populated
edr_rpt_generic_package.edr_rpt_gen_tmp_lanes(in_report_parameter_id);
edr_rpt_generic_package.edr_rpt_gen_tmp_classes(in_report_parameter_id);
my_good_weight_statuses_mask := edr_rpt_generic_package.get_good_weight_status_mask(in_report_parameter_id);
edr_rpt_generic_package.edr_rpt_gen_inclusion_table(
in_report_parameter_id,
my_date_format_mask,
my_start_date_time,
my_end_date_time
edr_rpt_generic_package.edr_rpt_gen_grouping_table(
in_report_parameter_id,
my_date_format_mask,
my_start_date_time,
my_end_date_time
edr_rpt_generic_package.gen_rpt_by_hour_output_table
in_report_parameter_id
edr_rpt_error_by_hour_package.edr_error_by_hour_get_veh_data
in_report_parameter_id,
my_site_id,
my_start_date_time,
my_end_date_time,
0, --Hardcoded until reclassification is supported.
0 --Hardcoded until reclassification is supported.
edr_rpt_error_by_hour_package.edr_error_by_hour_data_type
in_report_parameter_id,
my_selected_data_type,
my_used_data_type
IF (c_count_or_perc = 'ERROR BY HOUR') THEN
my_error_text := get_row_error_text;
my_total_text := get_row_total_text;
ELSE
my_error_text := get_row_error_text;
my_total_text := '';
DELETE edr_report_by_hour_output
WHERE row_type = 'Summary Row'
AND row_type = 'Final Row';
END IF;
COMMIT;
my_report_data_statement :=
'SELECT rank "Rank", '
|| ' ROW_TYPE "Row Type", '
|| ' interval_start_date_time "Date", '
|| ' interval_start_date_time, '
|| ' hour_label "Chart X-Axis", '
|| ' lane_id "Group Id" , '
|| ' ''None'' "Group Name", '
|| ' hour_label "Hour" '
|| my_error_text
|| my_total_text
|| ' FROM edr_report_by_hour_output '
|| ' ORDER BY lane_id, '
|| ' direction_id, '
|| ' interval_start_date_time, '
|| ' hour_end, '
|| ' rank, '
|| ' hour_start'
dbms_output.put_line('SQL start------------------------');
dbms_output.put_line(my_report_data_statement);
dbms_output.put_line('SQL end--------------------------');
my_chart_data_statement :=
' SELECT hour_start "X Axis", '
|| ' lane_id "Group" '
|| edr_rpt_error_by_hour_package.get_row_error_text
|| ' FROM '
|| ' ( '
|| ' SELECT lane_id, '
|| ' direction_id, '
|| ' hour_start, '
|| ' hour_end, '
|| ' min(interval_start_date_time) interval_start_date_time, '
|| ' max(interval_end_date_time) interval_end_date_time '
|| ' FROM edr_report_by_hour_output '
|| ' WHERE hour_end = hour_start + 1 '
|| ' GROUP BY lane_id, direction_id, hour_start, hour_end '
|| ' ) '
|| ' order by "Group", hour_start '
dbms_output.put_line('SQL start------------------------');
dbms_output.put_line(my_chart_data_statement);
dbms_output.put_line('SQL end--------------------------');
SELECT my_used_data_type
INTO my_data_type_used
FROM SYS.DUAL;
SELECT NVL(COUNT(record_id), 0)
INTO my_per_vehicle_total
FROM edr_error_by_hour_veh_data;
SELECT NVL(COUNT(record_id), 0)
INTO my_status_vehicle_total
FROM edr_error_by_hour_veh_data
WHERE vehicle_status > 0
AND vehicle_error_count = 0;
SELECT NVL(COUNT(record_id), 0)
INTO my_error_vehicle_total
FROM edr_error_by_hour_veh_data
WHERE vehicle_error_count > 0;
SELECT NVL(COUNT(record_id), 0)
INTO my_status_clear_total
FROM edr_error_by_hour_veh_data
WHERE vehicle_status = 0
AND vehicle_error_count = 0;
SELECT NVL(SUM(error_count), 0)
INTO my_binned_vehicle_total
FROM edr_error_by_hour_report_data;
SELECT NVL(COUNT(DISTINCT edr_error_by_hour_veh_data.record_id), 0)
INTO my_good_weight_total
FROM edr_error_by_hour_veh_data
WHERE vehicle_error_count = 0
AND BITAND(vehicle_status, my_good_weight_statuses_mask) = 0;
-- insert vehicle totals into the temporary table
DELETE FROM edr_rpt_tmp_veh_totals_table;
INSERT INTO edr_rpt_tmp_veh_totals_table
data_type_used,
per_vehicle_total,
binned_vehicle_total,
error_vehicle_total,
status_vehicle_total,
good_weight_total,
status_clear_total
SELECT my_data_type_used,
my_per_vehicle_total,
my_binned_vehicle_total,
my_error_vehicle_total,
my_status_vehicle_total,
my_good_weight_total,
my_status_clear_total
FROM SYS.DUAL;
-- execute the query into the output refcursor
OPEN report_data FOR
my_report_data_statement;
OPEN chart_data FOR
my_chart_data_statement;
OPEN footer_data FOR
SELECT data_type_used,
per_vehicle_total,
binned_vehicle_total,
error_vehicle_total,
status_vehicle_total,
good_weight_total,
status_clear_total
FROM edr_rpt_tmp_veh_totals_table;
END edr_rpt_gen_error_by_hour;
END edr_rpt_error_by_hour_package;
{code}Hi,
Thx for the reply.
As the store proc is inside the package and its invoked in visual studio.
I used to compile the pkg in SQL plus and it throws the error as ' wrong number or types of argument in a call to the stored proc 'edr_rpt_gen_error_by_hour'
As I'm new to pl/sql programming , i really dont know how to pass value to the input parameter.
Edited by: user10641405 on Nov 18, 2009 7:27 PM
Edited by: user10641405 on Nov 18, 2009 7:29 PM -
TIMESTAMP formatting!!!
Hi All,
My Query is...
I have a table COGNOS_UH with columns which holds history transaction updates
Business_date Date;
Actual_trans number(8);
Update_trans number(8);
UH_STIME timestamp(6);
UH_FTIME timestamp(6);
UH_DURATION Varchar2(30);
if i try to update UH_DURATION column with diff of start_time & finish_time in this format HH : MIN: SS in a procedure using sql statement shown below...it works fine but i get WARNING message as:
Warning(164,42): PLW-07202: bind type would result in conversion away from column type
UPDATE COGNOS_UH SET UH_DURATION= EXTRACT (HOUR from(UH_FTIME - UH_STIME))||' : '||EXTRACT (MINUTE from(UH_FTIME - UH_STIME))||' : '||EXTRACT (SECOND from(UH_FTIME - UH_STIME));
Could you please suggest how can i resolve this issue/is there any better way to compute the same???This looks like a bug to me. It seems impossible to get the right conversion take place. Whatever you try you get PLW-07202:
michaels> alter session set plsql_warnings='ENABLE:ALL'
Session altered.
michaels> create or replace procedure p
as
myhiredate emp.hiredate%type;
begin
update emp set job = to_char (myhiredate);
end;
Procedure created.
michaels> show error
Errors for PROCEDURE P
LINE/COL ERROR
5/34 PLW-07202: bind type would result in conversion away from column
type
michaels> 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 Only workaround that comes to my mind is to make the statement dynamic, but of course I wouldn't do that just because of a compiler warning. -
HTC One M8 call history timestamp issue
I have waited patiently for several months through a couple firmware updates, expecting to see this issue addressed. However, it seems to have received very little attention or recognition.
Using the stock phone app, any calls prior to the current day do not display the timestamp. Only calls made or received during the current day display the time of the call. Any calls received/made prior to the current day only display the date. Any calls placed yesterday only display simply "yesterday." Long-pressing any entries without a timestamp to select "view history" only displays the call "duration."
A few friends have the same phone on another carrier and their devices display the name, phone number, date and timestamp in the "Call History" and "Phone" logs, even without the need to long press and "View History." They are also using the same stock Phone application. It is quite frustrating to not see the timestamps of missed calls.
The few references online regarding this issue seem to have concluded this is a carrier programming issue, as those on Verizon have the same issue and those on another carrier do not.
Does anyone using a Verizon HTC One M8 not have this issue using the stock Phone app?
Does anyone know of a fix or workaround to address this without installing 3rd-party apps?
Is Verizon planning to address this issue? Have they already?
Whom shall I contact to raise this issue?
Thanks in advance.Hi Pamela,
Here's how things look.
I can't remember it being any other way on my handset.
Would appreciate anyone kindly confirming (or denying) this is how entries look on their Verizon HTC M8.
(Censored for Privacy)
Call History:
Phone History:
Long-Press entry > View Call History: -
Create table interval partition on a column timestamp with local time zone
Hi
Does anyone have an example for 11g on how to create a table with interval partitioning on a column defined as timestamp with local time zone. I know it's possible. the following does not work.
CREATE TABLE KOMODO_EXPIRED_RESULTS
TEST_EVENT_KEY NUMBER NOT NULL,
HPS_DEVICE_KEY NUMBER NOT NULL,
RCS_DEVICE_KEY NUMBER,
EVENT_START_TIMESTAMP TIMESTAMP(6) with local time zone NOT NULL,
BOOTROMVERSION NUMBER,
CHANNELNUMBER NUMBER,
CLIENTVERSION VARCHAR2(4000 BYTE),
ETHERNET_CRC_ERROR_COUNT NUMBER,
ETHERNET_DROPPED_PACKETS NUMBER,
ETHERNET_THROUGHPUT NUMBER,
ETHERNET_TRAFFIC_IN NUMBER,
ETHERNET_TRAFFIC_OUT NUMBER,
IPADDRESS VARCHAR2(4000 BYTE),
KOMODO_ID VARCHAR2(4000 BYTE),
LASTREBOOTTIME VARCHAR2(4000 BYTE),
OSVERSION VARCHAR2(4000 BYTE),
RECEIVER_AUDIOACCESSCONTROLER NUMBER,
RECEIVER_AUDIOBUFFEROVERFLOWS NUMBER,
RECEIVER_AUDIOBUFFERUNDERRUNS NUMBER,
RECEIVER_AUDIOCODEC VARCHAR2(4000 BYTE),
RECEIVER_AUDIODATADROPPED NUMBER,
RECEIVER_AUDIODATATHROUGHPUT NUMBER,
RECEIVER_AUDIODECODERERRORS NUMBER,
RECEIVER_AUDIODESCBUFFERUNDER NUMBER,
RECEIVER_AUDIODESCCRYPTOERROR NUMBER,
RECEIVER_AUDIODESCDATADROPPED NUMBER,
RECEIVER_AUDIODESCDATATHROUGH NUMBER,
RECEIVER_AUDIODESCDECODERERRO NUMBER,
RECEIVER_AUDIODESCDRMERRORS NUMBER,
RECEIVER_AUDIODESCPTSDELTA NUMBER,
RECEIVER_AUDIODESCPTSDELTAHAL NUMBER,
RECEIVER_AUDIODESCSAMPLESDROP NUMBER,
RECEIVER_AUDIODSPCRASHES VARCHAR2(4000 BYTE),
RECEIVER_AUDIOPTSDELTAHAL NUMBER,
RECEIVER_AUDIOSAMPLESDECODED NUMBER,
RECEIVER_AUDIOSAMPLESDROPPED NUMBER,
RECEIVER_AUDIOUNDERRUN NUMBER,
RECEIVER_BITRATE NUMBER,
RECEIVER_BUFFEROVERRUN NUMBER,
RECEIVER_BYTESCCRECEIVED NUMBER,
RECEIVER_BYTESRECEIVED NUMBER,
RECEIVER_CHANNEL NUMBER,
RECEIVER_DECODERSTALL NUMBER,
RECEIVER_DISCONTINUITIES NUMBER,
RECEIVER_DISCONTINUITIESPACKE NUMBER,
RECEIVER_DRIFT NUMBER,
RECEIVER_DROPPEDPACKETSUNTILR NUMBER,
RECEIVER_ECMLOOKUPERROR NUMBER,
RECEIVER_ECMPARSEERRORS NUMBER,
RECEIVER_PMTCHANGED NUMBER,
RECEIVER_REBUFFER NUMBER,
RECEIVER_SELECTCOMPONENTAUDIO NUMBER,
RECEIVER_TIMELINEDISCONTINUIT NUMBER,
RECEIVER_VIDEOACCESSCONTROLER NUMBER,
RECEIVER_VIDEOACCESSCONTROLUN NUMBER,
RECEIVER_VIDEOBUFFEROVERFLOWS NUMBER,
RECEIVER_VIDEOBUFFERUNDERRUNS NUMBER,
RECEIVER_VIDEOCODEC VARCHAR2(4000 BYTE),
RECEIVER_VIDEOCRYPTOERROR NUMBER,
RECEIVER_VIDEODATADROPPED NUMBER,
RECEIVER_VIDEODATATHROUGHPUT NUMBER,
RECEIVER_VIDEODECODERERRORS NUMBER,
RECEIVER_VIDEODRMERRORS NUMBER,
RECEIVER_VIDEODSPCRASHES VARCHAR2(4000 BYTE),
RECEIVER_VIDEOFIFORD NUMBER,
RECEIVER_VIDEOFIFOSIZE NUMBER,
RECEIVER_VIDEOFRAMESDECODED NUMBER,
RECEIVER_VIDEOFRAMESDROPPED NUMBER,
RECEIVER_VIDEOPTSDELTA NUMBER,
RECEIVER_VIDEOPTSDELTAHAL NUMBER,
RECEIVER_VIDEOUNDERRUN NUMBER,
SUBNETMASK VARCHAR2(4000 BYTE),
TUNER_BITRATE NUMBER,
TUNER_BUFFERFAILURE NUMBER,
TUNER_CCPACKETSRECEIVED NUMBER,
TUNER_CHANNEL NUMBER,
TUNER_DATATIMEOUTS NUMBER,
TUNER_DELIVERYMODE VARCHAR2(4000 BYTE),
TUNER_DROPPAST NUMBER,
TUNER_FILL NUMBER,
TUNER_HOLE NUMBER,
TUNER_HOLEDURINGBURST NUMBER,
TUNER_HOLEDURINGBURSTPACKETS NUMBER,
TUNER_HOLETOOLARGEPACKETS NUMBER,
TUNER_MAXIMUMHOLESIZE NUMBER,
TUNER_MULTICASTADDRESS VARCHAR2(4000 BYTE),
TUNER_MULTICASTJOINDELAY NUMBER,
TUNER_OUTOFORDER NUMBER,
TUNER_OVERFLOWRESET NUMBER,
TUNER_OVERFLOWRESETTIMES NUMBER,
TUNER_PACKETSEXPIRED NUMBER,
TUNER_PACKETSPROCESSED NUMBER,
TUNER_PACKETSRECEIVED NUMBER,
TUNER_PACKETSWITHOUTSESSION NUMBER,
TUNER_PARSEERRORS NUMBER,
TUNER_SRCUNAVAILABLERECEIVED NUMBER,
TUNER_TOTALHOLEPACKETS NUMBER,
TUNER_TOTALPACKETSEXPIRED NUMBER,
TUNER_TOTALPACKETSRECEIVED NUMBER,
TUNER_UNICASTADDRESS VARCHAR2(4000 BYTE),
RECEIVER_TUNEDFOR NUMBER,
MACADDRESS VARCHAR2(4000 BYTE),
RECEIVER_TOTALAVUNDERRUNS NUMBER,
RECEIVER_TOTALDISCONTINUITIES NUMBER,
SERVICEID VARCHAR2(4000 BYTE),
DRIVEPRESENT VARCHAR2(4000 BYTE),
STB_STATE VARCHAR2(32 BYTE),
PREV_EXPIRED NUMBER,
PREV_HOLES NUMBER,
PREV_RECEIVED NUMBER,
PREV_TIMESTAMP TIMESTAMP(6),
PREV_REBOOT VARCHAR2(4000 BYTE),
TOTALPACKETSEXPIRED_RATE NUMBER,
TOTALHOLEPACKETS_RATE NUMBER,
TOTALPACKETSRECEIVED_RATE NUMBER,
CONSTRAINT KOMODO_EXPIRED_RESULTS_PK
PRIMARY KEY
(HPS_DEVICE_KEY, EVENT_START_TIMESTAMP)
USING INDEX
TABLESPACE HPS_SUMMARY_INDEX
TABLESPACE HPS_SUMMARY_DATA
PARTITION BY RANGE (EVENT_START_TIMESTAMP)
INTERVAL( NUMTODSINTERVAL(1,'DAY'))
PARTITION DEFAULT_TIME_PART_01 VALUES LESS THAN (TIMESTAMP' 2010-08-01 00:00:00.000000000 +00:00')
LOGGING
COMPRESS FOR ALL OPERATIONS
TABLESPACE HPS_SUMMARY_DATA
NOCACHE
PARALLEL ( DEGREE DEFAULT INSTANCES DEFAULT )
MONITORING
/I am not sure it can be done.
SQL> create table sales
2 (
3 sales_id number,
4 sales_dt TIMESTAMP(6) with local time zone NOT NULL
5 )
6 partition by range (sales_dt)
7 interval (numtoyminterval(1,'MONTH'))
8 ( partition p0901 values less than (to_date('2009-02-01','yyyy-mm-dd')) );
create table sales
ERROR at line 1:
ORA-14751: Invalid data type for partitioning column of an interval partitioned
table
SQL> ed
Wrote file afiedt.buf
1 create table sales
2 (
3 sales_id number,
4 sales_dt TIMESTAMP(6)
5 )
6 partition by range (sales_dt)
7 interval (numtoyminterval(1,'MONTH'))
8* ( partition p0901 values less than (to_date('2009-02-01','yyyy-mm-dd')) )
SQL> /
Table created.
Maybe you are looking for
-
Create a Procedural ALV Report with editable fields and save the changes
Hi, I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also,
-
Windows 7 64 bit driver in Macbook Pro 13"
Hi i had install Windows 7 Home Basic 64 bit into my Macbook Pro 13" early 2011 i7, after installing Windows 7 no Right click working, no Keyboard Shortcut Key working, No DRIVERS of Windows 7 found in no Wifi Network , No Face time working ....... n
-
Ethernet of wifi which is best ? Solved! Go to Solution.
-
Set_client_information on database link
Hi. I'm trying to get some customer information from an external orcale database (a) to an XE database (b). The needed information are stored in hz_parties and hz_cust_accounts on the external database. For both tables I need to set an application id
-
Good Model for Web Self-service User registration ?
Trying to build a web self-service user registration module. 9iAS documentation says 9iAS uses JAZNUserManager that uses jazn-data.xml. I like jazn-data.xml because the password is encrypted and works with j_security_check with minimal coding, just n