In some legacy Delphi code that I need to port to C#, I have come across what seems to me to be quite a bizarr[e,o] “SQL Statement.”
The TQuery component in question has a SQL property of:
Begin
MAILUTIL.SEND_MAILTXT@LEOPARD('rr@crk.com', :SUB , :TEXT, 'rr@crk.com');
MAILUTIL.SEND_MAILTXT@LEOPARD('ba@rdlands.gov', :SUB , :TEXT, 'ba@rdlands.gov');
End;
Normally, the SQL property is such a string as:
Select * from Bakery where Item = 'Pie'
..so this has thrown me for the proverbial loop. Is this an “Oracle thing” or what?
yes, oracle is able to send emails in pl/sql, but i think that is a bad practice. try to move it to whatever programming language is used outside the rdbms using that “query” or call an external script file in that situation.
reason: if the mail process fails for any reason it may rollback a whole transaction and there are other downsides, too.