How To Generate Email Based Trigger

May 9, 2011

I have a table in some db called retailer. I want to generate an email based trigger. What i want to achieve is as follows

I want to generate an email based trigger. What i want to do is that i should store the current retailer id which is until this point and then on each further insertions in retailer id i want that some trigger or script is running in background which is storing the retailer id. When the retailer id advances by 45 then a trigger should be generated saying that retailer id has advanced to 45 numbers from this date.

View 1 Replies


ADVERTISEMENT

SQL & PL/SQL :: How To Generate Email On Database Event

May 15, 2011

I've heard about diferent ways of generating email in response to a database event e.g

1 - Using UTL_MAIL package.
OR
2 - Event Driven Reporting feature of 10g Database and using SRW.Run_Report package to generate and mail a report.

Now I'm confused that how should I accomplish the following tasks:

(i) - How to generate an email after Insert/Update/Delete on a table and acknowledge the concerned users about that event?
(ii)- How to attach a text file with that email?

View 8 Replies View Related

Reports & Discoverer :: How To Generate Report And Send Straight To Email

Apr 11, 2013

How to generate a report and straight send it to an Email? I want to match student reg number and the parents email provided .

View 1 Replies View Related

SQL & PL/SQL :: Generate Auto Email To Concerned User Like A Schedule Date?

Feb 26, 2011

I am maintaining vehicles information of our company in our equipment master table and there is one field where I am storing one date ( Vehicle inspection due date) based on this date I want to generate auto email to concerned user like a schedule date is due and he needs to prepare his car for inspection .

This schedule will run on everyday basis and it will generate the email to concerned persons two days before. how I can setup this in oracle using Scheduler.

View 9 Replies View Related

SQL & PL/SQL :: Generate The Number Of Rows Based On Table Field?

Mar 29, 2013

generate the number of rows based on table field.

Sample code is given below.

CREATE TABLE T
(
docno VARCHAR2(10),
CODE VARCHAR2(8),
QTY NUMBER(3)
)
LOGGING

View 4 Replies View Related

SQL & PL/SQL :: Generate Range Based On Start And End Number Dynamically?

Jul 14, 2011

I have following requirement. Let say i have to generate a range based on "start number" and "end number" dynamically.Some kind of hash buckets.

e.g Start Number : 1 and End Number : 1001.

Also i want to divide that range based on some dynamic value like for above example 10 ranges of 100 each. and both 1 and 1001 should be included only once and the next row start number cannot be same as previous row end number.

Means

Range 1 1 -101
Range 2 102-200
Range 3 201-300
...
Range 10 901-1001

Is there any way of doing it automatically. I tried with Model clause. it works fine for even cases but for odd i have issues also when i take small start and end number i get an error.

SELECT case when ranges=1 then ranges else ranges+1 end Start_Id, ranges+round((1001-1)/10) End_Id
from
(

[Code].....

I want this to be generic for any values here 1 is Start Number 1001 is end number and 10 is the bucket. I need these parameters dynamic and want's the same kind of results for any values.

View 22 Replies View Related

SQL & PL/SQL :: Generate Hourly Based Number Of Orders Placed Report

Oct 11, 2011

I have a table called 'orders' and having date and time of order placed in the field timeplaced. I need to generate a report which is having hourly based number of orders placed . If no order is placed in an hour then it should show 0 for that hour in the result .

create table orders (order_id integer, timeplaced date,last_updated date);
Insert into ORDERS
(ORDER_ID,
TIMEPLACED, LAST_UPDATED)
Values
(1, TO_DATE('10/11/2011 12:53:39', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('10/11/2011 10:53:39', 'MM/DD/YYYY HH24:MI:SS'));
[code]........

But I need the result for all the 24 hours. Actually row for the hour 1,2,3,4,5,6,8,9,13-23 are not present in the DB

TO_CHAR(TIMEPLACED,'HH')COUNT(*)

00
10
20
30
40
50
60
71
80
90
102
111
122
130
140
150
160
170
180
190
200
210
220
230

View 3 Replies View Related

SQL & PL/SQL :: INSERT Trigger Will Generate Sequence ID From AA001 To AA999 Value

Feb 25, 2013

I am using Oracle 10G version. I need a code base for new Sequence Trigger.

Requirement : As per the request, before INSERT trigger will generate the sequence ID from AA001 to AA999 value. But once the sequence is reached to AA999, the next sequence value will be generated normal (start from AB001 etc..).

View 6 Replies View Related

Forms :: Trigger That System Generate Position Against Total Marks?

Aug 26, 2011

i have one project about school system.there is one column of total marks.and other one is position column.i want a trigger that system genrate the position against total marks. problem is this when total marks become equal for example 101 and 101 than position also same.but dont now what a trigger i write for this.here some example

if total marks 100 than position is 1stand if total marks 99 than position is 2ndbut third person is also same number in total marks column i mean 99 than in position column must write the 2nd

View 4 Replies View Related

PL/SQL :: How To Enter Value Based On Condition In Column Without Using Trigger

Feb 5, 2013

while replicating form mssql 2005 it is entering space for null in oracle clob col.so i wanted to know.

1)can check constaint modify the content of column on which it is defined?

like i want to enter null in a column , if entered date is greater than current date else the entered date.i do not want to use triggers or client side script.

View 1 Replies View Related

SQL & PL/SQL :: Trigger To Update Table1 Based On Condition Of Values In Table2

Feb 20, 2012

I have two tables as

Table LEAVE
Column Type Null Description
APP_NO Number(6,0) Not Null PK Leave Application Number
ECN Number(6,0) Not Null FK Employee Code Number
APP_Date Date Not Null Date of Application
From_Date Date Not Null Date from which the leave starts
TO_Date Date Not Null Date upto which the current application leave remains i.e. end of leave applied for date
NO_OF_Days Number(2,0) Not Null Difference between TO_Date and From_date
LEAVE_TYPE VARCHAR2(3) Not Null Can be one of SL, CL, LWP or LTA
Status VARCHAR2(25) Not Null Can be one of Saved, Rejected or Approved
Remark VARCHAR2(100) Nullable Reason to be put if status is rejected
[code]....

What I really want to do is that when a record is inserted in the LEAVES table (an application for leave is submitted by any employee and if it is approved) then I want to update the _USED values of the corresponding LEAVE_TYPE in the LEAVEENTITLE table which holds values of types of leaves entitled to employee.

For example if 3 rows are inserted in the LEAVES table as
INSERT INTO LEAVES (APP_NO,ECN,FROM_DATE,TO_DATE,APP_DATE,NO_OF_DAYS,LEAVE_TYPE,STATUS,REMARK)
(1,1234,'2012-01-01','2012-01-05','2012- 01-01',5,'SL','APPROVED',null);
INSERT INTO LEAVES (APP_NO,ECN,FROM_DATE,TO_DATE,APP_DATE,NO_OF_DAYS,LEAVE_TYPE,STATUS,REMARK)
(2,1235,'2012-01-01','2012-01-05','2012- 01-01',5,'CL','SAVED',null);
INSERT INTO LEAVES (APP_NO,ECN,FROM_DATE,TO_DATE,APP_DATE,NO_OF_DAYS,LEAVE_TYPE,STATUS,REMARK)
(3,1236,'2012-01-01','2012-01-05','2012- 01-01',5,'LTA','REJECTED','Clash with the annual meet, revise dates');

Then the value of SL_USED in the LEAVEENTITLE table of record corresponding to the ECN = 1234 should be updated with +5 and naturally the SL_ UNUSED value of the record should be updated as SL_ENTITLED - SL_USED. For the APP_NO 2 and 3 none of the values in LEAVEENTITLE should be updated as the STATUS is not 'APPROVED'

I tried with the following trigger, but is compiling with a warning (not showing what the warning is)

CREATE OR REPLACE TRIGGER leaveentitle
AFTER INSERT ON LEAVES
FOR EACH ROW
BEGIN
UPDATE LEAVEENTITLE LVE
SET LVE.SL_USED = SL_USED+(CASE
WHEN :NEW.LEAVE_TYPE = 'SL'&& NEW.STATUS='APPROVED'
THEN :NEW.NO_OF_DAYS
SL_UNUSED=SL_ENTITLED - SL_USED
ELSE 0
END),
[code]....

View 9 Replies View Related

Backup & Recovery :: SCN Based Backup Do RMAN Generate Backup From Archivelogs

Oct 18, 2012

understanding rman scn based Backup Algorithm .. In SCN based backup do rman generate backup from archivelogs ???

View 1 Replies View Related

SQL & PL/SQL :: Trigger Which Changes Content Of One Column Based On Information Within Another Column

Sep 10, 2010

I am trying to create a trigger which changes the content of one column based on the information within another column.

For Example, if the 'ITEMQUANTITY' field drops below 1 then I want the STATUS column to say 'Out Of Stock'.

View 23 Replies View Related

Forms :: Call One Trigger Of Item In Trigger Of Form?

Jul 1, 2011

How can "call one trigger of item in trigger of form"

View 5 Replies View Related

SQL & PL/SQL :: How To Get Email Address From Xml

Dec 27, 2011

I want to know how can I find/take from In parameter who is xmltype an email address ?

My function: (clob is cast to xmltype)

function submit(session_id in number, claim in clob) return xmltype

For example - I have more e-mail addresses in this:

<emails>
wtfn00b1@yahoo.com
wtfn00b2@inbox.com
wtfn00b3@mail.com
...
</emails>

I know that there is `extract` function for xml. How can I know if there is break or space between the emails ?

View 9 Replies View Related

How To Setup Email In 11g

Aug 1, 2012

I migrated a server + data + APEX application from 10g to 11g. Now my email sending is all messed up because of the ACL in 11g. I can't seem to figure out how to appease it. I have the smtp server correctly set in the parameters. Here is the procedure I'm trying to use (from [URL]):

CREATE OR REPLACE PROCEDURE send_email(
  pFromUser IN VARCHAR2,
  pToUser IN VARCHAR2,
  pSubject IN VARCHAR2 DEFAULT NULL,
  pBody IN VARCHAR2 DEFAULT NULL)

[code]....

View 8 Replies View Related

Getting Name In Email Address (Oracle SQL Plus)

Nov 6, 2007

How do I select the name in an email address. I would like to be able to order a list of email addresses by the name of the person ie. what comes before the @ sign.

So is there a query I could use to get everything before the at line . So in pseudocode I would need to be able to do something like this.

select substr(email, indexOf(@)+1,email.length) from table order by email

So I how could I go about doing that?

View 2 Replies View Related

SQL & PL/SQL :: Send Email In Oracle?

Apr 24, 2013

what is the best way to send an email in oracle?

1.utl_smtp
2.utl_mail
3.utl_tcp

View 6 Replies View Related

SQL & PL/SQL :: Dbms_scehduler Email Notification

Sep 13, 2012

I have set up my dbms_scheduler schedule and all run fine. I have set up the smtp server for outgoing email and it all looks good just like multiple of our other boxes here.The problem is that the event (SUCCESS) for a job is raised yet the email notification is not sent. My question is this: Is there somewhere where the actual log of email notifications sent (and/or failure there-of) is actually kept?

View 6 Replies View Related

SQL & PL/SQL :: Email With Excel Attachment

Aug 4, 2011

I need the pl/sql procedure that sends email with excel attachment using utl_smtp.The email procedure should take the excel attachment file from my local directory.

View 6 Replies View Related

SQL & PL/SQL :: How To Send Email With Attachment

May 4, 2010

I need to send email with attachment file. The input file is reside in the server. Currently, i can create and send file through the email. But it is not the file that i want from the server, it is actually create the attachment file. How can i get the file from server and put it as attachment? below is the codes :

create or replace
Procedure test_email_mt(p_sender IN VARCHAR2,
p_recipient IN VARCHAR2,
p_message IN VARCHAR2)
as

[code]...

View 5 Replies View Related

SQL & PL/SQL :: Send Email From Procedure

Dec 9, 2010

Need info regarding sending an excel file attachment from plsql.I am using utl_smtp package in procedure and want to attach some sql query results in excel file.Is it possible to use sql query in same stored procedure that i am using to send the email attachment or i need to use external directory path to load the file as attachment.

View 9 Replies View Related

SQL & PL/SQL :: How To Do Attachment Email In Oracle

Jul 24, 2013

Below are my procedure and declaration. I can send email to internal and external with attachment.

But the attachment is blank. i don't know how to add path in the script. like i save 1 pic in d drive. from thr how i must do attachment.

below are the procedure

CREATE OR REPLACE PROCEDURE CUSTOMER.send_mail_2 (p_to IN VARCHAR2,
p_from IN VARCHAR2,
p_subject IN VARCHAR2,
p_text_msg IN VARCHAR2 DEFAULT NULL,
p_attach_name IN VARCHAR2 DEFAULT NULL,
p_attach_mime IN VARCHAR2 DEFAULT NULL,
[code].........

View 2 Replies View Related

Forms :: Send Email Through 6i?

Nov 11, 2011

i want to send email and message on mobile phone through forms 6i.

View 1 Replies View Related

Saving Email In Oracle DB

Aug 23, 2011

if it is possible to save an email send from an ORACLE pl-sql packages in the Oracle database it self? The email is in my case created and send directly using the oracle utl_smtp-package.

I have no problems with attaching doc's and so on in this mail. But i simply cannot find a way to save, the email i'm sending in the Oracle-database. The purpose of saving the email in the DB is that i want to be able to reopen an send email, to se exactly what was send.

View 5 Replies View Related

Forms :: Sending Email Through 6i

Apr 4, 2011

How to send an email through oracle FORMS6i ?

View 1 Replies View Related

SQL & PL/SQL :: Fail While Validating Email ID

Jul 3, 2012

I am creating function for validating email id :

create or replace function f_is_valid_email(p_email in varchar2) return varchar2 is

begin
if REGEXP_LIKE(p_email, '^[a-zA-Z0-9._%-]+@[a-zA-Z0-9._%-]+.{1}[a-zA-Z]$') then
return 'success';
ELSE
RETURN 'Failure' ;
END IF;
end f_is_valid_email;

But this function fail when

i did
SELECT f_is_valid_email('aaa..ss@AA.com') from dual
or
SELECT f_is_valid_email('aaa.ss@AA..com') from dual

View 8 Replies View Related

Script To Email Alert Log

Aug 24, 2013

I have been looking for a script to email me a daily log of my alert log. I have tried mailx -s command,

View 1 Replies View Related

Forms :: Email In Body But Not In Attachment

Jun 19, 2009

I am sending email with attachment (word, pdf) without any problem. Now what i want is, instead of attachment that pdf / word file should come in body part , like means in internet explorer pdf open inside the browser itself while surfing. so means as soon as user open email, content of word / pdf should display in body part. how can i do this. using forms 6i, and database 10g.

View 7 Replies View Related

SQL & PL/SQL :: Send HTML Email From Oracle?

Dec 21, 2009

Am trying to send email from Oracle using utl_smtp.

My issue is regarding Arabic character. I set the charset to windows-1256 and even tried with other different charset like UTF-8.

I used also: utl_smtp.write_raw_data(l_connection,utl_raw.cast_to_raw(dbms_lob.substr(data).

Before i set all these changes to the procedure i was receiving the Arabic text as '??????'

However, after above modifications, the text display changed to something like this : ÇäÇÓààååÑêå

Does the problem still in the DB side or it can be coming from mail server ?

View 24 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved