Skip to main content

Hello Community,

Can We user SQL query in IFS 8 events .I need to show cumulative customer wise sale in the email as SQL query output.If so please guide me with screen shots.

Please Help….!!!

Regards

Deepak Navale

i usually use something like listagg to convert the SQL result set into a single field, which goes into the email body.  Is this what you are looking for, as opposed to an email attachment?


Dear Paul ,

Is it possible to send a SQL query output as email attachment in IFS 8.If so how I can achieve this.

We are using oracle databse 11g.


hi Deepak

I assume the objective is to schedule this output or trigger it using an event, say.

You have to achieve 2 things: creating the file, most likely a .csv file, and then sending it using an email attachment.  Actually both can be done using the data migration tool, or otherwise.

.csv file

This is reasonably straightforward - you can use a migration job of type CREATE_OUTPUT_FILE,  with a defined SQL statement as the source.  It will write a .csv file to a server location.  You’d probably want to give the file a fixed name (so it will overwrite itself each time).

email attachment

I would look into using the command_sys.mail method within a migration job.  One of the attributes is “ATTACH_”, which lets you attach one or many files to the outgoing mail.  The hardest part of what you are trying to do will be to figure out how to get this to pick up the .csv file created above.  

If you can’t find a way to pick up the file from the server location, then you might have to investigate checking the .csv file into document management, and then grabbing it from there.  We have done this kind of thing a few times, most commonly in the case where we want to send a PO to a supplier with an document attachment. 


Reply