Compile C in Terminal?
I use a Mac and GCC isn't a command in my terminal
I wonder if there is something I can download and install?
stevento wrote:
I use a Mac and GCC isn't a command in my terminal
I wonder if there is something I can download and install?This has nothing to do with Java. In future try and find a more suitable forum for these types of questions.
However, there is a developer tools install on the DVD that came with your computer. Double click that, wait 30 minutes, and everything you need will be installed.
Similar Messages
-
Apex PL/SQL: Compilation unit analysis terminated
HI,
Does any one help me on this.
while i compile my function, it compiles successfully. but show errors showing
menuid in 'TY_MENUIDS'; -- this line shows the error
PLS-00201: identifier 'TY_MENUIDS' must be declared
'TY_MENUIDS' is TYPE which has created inside the same schema
line 0 position 0 PL/SQL: Compilation unit analysis terminated
Thanks
Logaa
Edited by: Logaa on Aug 11, 2009 11:39 PMHi Gussay,
Thanks for your reply.
i have created type of object.
CREATE OR REPLACE TYPE "TY_NSN_MENUITEMS" AS OBJECT(id NUMBER, menuid VARCHAR2(100))
then i have create a type of TY_NSN_MENUITEMS
CREATE OR REPLACE TYPE "TY_NSN_MENUIDS" AS VARRAY(500) OF TY_NSN_MENUITEMS
then i have refered this TY_NSN_MENUIDS inside my function . in declaration part it shows me the error.
The function which i have created inside my APEX->OBJECTBROWSER->SCHEMA-> MYFUNCTION
thanks
Logaa
Edited by: Logaa on Aug 12, 2009 10:49 PM -
Hello friends , I have started with writing c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same and is there any pre stalled text editor on mac if yes then where and if no then which text editor to install and how to install gcc...please help me out thanks in advance !!!
I have started with writing c code on mac using xcode .....but one of my friend told me to use gcc for coding.
Why? If you are developing and writing code on a Mac why would you not use the tools Apple has given you? And Xcode, once you get use to it, is a very nice development environment that will make you life a whole lot easier.
If you insist on using an editor and the terminal I would recommend Emacs but it has a long learning curve so something like TextWrangler will work too.
As for the compiler if you have Xcode installed install the command line tools and you will be able to compile from the terminal.
good luck -
Compile problem running jdev on Windows Terminal Server
I am experiencing problems compiling java source files in jdev 9.0.3.1035
Sometimes the class file is not created if i make (compile) only one source file.
The jdev is running on a Windows Terminal Server 2000.
The sources are on the same Terminal Server.
The classes should be compiled to the Terminal Server as well.
I am working on a Terminal session elsewhere.
Anyone had this problem before ?Georg:
Q1) What you mean with 'the class file is not
created'? Is the .class file not overwritten? Is the
class file for a new file not written? Did you delete
the class file before compiling?I deleted the class file before compiling!
Q2) I guess that sources and classes are used by you
exclusively. Is this right?That is right!
Q3) In the project settings under Common | Input
Paths is the option 'Scan Source Path' enabled or
disabled?Both options have the same effect!
Q4) When the problem occurs: what is the active
window (code editor or Navigator)? What node is
selected in the Navigator?Tried following combinations:
- Having selected the Project node in the Navigator and the code editor is active window
- Having selected the class node in the Navigator and the code editor is active window
- Having selected the Project node in the Navigator and the Navigator is active window
- Having selected the class node in the Navigator and the Navigator is active window
Q5) What are the exact steps you took when it
happens? Do you use mouse or keyboard hotkeys? What
buttons or menus do you use?- right click in code editor and choose Make from popup menu
- right click on Long postings are being truncated to ~1 kB at this time. -
PLS-00304: cannot compile body of package without its specification
Hi all,
While compiling the below pasted package , I got the following error msg.
PL/SQL: Compilation unit analysis terminated
PLS-00304: cannot compile body of 'EDR_RPT_CLASS_BY_TAWT_PACKAGE'
without its specification
PLS-00905: object HDOT.EDR_RPT_CLASS_BY_TAWT_PACKAGE is invalidBut I believe that have declared package and ppackage body specification correctly. Please could anyone help me to find out the error
CREATE OR REPLACE PACKAGE edr_rpt_class_by_tawt_package AS
PROCEDURE edr_rpt_gen_class_by_tawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
PROCEDURE edr_rpt_gen_class_by_fawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
PROCEDURE edr_rpt_gen_class_by_sawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
PROCEDURE edr_rpt_gen_class_by_triawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
PROCEDURE edr_rpt_gen_class_by_qawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
FUNCTION class_count
in_lane_id edr_rpt_by_ranges_output.lane_id%TYPE,
in_direction_id edr_rpt_by_ranges_output.direction_id%TYPE,
in_interval_start_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
in_interval_end_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
in_axle_wt_min edr_cls_by_tawt_report_data.group_weight%TYPE,
iin_axle_wt_max edr_cls_by_tawt_report_data.group_weight%TYPE,
in_class_min edr_cls_by_tawt_report_data.vehicle_class%TYPE,
in_class_max edr_cls_by_tawt_report_data.vehicle_class%TYPE
RETURN VARCHAR2;
END edr_rpt_class_by_tawt_package;
CREATE OR REPLACE PACKAGE BODY edr_rpt_class_by_tawt_package AS
c_front_axle_only CONSTANT axle_class.group_type%TYPE := -1;
c_axle_single_group_type CONSTANT axle_class.group_type%TYPE := 1;
c_axle_tandem_group_type CONSTANT axle_class.group_type%TYPE := 2;
c_axle_tridem_group_type CONSTANT axle_class.group_type%TYPE := 3;
c_axle_quadrem_group_type CONSTANT axle_class.group_type%TYPE := 4;
c_kips_conversion_unit_id CONSTANT units.unit_id%TYPE := 8;
v_report_axle_group_type axle_class.group_type%TYPE := 0;
FUNCTION class_count
in_lane_id edr_rpt_by_ranges_output.lane_id%TYPE,
in_direction_id edr_rpt_by_ranges_output.direction_id%TYPE,
in_interval_start_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
in_interval_end_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
in_axle_wt_min edr_cls_by_tawt_report_data.group_weight%TYPE,
in_axle_wt_max edr_cls_by_tawt_report_data.group_weight%TYPE,
in_class_min edr_cls_by_tawt_report_data.vehicle_class%TYPE,
in_class_max edr_cls_by_tawt_report_data.vehicle_class%TYPE
RETURN NUMBER
IS
my_count_result NUMBER(18);
BEGIN
SELECT NVL(SUM(vehicle_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_cls_by_tawt_report_data
ON edr_cls_by_tawt_report_data.site_lane_id = report_lanes.site_lane_id
WHERE edr_cls_by_tawt_report_data.bin_start_date_time >= in_interval_start_date_time
AND edr_cls_by_tawt_report_data.bin_start_date_time < in_interval_end_date_time
AND edr_cls_by_tawt_report_data.group_weight >= in_axle_wt_min
AND edr_cls_by_tawt_report_data.group_weight < in_axle_wt_max
AND edr_cls_by_tawt_report_data.vehicle_class >= in_class_min
AND edr_cls_by_tawt_report_data.vehicle_class <= in_class_max
RETURN my_count_result;
END;
FUNCTION get_row_class_counts_text
RETURN VARCHAR2
IS
my_row_counts_text VARCHAR2(10000);
my_row_counts_entry VARCHAR2(10000);
CURSOR row_counts_text IS
SELECT 'edr_rpt_class_by_tawt_package.class_count('
||'lane_id, '
||'direction_id, '
||'interval_start_date_time, '
||'interval_end_date_time, '
||'range_low, '
||'range_high, '
|| class_id || ', '
|| class_id || ') "'|| class_id || '"'
FROM edr_rpt_tmp_report_classes
ORDER BY class_id;
BEGIN
my_row_counts_text := '';
my_row_counts_entry := '';
-- generate the speed ranges function calls
OPEN row_counts_text;
LOOP
FETCH row_counts_text INTO my_row_counts_entry;
EXIT WHEN row_counts_text%NOTFOUND;
my_row_counts_text := my_row_counts_text || ', ' || my_row_counts_entry;
END LOOP;
CLOSE row_counts_text;
RETURN my_row_counts_text;
END;
FUNCTION get_row_totals_text
RETURN VARCHAR2
IS
my_row_count_total_text VARCHAR2(10000);
BEGIN
my_row_count_total_text := '';
-- generate the 'total' column function call
SELECT 'edr_rpt_class_by_tawt_package.class_count('
||'lane_id, '
||'direction_id, '
||'interval_start_date_time, '
||'interval_end_date_time, '
||'range_low, '
||'range_high, '
|| MIN(class_id) || ', '
|| MAX(class_id) || ') " "'
INTO my_row_count_total_text
FROM edr_rpt_tmp_report_classes;
RETURN ', ' || my_row_count_total_text;
END;
PROCEDURE apply_default_awt_ranges(in_report_parameter_id IN NUMBER)
IS
my_awt_ranges_count NUMBER(4);
BEGIN
SELECT nvl(count(1),0)
INTO my_awt_ranges_count
FROM report_range_parameters
WHERE REPORT_PARAMETER_ID = in_report_parameter_id
AND REPORT_PARAMETER_GROUP = 'AXLE_GROUP'
AND REPORT_PARAMETER_NAME = 'AXLE_NAME';
IF ( my_awt_ranges_count = 0 )
THEN
INSERT INTO report_range_parameters (REPORT_PARAMETER_ID, REPORT_PARAMETER_GROUP, REPORT_PARAMETER_NAME, REPORT_PARAMETER_MIN_VALUE, REPORT_PARAMETER_MAX_VALUE)
VALUES (in_report_parameter_id, 'AXLE_GROUP', 'AXLE_NAME', '0', '2');
VALUES (in_report_parameter_id, 'AXLE_GROUP', 'AXLE_NAME', '30', '32');
END IF;
END;
PROCEDURE edr_class_by_tawt_use_per_veh
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
in_good_status_mask IN NUMBER
IS
max_axle_group_value NUMBER(12);
BEGIN
DELETE FROM edr_cls_by_tawt_report_data;
COMMIT;
INSERT INTO edr_cls_by_tawt_report_data
site_id,
site_lane_id,
site_direction_id,
site_direction_name,
bin_start_date_time,
group_weight,
bin_id,
bin_value
SELECT site_id,
site_lane_id,
site_direction_id,
site_direction_name,
date_time,
group_weight,
vehicle_class,
COUNT(vehicle_class)
FROM
SELECT edr_cls_by_tawt_per_veh_data.*
FROM edr_cls_by_tawt_per_veh_data
GROUP BY date_time,
site_lane_id,
group_weight,
vehicle_class,
site_id,
site_direction_id,
site_direction_name;
END edr_class_by_tawt_use_per_veh;
PROCEDURE edr_class_by_tawt_data_type
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
in_good_status_mask IN NUMBER,
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
-- Axle 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_class_by_tawt_use_per_veh( in_report_parameter_id, in_good_status_mask );
ELSE
RAISE_APPLICATION_ERROR(-20101,'The data type specified is not recognized.');
END IF;
END edr_class_by_tawt_data_type;
PROCEDURE edr_class_by_tawt_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
DELETE FROM edr_cls_by_tawt_per_veh_data;
INSERT INTO edr_cls_by_tawt_per_veh_data
site_id,
site_lane_id,
site_direction_id,
site_direction_name,
record_id,
date_time,
group_weight,
vehicle_class,
group_number,
vehicle_status,
vehicle_error_count,
axle_violations_count,
group_type
SELECT axle_info.site_id,
axle_info.site_lane_id,
axle_info.site_direction_id,
axle_info.site_direction_name,
axle_info.record_id,
axle_info.datetime,
axle_info.group_weight,
axle_info.v_class,
axle_info.group_number,
NVL((SELECT SUM(status_code)
FROM traffic_status
WHERE traffic_status.record_id = axle_info.record_id), 0) vehicle_status,
NVL((SELECT COUNT(error_code)
FROM traffic_error
WHERE traffic_error.record_id = axle_info.record_id), 0) vehicle_error_count,
NVL((SELECT COUNT(1)
FROM axle_weight_violation
WHERE axle_weight_violation.record_id = axle_info.record_id), 0) axle_violations_count,
axle_info.group_type
FROM (SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
traffic_record.record_id,
traffic_record.datetime,
NVL(traffic_class.v_class, 0) v_class,
NVL(axle_class.group_type, 0) group_type,
NVL(axle_class.group_number, 0) group_number,
NVL(TRUNC(sum(convert_units(axle.weight_unit_id,
c_kips_conversion_unit_id,
axle.axle_weight
0
) group_weight
FROM traffic_record
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
GROUP BY site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
traffic_record.record_id,
traffic_record.datetime,
traffic_class.v_class,
axle_class.group_type,
axle_class.group_number
) axle_info
END edr_class_by_tawt_get_veh_data;
PROCEDURE gen_class_by_axle_type
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
AS
BEGIN
apply_default_awt_ranges(in_report_parameter_id);
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);
edr_rpt_generic_package.edr_rpt_gen_tmp_speed_ranges(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_class_by_tawt_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_class_by_tawt_data_type
in_report_parameter_id,
my_good_weight_statuses_mask,
my_selected_data_type,
my_used_data_type
edr_rpt_generic_package.gen_rpt_by_ranges_output_table
in_report_parameter_id,
'AXLE_GROUP',
'AXLE_NAME'
COMMIT;
my_report_data_statement :=
' SELECT rank "Rank", '
|| ' row_type "Row Type", '
|| ' interval_start_date_time "Date", '
|| ' interval_start_date_time, '
|| ' range_label "Chart X-Axis", '
|| ' lane_id "Group Id" , '
|| ' ''None'' "Group Name", '
|| ' range_label "Speed (mph)" '
|| get_row_class_counts_text
|| get_row_totals_text
|| ' FROM edr_rpt_by_ranges_output '
|| ' ORDER BY lane_id, '
|| ' direction_id, '
|| ' interval_start_date_time, '
|| ' range_high, '
|| ' rank, '
|| ' range_low'
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 range_low "X Axis", '
|| ' lane_id "Group" '
|| get_row_class_counts_text
|| ' FROM '
|| ' ( '
|| ' SELECT lane_id, '
|| ' direction_id, '
|| ' range_low, '
|| ' range_high, '
|| ' min(interval_start_date_time) interval_start_date_time, '
|| ' max(interval_end_date_time) interval_end_date_time '
|| ' FROM edr_rpt_by_ranges_output '
|| ' WHERE rank = 1 '
|| ' GROUP BY lane_id, direction_id, range_low, range_high '
|| ' ) '
|| ' order by "Group", range_low '
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(DISTINCT record_id), 0)
INTO my_per_vehicle_total
FROM edr_cls_by_tawt_per_veh_data;
SELECT NVL(COUNT(DISTINCT record_id), 0)
INTO my_status_vehicle_total
FROM edr_cls_by_tawt_per_veh_data
WHERE vehicle_status > 0
AND vehicle_error_count = 0;
SELECT NVL(COUNT(DISTINCT record_id), 0)
INTO my_error_vehicle_total
FROM edr_cls_by_tawt_per_veh_data
WHERE vehicle_error_count > 0;
SELECT NVL(COUNT(DISTINCT record_id), 0)
INTO my_status_clear_total
FROM edr_cls_by_tawt_per_veh_data
WHERE vehicle_status = 0
AND vehicle_error_count = 0;
SELECT NVL(COUNT(1), 0)
INTO my_binned_vehicle_total
FROM edr_cls_by_tawt_per_veh_data;
SELECT NVL(COUNT(1), 0)
INTO my_good_weight_total
FROM edr_cls_by_tawt_per_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
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 gen_class_by_axle_type;
PROCEDURE edr_rpt_gen_class_by_sawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
AS
BEGIN
v_report_axle_group_type := c_axle_single_group_type;
gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;
PROCEDURE edr_rpt_gen_class_by_fawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
AS
BEGIN
v_report_axle_group_type := c_front_axle_only ;
gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;
PROCEDURE edr_rpt_gen_class_by_tawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
AS
BEGIN
v_report_axle_group_type := c_axle_tandem_group_type;
gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;
PROCEDURE edr_rpt_gen_class_by_triawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
AS
BEGIN
v_report_axle_group_type := c_axle_tridem_group_type;
gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;
PROCEDURE edr_rpt_gen_class_by_qawt (
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
report_data OUT SYS_REFCURSOR,
chart_data OUT SYS_REFCURSOR,
footer_data OUT SYS_REFCURSOR
AS
BEGIN
v_report_axle_group_type := c_axle_quadrem_group_type;
gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;
END edr_rpt_class_by_tawt_package;
LIST
SHOW ERRORHi,
PLS-00304: cannot compile body of 'EDR_RPT_CLASS_BY_TAWT_PACKAGE'
without its specificationThis error usually indicates an issue with used datatypes in a package spec. that differs from a package body.
Check your spec:
FUNCTION class_count
in_lane_id edr_rpt_by_ranges_output.lane_id%TYPE,
in_direction_id edr_rpt_by_ranges_output.direction_id%TYPE,
in_interval_start_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
in_interval_end_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
in_axle_wt_min edr_cls_by_tawt_report_data.group_weight%TYPE,
iin_axle_wt_max edr_cls_by_tawt_report_data.group_weight%TYPE,
in_class_min edr_cls_by_tawt_report_data.vehicle_class%TYPE,
in_class_max edr_cls_by_tawt_report_data.vehicle_class%TYPE
RETURN VARCHAR2; However in your package body:
FUNCTION class_count
in_lane_id edr_rpt_by_ranges_output.lane_id%TYPE,
in_direction_id edr_rpt_by_ranges_output.direction_id%TYPE,
in_interval_start_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
in_interval_end_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
in_axle_wt_min edr_cls_by_tawt_report_data.group_weight%TYPE,
in_axle_wt_max edr_cls_by_tawt_report_data.group_weight%TYPE,
in_class_min edr_cls_by_tawt_report_data.vehicle_class%TYPE,
in_class_max edr_cls_by_tawt_report_data.vehicle_class%TYPE
RETURN NUMBERReturn number in spec. vs. return varchar2 in body..
That won't compile, either return a number or a varchar2 in both. (spec and body). -
Problem with gcc in Leopard terminal
Hi,
I am hoping to study computer science in college and eventually become a mac developer. I just recently bought an objective C programming book that is geared toward beginners. After reading it some, I tried to make a very simple program. I used text edit and saved it as a .m file. When I tried to compile it in terminal using gcc, (I have installed the dev tools) it spat back this error message.
+Undefined symbols:+
+".objcclass_nameObject", referenced from:+
+.objcclass_nameFraction in ccG8DljJ.o+
+"objcmsgSend", referenced from:+
+_main in ccG8DljJ.o+
+_main in ccG8DljJ.o+
+_main in ccG8DljJ.o+
+_main in ccG8DljJ.o+
+_main in ccG8DljJ.o+
+_main in ccG8DljJ.o+
+ld: symbol(s) not found+
+collect2: ld returned 1 exit status+
My program (below) follows one in the book very closely and I am sure the code is sound.
Any help would be appreciated.
Thanks!
+#import <stdio.h>+
+#import <objc/Object.h>+
+@interface Point: Object+
+int xcor;+
+int ycor;+
+-(void) setxcor: (int) x;+
+-(void) setycor: (int) y;+
+-(int) getxcor;+
+-(int) getycor;+
@end
+@implementation Point;+
+-(void) setxcor: (int) x+
+xcor = x;+
+-(void) setycor: (int) y+
+ycor = y;+
+-(int) getxcor+
+return xcor;+
+-(int) getycor+
+return ycor;+
@end
+int main (int argc, char *argv[])+
+Point *mypoint = [[Point alloc] init];+
+[mypoint setycor: 100];+
+[mypoint setxcor: 50];+
+printf("The point's coordinates are (%i,%i)\n",[mypoint getxcor], [mypoint getycor]);+
+[mypoint free];+
+return 0;+Through gcc in terminal. I typed in the following: "gcc ~/Desktop/testprog/main.m -o ~/Desktop/testprog/proj1 -1 -ObjC ." The first directory is that of the source file and the last one is that of the target file (i.e. the finished command line app). I am not sure what significance the "-o" and "-1" arguments have.
-
Compile invalid objects in apps schema
i make compiled the apps schema by
adadmin,utlrp.sql,compiled manual but still i am getting INVALID objects .. how to compile these objects ?
Below is the output
SQL>
column owner format A9
column object_name format A31
column object_type format A15
column last_ddl_time format A10
spool invalids.lst
select OWNER, OBJECT_NAME,OBJECT_TYPE,LAST_DDL_TIME
from dba_objects where status='INVALID'
order by owner;
OWNER OBJECT_NAME OBJECT_TYPE LAST_DDL_T
APPS FV_FACTS_TBAL_TRANSACTIONS PACKAGE BODY 03-MAR-13
APPS IGI_IAC_REINSTATE_PKG PACKAGE BODY 03-MAR-13
APPS IGI_IAC_RETIREMENT PACKAGE BODY 03-MAR-13
APPS CST_PERIODIC_ABSORPTION_PROC PACKAGE BODY 03-MAR-13
APPS FV_SLA_UTL_PROCESSING_PKG PACKAGE BODY 03-MAR-13
APPS FV_CCR_UTIL_PVT PACKAGE BODY 03-MAR-13
APPS PSA_AP_BC_PVT PACKAGE BODY 03-MAR-13
APPS XLA_00200_AAD_S_000012_PKG PACKAGE BODY 03-MAR-13
APPS AR_RECEIPT_UPDATE_API_PUB PACKAGE BODY 03-MAR-13
APPS AR_AUTOREC_API PACKAGE BODY 03-MAR-13
10 rows selected.
SQL> alter package APPS.FV_FACTS_TBAL_TRANSACTIONS compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.FV_FACTS_TBAL_TRANSACTIONS:
LINE/COL ERROR
1742/6 PL/SQL: SQL Statement ignored
1743/4 PL/SQL: ORA-00918: column ambiguously defined
SQL> alter package APPS.IGI_IAC_REINSTATE_PKG compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.IGI_IAC_REINSTATE_PKG:
LINE/COL ERROR
3470/3 PL/SQL: Statement ignored
3470/10 PLS-00306: wrong number or types of arguments in call to
'GET_ASSET_RETIRE_REC'
SQL> alter package APPS.IGI_IAC_RETIREMENT compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.IGI_IAC_RETIREMENT:
LINE/COL ERROR
4247/10 PL/SQL: Statement ignored
4247/18 PLS-00306: wrong number or types of arguments in call to
'GET_ASSET_RETIRE_REC'
SQL> alter package APPS.CST_PERIODIC_ABSORPTION_PROC compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.CST_PERIODIC_ABSORPTION_PROC:
LINE/COL ERROR
3901/3 PL/SQL: Statement ignored
3901/3 PLS-00306: wrong number or types of arguments in call to
'ITERATION_PROCESS'
SQL> alter package APPS.FV_SLA_UTL_PROCESSING_PKG compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.FV_SLA_UTL_PROCESSING_PKG:
LINE/COL ERROR
49/7 PL/SQL: Statement ignored
49/22 PLS-00302: component 'PSA_XLA_ERROR' must be declared
SQL> alter package APPS.FV_CCR_UTIL_PVT compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.FV_CCR_UTIL_PVT:
LINE/COL ERROR
2926/3 PL/SQL: Statement ignored
2926/19 PLS-00302: component 'CONTACT_NAME' must be declared
2928/4 PL/SQL: Statement ignored
2928/20 PLS-00302: component 'CONTACT_PHONE' must be declared
2929/8 PL/SQL: Statement ignored
2929/24 PLS-00302: component 'CONTACT_PHONE' must be declared
2931/3 PL/SQL: Statement ignored
2931/19 PLS-00302: component 'CONTACT_EMAIL' must be declared
2932/3 PL/SQL: Statement ignored
2932/19 PLS-00302: component 'CONTACT_FAX' must be declared
SQL> alter package APPS.PSA_AP_BC_PVT compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.PSA_AP_BC_PVT:
LINE/COL ERROR
291/11 PL/SQL: Statement ignored
291/26 PLS-00302: component 'PSA_XLA_ERROR' must be declared
346/13 PL/SQL: Statement ignored
346/28 PLS-00302: component 'PSA_XLA_ERROR' must be declared
835/7 PL/SQL: Statement ignored
835/12 PLS-00313: 'ISPREPAYDIST' not declared in this scope
1002/15 PL/SQL: Statement ignored
1002/34 PLS-00201: identifier 'J' must be declared
1014/13 PL/SQL: Statement ignored
1014/48 PLS-00201: identifier 'I' must be declared
1020/13 PL/SQL: Statement ignored
LINE/COL ERROR
1020/43 PLS-00201: identifier 'I' must be declared
1022/13 PL/SQL: Statement ignored
1024/73 PLS-00201: identifier 'I' must be declared
1055/11 PL/SQL: Statement ignored
1055/48 PLS-00201: identifier 'I' must be declared
1057/11 PL/SQL: SQL Statement ignored
1057/51 PLS-00201: identifier 'I' must be declared
1080/80 PLS-00201: identifier 'I' must be declared
1080/80 PLS-00201: identifier 'I' must be declared
SQL> alter package APPS.XLA_00200_AAD_S_000012_PKG compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.XLA_00200_AAD_S_000012_PKG:
LINE/COL ERROR
157514/2 PLS-00103: Encountered the symbol "THEN" when expecting one of
the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set
specification>
<an alternatively-quote
LINE/COL ERROR
SQL> alter package APPS.AR_RECEIPT_UPDATE_API_PUB compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.AR_RECEIPT_UPDATE_API_PUB:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
1/14 PLS-00201: identifier 'AR_RECEIPT_UPDATE_API_PUB' must be
declared
1/14 PLS-00304: cannot compile body of 'AR_RECEIPT_UPDATE_API_PUB'
without its specification
SQL> show err
Errors for PACKAGE BODY APPS.AR_AUTOREC_API:
LINE/COL ERROR
2724/9 PL/SQL: SQL Statement ignored
2740/27 PL/SQL: ORA-00904: "EXT"."SEQ_TYPE_LAST": invalid identifier
note:application v12.0.4 database 10.2.3SQL> alter package APPS.FV_FACTS_TBAL_TRANSACTIONS compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.FV_FACTS_TBAL_TRANSACTIONS:
LINE/COL ERROR
1742/6 PL/SQL: SQL Statement ignored
1743/4 PL/SQL: ORA-00918: column ambiguously defined
SQL> alter package APPS.CST_PERIODIC_ABSORPTION_PROC compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.CST_PERIODIC_ABSORPTION_PROC:
LINE/COL ERROR
3901/3 PL/SQL: Statement ignored
3901/3 PLS-00306: wrong number or types of arguments in call to
'ITERATION_PROCESS'
SQL> alter package APPS.AR_RECEIPT_UPDATE_API_PUB compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.AR_RECEIPT_UPDATE_API_PUB:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
1/14 PLS-00201: identifier 'AR_RECEIPT_UPDATE_API_PUB' must be
declared
1/14 PLS-00304: cannot compile body of 'AR_RECEIPT_UPDATE_API_PUB'
without its specification
SQL> alter package APPS.XLA_00200_AAD_S_000012_PKG compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.XLA_00200_AAD_S_000012_PKG:
LINE/COL ERROR
157514/2 PLS-00103: Encountered the symbol "THEN" when expecting one of
the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set
specification>
<an alternatively-quote
LINE/COL ERROR
SQL> alter package APPS.FV_CCR_UTIL_PVT compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.FV_CCR_UTIL_PVT:
LINE/COL ERROR
2926/3 PL/SQL: Statement ignored
2926/19 PLS-00302: component 'CONTACT_NAME' must be declared
2928/4 PL/SQL: Statement ignored
2928/20 PLS-00302: component 'CONTACT_PHONE' must be declared
2929/8 PL/SQL: Statement ignored
2929/24 PLS-00302: component 'CONTACT_PHONE' must be declared
2931/3 PL/SQL: Statement ignored
2931/19 PLS-00302: component 'CONTACT_EMAIL' must be declared
2932/3 PL/SQL: Statement ignored
2932/19 PLS-00302: component 'CONTACT_FAX' must be declared -
Hi expert,
We are trying the validate the PA_TIME_CLIENT_EXTN package body. It is giving the below error.
0/0 PL/SQL: Compilation unit analysis terminated
1/14 PLS-00905: object APPS.PA_TIME_CLIENT_EXTN is invalid
1/14 PLS-00304: cannot compile body of 'PA_TIME_CLIENT_EXTN' without
its specification
My environment details are as below.
Oracle apps version: 11.5.10.2
DB version : 11.2.0.1
OS version : IBM AIX 6.1
Please help me on this.
ThanksThis error is usually seen when you have a different datatype specification in your package specification and your package body. I think that is some thing you might want to check first.
Regards,
Johan Louwers -
Can anyone tell me where i can get an compiler for the mac os x?
if you have downloaded the latest java release from apple (using the update module) you should have java 1.5 by now... On a mac you can compile using the terminal...
voyx -
C program not running from terminal as expected
Hi everyone
I am starting C programming as part of my university degree, I understand most of the content so far. I am compiling and running my program in Terminal and I am having a small amount of trouble with running it. Here is how I have set my program up:
• Created folder named "C" on the desktop
• Opened terminal and changed the directory by using the following command: cd /Users/jc/Desktop/C, the directory is changed as the terminal output reads:
JCs-MacBook-Pro:C jc$
• Created main.c file
• Compiled fine in terminal by using: cc main.c
Here is where it breaks down, typing a.out does not run the program (as I expected) but returns the error: "-bash: a.out: command not found", if I drag the file to terminal or type out the absolute path and execute the program runs fine. What is happening and how do I fix it so typing just a.out runs the program?
Thanks in Advance
J.CThe commands to add a folder to your search path (if you haven't changed your shell from the default bash) are:
PATH=$PATH:<absolute path to parent folder>/MyProjectFolder
export PATH
Typing the above at your terminal prompt should allow you to execute your programs without typing ./a.out, but only for the life of the current terminal session (You can type 'printenv' or 'echo $PATH' to verify that your folder was added correctly).
If you wish to add your folder automatically to any terminal session, the above should be saved in a text file named '.profile' in your home folder (the folder you're in when you start Terminal, e.g. /users/raynewbie).
If you wish to add whatever folder is current (wherever I am right now) to your permanent search path, insert the following into .profile:
PATH=$PATH:.
export PATH
The above has the disadvantage of being less secure on multiuser systems. The current, "dot", directory used to be first in the default Unix search path. But when I was in school (during the Lincoln administration) our favorite sport was trying to hack root perms by placing our own version of 'ls' in directories frequented by superusers. Higher powers caught on to this after only a few years and newer systems required you to type the dot. -
Hi All!
I am using Oracle 10g. I am facing a strange problem. I am unable to compile a procedure. I get the following error:
PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-201: identifier 'UNDEFINED' must be declared
The line it is pointing to is:
select dai.id into m_id from ACCNTPARTIES dai where dai.P_NUM = mpnum
The error is pointing to ACCNTPARTIES in the line, which is a view.
I checked in some blogs for the error. Some say it a bug, some say, drop and recreate the view, it will work. But nothing worked for me :( .
Please let me know, what could be the problem and suggest a solution. Thanking in advance.
Regards,
Deepika.Hi!
The view definition looks as follows:
CREATE OR REPLACE FORCE VIEW ACCNTPARTIES(ID,NAME,CERT,ADDRESS,STATE,COUNTRY)
as select A.ID,A.NAME,A.CERT,B.ADDRESS,B.STATE,B.COUNTRY
from ACCNT A,ADDRESS B where to_char(A.id)=B.ID;
In this definition, ACCNT is a table and ADDRESS is a view.
The procedure which is not getting complied looks somethhing like this:
create or replace
PROCEDURE CREATEITEM (
batchid in number,
mpnum in varchar2,
mparty_type in varchar default 'ACCNTPARTIES'
) is
m_id number;
mopenopps number;
begin
if mparty_type = 'ACCNTPARTIES' then
select dai.id into m_id from ACCNTPARTIES dai where dai.P_NUM = mpnum
else
select hc.id into m_id from CON hc where hc.p_num = mpnum;
end if;
insert into some_table values ( some values );
commit;
end;
Hope this helps.
Regards,
Deepika. -
Installing guten.glade software with Terminal ? (Gutenberg ereader)
This software from Source Forge has no obvious installer . The manner in which it is compiled opens the Terminal Application . When Terminal is waiting to execute , compile and or install , I am unable to direct the issues as I am not all that familiar with using it , Terminal .
Would someone have a moment to direct my attention as to how to familiarise myself with the basic understanding necessary to install this type of software ?I believe he means you should type
less ~/.profile
the ~ means your home dir, /Users/yourlogin_namehere/, and the .profile is a file that contains settings for your bash login, the program that is invoked when run the Terminal app. it should produce output similar to this:
test -r /sw/bin/init.sh && . /sw/bin/init.sh
if [ $VerboseFlag = "-v" ];
then
lock -p -t 7654321;
fi
The which command shows the location of a program in your path. The path is a list of directories where executable are held. You can only execute programs by name if they are in your path. If there are not in your path you can still run them by using the full pathname of the executable, for example /opt/local/bin/port is the full pathname of port.
To add something to your path, add a line to .profile with something like this.
export PATH=/pathtoadd/:$PATH
to add a line to your .profile file, use the command open.
open ~/.profile
The export command adds a variable to environment. PATH is the variable that contains your path. The open command is a rather handy OS X only command that opens a file with the associated program
The line that you need to add so you can use port, and the programs installed with port is
export PATH=/opt/local/bin/:/opt/local/sbin/:$PATH
just add that to the end of the file should let you use port.
After doing that , install the programs with port as posted earlier.
After typing in a command with port it should look similar to this
---> Cleaning py-sqlite
---> Fetching sqlite2
---> Attempting to fetch sqlite-2.8.17.tar.gz from http://www.sqlite.org/
---> Verifying checksum(s) for sqlite2
---> Extracting sqlite2
---> Applying patches to sqlite2
---> Configuring sqlite2
---> Building sqlite2 with target all
---> Staging sqlite2 into destroot
---> Installing sqlite2 2.8.17_0
---> Activating sqlite2 2.8.17_0
---> Cleaning sqlite2
The output above is from me installing sqlite.
Sorry if I haven't been the best at explaining the steps involved, hopefully I did a better job this time.
PS:
If you have any questions about a command in terminal type
man commandname
where commandname is the name of the command you want to know about. It will show info about a command and let you know what it does and how to use it. Use the arrow keys to move around the document and press q to quit. -
[SOLVED] Make "make" use 4 jobs by default while compiling stuff
I just compiled vidalia with 1 job, and then with 4 jobs. (with 1 job, it rakes 2.7 times the time taken with 4 jobs)
Compiling with 1 job:
real 2m42.293s
user 2m19.494s
sys 0m21.199s
Compiling with 4 jobs:
real 0m59.437s
user 2m28.377s
sys 0m25.388s
If I am compiling stuff from terminal, I can simply do that by making an alias "alias make="make -j 4" but "makepkg" doesnt respect that.
Any idea on how can I always compile stuff with 4 jobs even thought the PKGBUILD says to use "make" but I actually want "make -j 4".
Last edited by shadyabhi (2011-04-19 11:14:45)defears wrote:
sudo nano /etc/makepkg.conf
Scroll down and uncomment and change.
Oh. Even I too opened that file in vim and searched for "make" and got nothing interesting. Actually, it was capital "MAKEFLAGS".
Adding this to /etc/makepkg.conf did the job. Thanks.
MAKEFLAGS="-j 4"
Last edited by shadyabhi (2011-04-19 11:17:15) -
How can i get the object error in after create trigger???
To get the source code i use ora_sql_text funcion, but to compilation error i don't know...
Thanks,
Renato RodriguesIt too has some limitation. It cannot trap anonymous block's error.
Here is one way ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.58
satyaki>
satyaki>
satyaki>select * from user_errors;
NAME TYPE SEQUENCE LINE POSITION TEXT
P PROCEDURE 1 1 1 PLS-00410: duplicate fields in RECORD,TABLE or argument list are not permitted
P PROCEDURE 2 0 0 PL/SQL: Compilation unit analysis terminated
NUM_ARRAY_REC TYPE 1 1 23 PLS-00355: use of pl/sql table not allowed in this context
NUM_ARRAY_REC TYPE 2 0 0 PL/SQL: Compilation unit analysis terminated
SPLIT FUNCTION 2 45 1 PLS-00103: Encountered the symbol "SELECT"
LOGID_TRIGGER TRIGGER 1 2 23 PLS-00357: Table,View Or Sequence reference 'LOGID.NEXTVAL' not allowed in this context
TEST_VV PROCEDURE 1 1 19 PLS-00230: OUT and IN OUT formal parameters may not have default expressions
CLOB_OBJ TYPE 1 3 18 PLS-00103: Encountered the symbol ";" when expecting one of the following:
:= . ( ) , @ % not null range default external character
The symbol ";" was ignored.
NAME TYPE SEQUENCE LINE POSITION TEXT
LOGID_TRIGGER TRIGGER 2 2 2 PL/SQL: Statement ignored
EMPLOYEE TYPE BODY 1 1 11 PLS-00201: identifier 'EMPLOYEE' must be declared
TEST_PRIVS PROCEDURE 1 6 10 PL/SQL: ORA-00942: table or view does not exist
EMPLOYEE TYPE BODY 2 1 11 PLS-00304: cannot compile body of 'EMPLOYEE' without its specification
EMPLOYEES_VIEW VIEW 1 0 0 ORA-01730: invalid number of column names specified
EMPLOYEE TYPE BODY 3 0 0 PL/SQL: Compilation unit analysis terminated
SPLIT FUNCTION 1 28 1 PLS-00103: Encountered the symbol "DECLARE"
TEST_PRIVS PROCEDURE 2 5 5 PL/SQL: SQL Statement ignored
TEST_PRIVS PROCEDURE 3 3 10 PLS-00341: declaration of cursor 'C1' is incomplete or malformed
TEST_PRIVS PROCEDURE 4 9 6 PL/SQL: Item ignored
NAME TYPE SEQUENCE LINE POSITION TEXT
TEST_PRIVS PROCEDURE 5 13 42 PLS-00364: loop index variable 'R1' use is invalid
TEST_PRIVS PROCEDURE 6 13 5 PL/SQL: Statement ignored
20 rows selected.
Elapsed: 00:00:00.30
satyaki>
satyaki>
satyaki>
satyaki>declare
2 str varchar2;
3 begin
4 nul;
5 end;
6 /
str varchar2;
ERROR at line 2:
ORA-06550: line 2, column 10:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 4, column 5:
PLS-00201: identifier 'NUL' must be declared
ORA-06550: line 4, column 5:
PL/SQL: Statement ignored
Elapsed: 00:00:00.42
satyaki>
satyaki>
satyaki>select * from user_errors;
NAME TYPE SEQUENCE LINE POSITION TEXT
P PROCEDURE 1 1 1 PLS-00410: duplicate fields in RECORD,TABLE or argument list are not permitted
P PROCEDURE 2 0 0 PL/SQL: Compilation unit analysis terminated
NUM_ARRAY_REC TYPE 1 1 23 PLS-00355: use of pl/sql table not allowed in this context
NUM_ARRAY_REC TYPE 2 0 0 PL/SQL: Compilation unit analysis terminated
SPLIT FUNCTION 2 45 1 PLS-00103: Encountered the symbol "SELECT"
LOGID_TRIGGER TRIGGER 1 2 23 PLS-00357: Table,View Or Sequence reference 'LOGID.NEXTVAL' not allowed in this context
TEST_VV PROCEDURE 1 1 19 PLS-00230: OUT and IN OUT formal parameters may not have default expressions
CLOB_OBJ TYPE 1 3 18 PLS-00103: Encountered the symbol ";" when expecting one of the following:
:= . ( ) , @ % not null range default external character
The symbol ";" was ignored.
NAME TYPE SEQUENCE LINE POSITION TEXT
LOGID_TRIGGER TRIGGER 2 2 2 PL/SQL: Statement ignored
EMPLOYEE TYPE BODY 1 1 11 PLS-00201: identifier 'EMPLOYEE' must be declared
TEST_PRIVS PROCEDURE 1 6 10 PL/SQL: ORA-00942: table or view does not exist
EMPLOYEE TYPE BODY 2 1 11 PLS-00304: cannot compile body of 'EMPLOYEE' without its specification
EMPLOYEES_VIEW VIEW 1 0 0 ORA-01730: invalid number of column names specified
EMPLOYEE TYPE BODY 3 0 0 PL/SQL: Compilation unit analysis terminated
SPLIT FUNCTION 1 28 1 PLS-00103: Encountered the symbol "DECLARE"
TEST_PRIVS PROCEDURE 2 5 5 PL/SQL: SQL Statement ignored
TEST_PRIVS PROCEDURE 3 3 10 PLS-00341: declaration of cursor 'C1' is incomplete or malformed
TEST_PRIVS PROCEDURE 4 9 6 PL/SQL: Item ignored
NAME TYPE SEQUENCE LINE POSITION TEXT
TEST_PRIVS PROCEDURE 5 13 42 PLS-00364: loop index variable 'R1' use is invalid
TEST_PRIVS PROCEDURE 6 13 5 PL/SQL: Statement ignored
20 rows selected.
Elapsed: 00:00:00.45
satyaki>Regards.
Satyaki De. -
Error encountered during execution of procedure....
Hi,
Im new to Oracle..just started with working with Oracle 10g in my company.Im trying to execute a procedure in SQL Developer 1.5.1 but getting this error as shown below.It would be great if anyone could help me out in it.
Error starting at line 3 in command:
EXECUTE EMP_PROC;
Error report:
ORA-06550: line 1, column 7:
PLS-00905: object SYSTEM.EMP_PROC is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
EMP_PROC is the Procedure im trying to execute.
**I have 2 tables namely Emp_INFO(emp_name,emp_id,dept_id,salary) and DEPT_INFO(dept_name,dept_id)...Im trying to display names of employess based on the range of salaries(low,mid,high)..
The code for this procedure is given below which also contains 3 functions...
/*Procedure EMP_PROC*/
CREATE OR REPLACE PROCEDURE EMP_PROC (sal_low IN NUMBER,
sal_mid IN NUMBER,
sal_high IN NUMBER) AS
/*Declaring variables to be used inside the Procedure*/
sal_low NUMBER(10,2) := 80000;
sal_mid NUMBER(10,2) := 300000;
sal_high NUMBER(10,2) := 500000;
s_low VARCHAR2(25);
s_mid VARCHAR2(25);
s_high VARCHAR2(25);
sal_range VARCHAR2(20);
/*Declaring User Defined Exception*/
usr_excp EXCEPTION;
/*Cursor for retrieving Low Salary Employees */
CURSOR cursor_lowSal IS
SELECT Emp_Name ,Emp_ID ,Dept_ID ,Dept_Name
FROM EMP_INFO,DEPT_INFO
WHERE Salary <= 80000;
/*Cursor for retrieving Mid Salary Employees */
CURSOR cursor_midSal IS
SELECT Emp_Name ,Emp_ID ,Dept_ID ,Dept_Name
FROM EMP_INFO,DEPT_INFO
WHERE Salary > 80000 OR Salary < 500000;
/*Cursor for retrieving High Salary Employees */
CURSOR cursor_highSal IS
SELECT Emp_Name ,Emp_ID ,Dept_ID ,Dept_Name
FROM EMP_INFO,DEPT_INFO
WHERE Salary > 500000;
/*Declaring variables that will hold values*/
e_name EMP_INFO.Emp_Name%TYPE;
e_id EMP_INFO.Emp_ID%TYPE;
d_name DEPT_INFO.Dept_Name%TYPE;
d_id EMP_INFO.Dept_ID%TYPE;
BEGIN
/*Enter the Salary range*/
sal_range := &sal_range;
/*Checking for Salary Range*/
IF sal_range == sal_low THEN
OPEN cursor_lowSal;
FETCH cursor_lowSal INTO e_name ,e_id ,d_name ,d_id;
/*Calling Function Low_Sal*/
s_low := funcLow_sal();
/*Displaying Output*/
dbms_output.put_line(s_low||'::'||e_name||','||e_id||','||d_name||','||d_id);
ELSIF sal_range == mid_sal THEN
OPEN cursor_midSal;
FETCH cursor_lowSal INTO e_name ,e_id ,d_name ,d_id;
/*Calling Function Mid_Sal*/
s_mid := funcMid_sal();
/*Displaying Output*/
dbms_output.put_line(s_mid||'::'||e_name||','||e_id||','||d_name||','||d_id);
ELSIF sal_range == sal_high THEN
OPEN cursor_highSal;
FETCH cursor_lowSal INTO e_name ,e_id ,d_name ,d_id;
/*Calling Function High_Sal*/
s_high := funcHigh_sal();
/*Displaying Output*/
dbms_output.put_line(s_high||'::'||e_name||','||e_id||','||d_name||','||d_id);
ELSE
/*Calling user defined Exception*/
RAISE usr_excp;
END IF;
/*Handling Exceptions*/
EXCEPTION
WHEN usr_excp THEN
dbms_output.put_line('Not in range,please try again!!');
WHEN OTHERS THEN
dbms_output.put_line('Exception');
/*Closing the cursor_lowSal*/
CLOSE cursor_lowSal;
/*Closing the cursor_midSal*/
CLOSE cursor_midSal;
/*Closing the cursor_highSal*/
CLOSE cursor_highSal;
END;
/*Function funcLow_sal*/
CREATE OR REPLACE FUNCTION funcLow_sal RETURN VARCHAR2 AS
BEGIN
return 'Employees with salary less than 80000'
END;
/*Function funcMid_sal*/
CREATE OR REPLACE FUNCTION funcMid_sal RETURN VARCHAR2 AS
BEGIN
return 'Employees with salary within 80000 and 500000'
END;
/*Function funcHigh_sal*/
CREATE OR REPLACE FUNCTION funcHigh_sal RETURN VARCHAR2 AS
BEGIN
return 'Employees with salary more than 500000'
END;
/*Executing the Procedure*/
SET SERVEROUTPUT ON
EXECUTE EMP_PROC;
Cheers...(')
Edited by: user10553245 on Nov 7, 2008 3:49 AMThe current version of code is given below.The 2 compliation errors i mentioned above are coming in the very First line of the procedure..the whole is highlited in red..
::Error(1): PL/SQL: Compilation unit analysis terminated
::Error(2,1): PLS-00410: duplicate fields in RECORD,TABLE or argument list are not permitted
create or replace PROCEDURE EMP_PROC (sal_low IN NUMBER , sal_mid IN NUMBER , sal_high IN NUMBER) AS
/*Declaring variables to be used inside the Procedure*/
sal_low NUMBER(10,2) := 80000;
sal_mid NUMBER(10,2) := 300000;
sal_high NUMBER(10,2) := 500000;
s_low VARCHAR2(25);
s_mid VARCHAR2(25);
s_high VARCHAR2(25);
sal_range VARCHAR2(20);
/*Declaring User Defined Exception*/
usr_excp EXCEPTION;
/*Cursor for retrieving Low Salary Employees */
CURSOR cursor_lowSal IS
SELECT Emp_Name ,Emp_ID ,Dept_ID ,Dept_Name
FROM EMP_INFO,DEPT_INFO
WHERE Salary <= 80000;
/*Cursor for retrieving Mid Salary Employees */
CURSOR cursor_midSal IS
SELECT Emp_Name ,Emp_ID ,Dept_ID ,Dept_Name
FROM EMP_INFO,DEPT_INFO
WHERE Salary > 80000 OR Salary < 500000;
/*Cursor for retrieving High Salary Employees */
CURSOR cursor_highSal IS
SELECT Emp_Name ,Emp_ID ,Dept_ID ,Dept_Name
FROM EMP_INFO,DEPT_INFO
WHERE Salary > 500000;
/*Declaring variables that will hold values*/
e_name EMP_INFO.Emp_Name%TYPE;
e_id EMP_INFO.Emp_ID%TYPE;
d_name DEPT_INFO.Dept_Name%TYPE;
d_id EMP_INFO.Dept_ID%TYPE;
BEGIN
/*Enter the Salary range*/
sal_range := '&sal_range';
/*Checking for Salary Range*/
IF sal_range = sal_low THEN
OPEN cursor_lowSal;
FETCH cursor_lowSal INTO e_name ,e_id ,d_name ,d_id;
/*Calling Function Low_Sal*/
s_low := funcLow_sal();
/*Displaying Output*/
dbms_output.put_line(s_low||'::'||e_name||','||e_id||','||d_name||','||d_id);
ELSIF sal_range = mid_sal THEN
OPEN cursor_midSal;
FETCH cursor_lowSal INTO e_name ,e_id ,d_name ,d_id;
/*Calling Function Mid_Sal*/
s_mid := funcMid_sal();
dbms_output.put_line(s_mid||'::'||e_name||','||e_id||','||d_name||','||d_id);
ELSIF sal_range = sal_high THEN
OPEN cursor_highSal;
FETCH cursor_lowSal INTO e_name ,e_id ,d_name ,d_id;
/*Calling Function High_Sal*/
s_high := funcHigh_sal();
dbms_output.put_line(s_high||'::'||e_name||','||e_id||','||d_name||','||d_id);
ELSE
/*Calling user defined Exception*/
RAISE usr_excp;
END IF;
EXCEPTION
WHEN usr_excp THEN
dbms_output.put_line('Not in range,please try again!!');
/*Closing the cursor_lowSal*/
CLOSE cursor_lowSal;
/*Closing the cursor_midSal*/
CLOSE cursor_midSal;
/*Closing the cursor_highSal*/
CLOSE cursor_highSal;
END EMP_PROC;
The 3 functions are just being used to display messages...
/*Function funcLow_sal*/
CREATE OR REPLACE FUNCTION funcLow_sal RETURN VARCHAR2 AS
BEGIN
return 'Employees with salary less than 80000'
END;
/*Function funcMid_sal*/
CREATE OR REPLACE FUNCTION funcMid_sal RETURN VARCHAR2 AS
BEGIN
return 'Employees with salary within 80000 and 500000'
END;
/*Function funcHigh_sal*/
CREATE OR REPLACE FUNCTION funcHigh_sal RETURN VARCHAR2 AS
BEGIN
return 'Employees with salary more than 500000'
END;
/
Maybe you are looking for
-
PowerBook G4 can't see external hard drive
All of a sudden, my PowerBook G4 can no longer see my external hard drive (Maxtor 160 GB drive). The drive doesn't appear in the Finder, and it doesn't mount on the desktop. Thus, I have no way of accessing the files on my external hard drive. I can
-
Dynamic class loading in Applets
Fully loaded applet in some browser, depending upon some user action, has to perform following things : (1) has to establish an network connection with some other system or server( other than Web Browser Server ) and get named( file name is known to
-
Migration using Data Pump confusion :(
Hi, I have task to migrate a database from Windows x64 to Linux x64. From 10.2.0.4 to 11.2.0.4. Please correct my scenario: 1. Install and configure binaries on new Linux host 2. Create a empty database on Linux host 3. Performe DP Export from old Wi
-
EJBUtils.cloneObject(...) takes long time when calling EJB's
hi, using OC4J 10.1.3 in windows XP. I have a servlet that calls a local stateless EJB (UserManagerBean) (2.1 version) and the EJB calls a second local stateless EJB (UserPersistorBean). The last one does a JDBC query and the result is returned to th
-
Reset Photoshop elements that came with my computer
Photoshop Elements 11 and Premiere Elements 11 came preinstalled on my new computer. I would like to restore them to their original condition.