plsql

Compare a BLOB image to images stored as ORDImage using SQL/MM Still Image

萝らか妹 提交于 2021-01-20 20:29:47
问题 I am using Oracle 11g r2 . I have a table that stores images as ORDImage : PHOTOS (phot_id integer , phot_filename varchar2(256) , phot_source ordsys.ordimage) And another temporary table that stores an image uploaded by a user as BLOB . INSERT_TEMP (itemp_id integer, itemp_source blob) I want to move the BLOB image to the PHOTOS table only if does not already exists, by comparing the two images. I need to use SQL/MM Still Image methods as ORDImageSignature methods are deprecated in Oracle

Compare a BLOB image to images stored as ORDImage using SQL/MM Still Image

回眸只為那壹抹淺笑 提交于 2021-01-20 20:27:09
问题 I am using Oracle 11g r2 . I have a table that stores images as ORDImage : PHOTOS (phot_id integer , phot_filename varchar2(256) , phot_source ordsys.ordimage) And another temporary table that stores an image uploaded by a user as BLOB . INSERT_TEMP (itemp_id integer, itemp_source blob) I want to move the BLOB image to the PHOTOS table only if does not already exists, by comparing the two images. I need to use SQL/MM Still Image methods as ORDImageSignature methods are deprecated in Oracle

Debugging PLSQL in Toad

随声附和 提交于 2021-01-20 20:13:40
问题 I've been creating packages for Oracle db using PL/SQL and i'm trying to find a good way to debug a PL/SQL package without using the "put_line" command, does anyone have some good tips on how to successfully debug a PL/SQL package either on Toad or SQLPlus? 回答1: Depending on the version of TOAD, the icons and toolbars will look different, but the process is the same: Make sure the "Toggle compiling with Debug" option is turned on Click "Compile" button a. Set a breakpoint Click "Execute PLSQL

Debugging PLSQL in Toad

牧云@^-^@ 提交于 2021-01-20 20:13:07
问题 I've been creating packages for Oracle db using PL/SQL and i'm trying to find a good way to debug a PL/SQL package without using the "put_line" command, does anyone have some good tips on how to successfully debug a PL/SQL package either on Toad or SQLPlus? 回答1: Depending on the version of TOAD, the icons and toolbars will look different, but the process is the same: Make sure the "Toggle compiling with Debug" option is turned on Click "Compile" button a. Set a breakpoint Click "Execute PLSQL

Cumulative Calculation - Based on Sample Data

梦想与她 提交于 2021-01-20 12:43:54
问题 Hi I am providing Sample Data below: Based on Sample data I want result output as per screenshot .. create table mytable ( emp_name varchar2(50) ,dept_number number ,Salary number ,Calendar_Year number ,Calendar_Period number ); insert into mytable values ('Bob',6620,6500,2020,1); insert into mytable values ('Bob',6620,1500,2020,1); insert into mytable values ('Rachel',6620,3400,2020,1); insert into mytable values ('Nancy',6620,1400,2020,1); insert into mytable values ('Rachel',6620,4500,2020

Cumulative Calculation - Based on Sample Data

谁说我不能喝 提交于 2021-01-20 12:41:28
问题 Hi I am providing Sample Data below: Based on Sample data I want result output as per screenshot .. create table mytable ( emp_name varchar2(50) ,dept_number number ,Salary number ,Calendar_Year number ,Calendar_Period number ); insert into mytable values ('Bob',6620,6500,2020,1); insert into mytable values ('Bob',6620,1500,2020,1); insert into mytable values ('Rachel',6620,3400,2020,1); insert into mytable values ('Nancy',6620,1400,2020,1); insert into mytable values ('Rachel',6620,4500,2020

Trigger to display message using PL/SQL

走远了吗. 提交于 2021-01-07 04:13:30
问题 I want to create a trigger to display the message “NEW EMPLOYEE DETAILS INSERTED”, whenever a new record is inserted into Employee table, and have this code for it- set serveroutput on; create or replace trigger display_message after insert or update on employee for each row when(new.emp_id>0) begin dbms_output.put_line('new employee details inserted'); end; But this isn't giving me any output. Please help, thanks in advance! 回答1: It won't work only if EMP_ID isn't larger than 0 . Is it? In

Trigger to display message using PL/SQL

孤街浪徒 提交于 2021-01-07 04:12:33
问题 I want to create a trigger to display the message “NEW EMPLOYEE DETAILS INSERTED”, whenever a new record is inserted into Employee table, and have this code for it- set serveroutput on; create or replace trigger display_message after insert or update on employee for each row when(new.emp_id>0) begin dbms_output.put_line('new employee details inserted'); end; But this isn't giving me any output. Please help, thanks in advance! 回答1: It won't work only if EMP_ID isn't larger than 0 . Is it? In

retrieve multible columns group by date intervall

无人久伴 提交于 2021-01-07 02:43:29
问题 I want to retrieve multible columns, sum of weight data from a table over a whole month. what I need help with is that I want to group the result into 2 parts sum of 1-15 of the month and second line 16-31 of the month. Select TO_CHAR(sysdate) dummy (SELECT(SUM(B.SCALE_WEIGHT) FROM TRACKING.DATALOG_TAB B WHERE B.MATERIALID= 1 AND B.SCALE_EVENTDATE BETWEEN TO_DATE(TRUNC(TO_DATE('2020-10-1', 'YYYY-MM- DD'),'MONTH')) AND TO_DATE(TRUNC(TO_DATE('2020-11-1', 'YYYY-MM-DD'), 'MONTH')+16)) as MTRL1,

retrieve multible columns group by date intervall

和自甴很熟 提交于 2021-01-07 02:42:25
问题 I want to retrieve multible columns, sum of weight data from a table over a whole month. what I need help with is that I want to group the result into 2 parts sum of 1-15 of the month and second line 16-31 of the month. Select TO_CHAR(sysdate) dummy (SELECT(SUM(B.SCALE_WEIGHT) FROM TRACKING.DATALOG_TAB B WHERE B.MATERIALID= 1 AND B.SCALE_EVENTDATE BETWEEN TO_DATE(TRUNC(TO_DATE('2020-10-1', 'YYYY-MM- DD'),'MONTH')) AND TO_DATE(TRUNC(TO_DATE('2020-11-1', 'YYYY-MM-DD'), 'MONTH')+16)) as MTRL1,