Help send query in HTML
So I have the below sql job that is send me the information but in a non readable format. I would like to make this an HTML email. Can you please help me.
I have try to reproduce http://www.wikihow.com/Send-a-Scheduled-HTML-Report-Directly-from-SQL-Server, but keep getting errors.
declare @query nvarchar(max)
set @query=
'use fascinhq select * from store where ID not in (
Select distinct ws.StoreID from worksheet as w
JOIN worksheetstore ws on w.id = ws.worksheetid
WHERE w.style = ''401'' and w.fromdate >= dateadd(hh, -6, GETDATE())
and w.Status in (3,4,7) )
and ID <> 4 '
EXEC msdb.dbo.sp_send_dbmail
@profile_name= 'MyMailProfile',
@recipients= '(My Email)',
@subject='RMSGP',
@query= @query
Thank you for the Help.
Brian
Yes you can, its very easy, just add (For XML Auto) :
set @query=
'use fascinhq select * from store where ID not in (
Select distinct ws.StoreID from worksheet as w
JOIN worksheetstore ws on w.id = ws.worksheetid
WHERE w.style = ''401'' and w.fromdate >= dateadd(hh, -6, GETDATE())
and w.Status in (3,4,7) )
and ID <> 4 '
For XML Auto
EXEC msdb.dbo.sp_send_dbmail
@profile_name= 'MyMailProfile',
@recipients= '(My Email)',
@subject='RMSGP',
@query= @query
Similar Messages
-
Need help sending variables from HTML to SWF...
I have a header with tab buttons--- When you are on a certain
page the coorisponding tab is a different color(as a locator).
Right now I have like, 7 or 8 different headers that are the
same thing minus the colored tab of the current page.
Is there a way to code the flash so that I only need one
header, but still keep the off-colored buttons when on the
coorisponding page?
Apparently, from what I have gathered I need to Send a
variable to the SWF from the embedding HTML using FlashVars or
SWFObjects' 'addVariable' method etc so the SWF knows which
tab/color to use.
But, I have no ideal where to start...uugggggg.
Any Suggestions????
I really, really need to figure this out.
Thanks in advance,
hutchthe easiest way to pass vars to the flash is by appending
them to the url of the flash:
e.g your swiff is called "mymovie.swf" and you want a
parameter "color" to be available on the _root level of your movie,
so all you have to do is embed the flash with the following url
into your html page:
"mymovie.swf?color=black"
now back in flash you can get the value of "color" like this:
in _root timeline:
color
in any other timeline:
_root.color
the value will be filled once the movie is called from within
the HTML as explained above -
Information Broadcasting ( sending query in ( HTML format) )
Hi Experts,
I am trying to broadcast one query through Bex Broadcaster in Query Designer.
While doing so it asked for e**l address and for testing purpose i gave my e*il address only.
But I haven't got any mail yet.
I checked in SU01 my m**l id is updated there.
I checked all authorisations its there in PFCG.
While scheduling it was showing CET time format ( 3.5 hrs before us).
So I gave time according to that format only.
Please guide me If I am missing anything.
Quick reply is much appreciable.
Thanks,
Uday.Hi Murali,
I checked in the error log it is giving following error :-
An error occurred in program CL_SMTP_RESPONSE
Error text: ESMTP error code is not known.
Additional information:
554
554 Mail from ************@wipro.com rejected for
If you have any solution please reply to me.
Is there anything to be done in function module SO_OBJECT_SEND..
Thanks,
Uday. -
Sending Query to query template
Hi,
is it possible to send query from Html page to query template. for example, i create query template as IDBC server and in fixed query mode without giving any query. just blank. in page generator i mapped with iCommand. Now i want to send query from javascript by using getQueryObject. how to send it?
-senthilSenthil,
As John indicated, using the built-in query parameter [Param.x] allows you to be very dynamic in your approach, but document.APPLET.getQueryObject().setQuery('SELECT....'); would be the same thing if you just wanted to pass in the whole fixed query statement.
I may be getting ahead of things, but I can't help but think you are heading down a bad development path by burying all of your queries in the client side script. You can use iCommand applets as recordset objects, but they will always be client sided, not server sided like ado recordsets in asp. I've seen far too many system integrator botched applications where the the body onload was used to trigger javascript that attempts to force queries into applets when they have not been initialized by the JRE. By nature Query Templates themselves can be filled with [Param.x]'s but trying to develop large amounts of application content where the select statements are assembled in client side javascript can lead to all sorts of supportability issues for the customer. Imagine a customer going to training, and understanding the basics of query templates, and then trying to reverse engineer your page with one query template called "SQLGeneric" and all of the logic buried in javascript. He/she opens the template and all they find is a FixedQuery with [Param.1] - can you envision their confusion? Then they look at the 1000 - 2000 lines of javascript that I've seen at times?
Can you provide the business case as to why you would not create a simpler query template minded approach, or would want to construct the queries this way?
Regards,
Jeremy -
Sending query result as html email
hi,
I have requirement to send query result as html emial to user, is there a possibility to send it?
database is 11.2.3
thanks,
7ZGoogle is your friend
http://oracle-base.com/articles/misc/email-from-oracle-plsql.php
https://www.google.nl/search?q=send+email+oracle+database+11g -
Email bursting send report as HTML in email body
Hello,
I have Oracle BI Publisher 10.1.3.4.1 (build# 1101) version installed as part of Oracle Business Inteligence.
I have question about email bursting. I created simple report and I am bursting it via email. But I would like to send report in HTML as part of email body and not as attachment. I read that it is possible in other versions of BIP (as part of EBS) with using of bursting configuration file. But I can not use this file with my version of BIP, I can configure bursting only vie SQL query.
Is there any solution?
Thank youMy bursting SQL query:
SELECT DISTINCT
ip.APPL_ID KEY,
'11F_Search_Prospect_Email' TEMPLATE,
'RTF' template_format,
'en-US' locale,
'HTML' output_format,
'EMAIL' DEL_CHANNEL,
ip.email PARAMETER1,
'[email protected]' PARAMETER3,
'Welcome' PARAMETER4,
'true' PARAMETER6
FROM ugrad.inquiry_prospect ip,
ugrad.correspondence f,
ugrad.address e,
ugrad.f_lookup fl
WHERE ip.appl_id = f.appl_id
AND ip.APPL_ID = e.APPL_ID
AND fl.TYPE_CODE='C'
AND ip.record_stage = 'Prospect'
AND e.COUNTRY_CODE=fl.code
AND e.table_name = 'INQUIRY_PROSPECT'
AND e.address_type =
NVL ((SELECT gg.address_type
FROM ugradadm.address gg
WHERE gg.address_type =
DECODE (f.mailpref,
'Home', 'HOME',
'Best', 'LOCAL',
'HOME'
AND gg.table_name = 'INQUIRY_PROSPECT'
AND gg.APPL_ID = ip.appl_id
AND((gg.address_type='LOCAL' AND NVL(gg.address_expir_date,sysdate)>sysdate)
OR gg.address_type='HOME')),
'HOME'
AND f.batchid = :Batch_ID
This report when bursted sends an email with the layout template as html body.
The EMAIL configuration is set with a server Port number and its host address. -
Error occurred while sending query result: 'java.lang.NullPointerException'
I am doing end to end scenario from SQL server to File
JDBC --XI -- File
I am getting the following Error while monitoring the sender CC in RWB
"Error occurred while sending query result: 'java.lang.NullPointerException'
Please Help !!Hi,
To see the Adapter Error log, try:
http://<XiServerHostName>:<J2EE-Port>/MessagingSystem
Try viewing the Audit Log for each message (Newspaper Icon)
Regards,
Amitabha -
Send message in HTML format from Service Desk
Dear All,
I have configure Service Desk in Solution Manager 7 EHP1 (ABAP+JAVA Stack).
I am able to send the message to end user in case of change status from "New" to "In process" in PDF or TEXT format.
I want to send same in HTML with link just like SAP Support message we are getting in our inbox.
How to do that?
Thanks in advance,
NiravHello Nirav,
Its not that easy, take a look a this excellent blog /people/riccardo.escher/blog/2009/10/09/pep-up-your-charm--part-3-turn-cinderella-pdf-mails-into-prettyusefull-ones
Hope that helps,
Federico -
Send Email in HTML Format with Javamail.
GOD BE BLESSED!
Hello dudes,
i create a jsp page let me send emails from a database using the API Javamail.
But these emails when i send then, goes in text format only, and i want to send emails in HTML format too. Anyone can help me?
I think the Javamail API can send in HTML format.
thanks and sorry, my english is basic but i think you understand. ;)
Adler MedradoI was trying to do the same thing...I found this on the java.sun.com website somewhere. Hope it works out for you.
try {
String host = "";
String from = "";
String to = "";
String fileAttachment = fileName;
// Get system properties
Properties props = new Properties();
// Setup mail server
props.put("mail.smtp.host", host);
// Get session
Session session1 =
Session.getInstance(props, null);
// Define message
MimeMessage message =
new MimeMessage(session1);
message.setFrom(
new InternetAddress(from));
message.addRecipient(
Message.RecipientType.TO,
new InternetAddress(to));
message.setSubject("");
// create the message part
MimeBodyPart messageBodyPart =
new MimeBodyPart();
//fill message
messageBodyPart.setText("");
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
// Part two is attachment
messageBodyPart = new MimeBodyPart();
DataSource source =
new FileDataSource(fileAttachment);
messageBodyPart.setDataHandler(
new DataHandler(source));
messageBodyPart.setFileName(fileAttachment);
multipart.addBodyPart(messageBodyPart);
// Put parts in message
message.setContent(multipart);
// Send the message
Transport.send( message );
}catch (Exception e){
System.err.print("Mailing error:");
System.err.println(e); -
Hi,
I've been trying to create a header using HTML. I was wondering how I can put an SQL query inside HTML codes.
Here are HTML code and SQL Query:
HTML:
<table width="100%" height="135" border="0">
<tr>
<td width="100%" bgcolor="#FFFF33"><span class="style9"><br></span><span class="style9"></span></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFCC"><span class="style6"><br>
FOCUS LIST <span class="style8">FUND FACT SHEET</span></span><br>
<span class="style7">THIS IS WHERE THE SQL QUERY WILL RETURN <br>
<br>
</span></td>
</tr>
</table>
SQL Query:
select "MFR_STRATEGY_INFORMATION"."SI_NAME" as "SI_NAME"
from "MFR_STRATEGY_INFORMATION" "MFR_STRATEGY_INFORMATION",
"MFR_POOL_MONEY" "MFR_POOL_MONEY",
"MFR_MSTAR_FEED" "MFR_MSTAR_FEED"
where "MFR_MSTAR_FEED"."MSF_FUNDID"="MFR_POOL_MONEY"."F_MSF_FUNDID_FK"
and "MFR_STRATEGY_INFORMATION"."SI_SYS_ID"="MFR_POOL_MONEY"."F_SI_SYS_ID_FK"
and "MFR_MSTAR_FEED"."MSF_SECID" =:P55_SECIDHello,
Create a hidden item and specify as source your select statement so the item contains the value you want.
In your html region you specify the item like &P1_ITEM. and you should see the value.
Regards,
Dimitri
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/
http://www.apexblogs.info/
REWARDS: Please remember to mark helpful or correct posts on the forum -
Passing Multiple Single Values from Sender Query to Receiver Query in RRI
Dear All.
We have 2 - Bex Reports ZBEX_1 & ZBEX_2
1. In ZBEX_1 having the fileds data like the below.
Account Doc. Number - Clearing Document --- Amount
12345 - 65432 --- 100
12346 - 54321 --- 50
2. In ZBEX_2 having the following data.
Account Doc.Number -- Amount
45342 - 10
66666 - 100
65432 - 10
54321 - 5
3. I am Traying to create RRI Between ZBEX_1 & ZBEX_2 , with Sender query as ZBEX_1 and Receiver query as ZBEX_2
If I drilldown from ZBEX_1 need to show the following output in the ZBEX_2
Account Doc. Number - Amount
65432 - 10
54321 - 5
i.e If Clearing Documnet in the ZBEX_1 is same as Account Doc. Number in ZBEX_2 those Account Doc. Numbers I have to show in the output of ZBEX_2 RRI Report.
Both the records I have to show at a time.
So please suggest me
1. How to pass Multiple Single Values to Next Query using RRI
2. How to Map Clearing Document to Account Doc. Number in RRI.
NOTE: Account Doc. Num length is same as Clearing Document
Please suggest me.
Thanks & Regards,
Kiran ManyamYour scenario of passing values from multiple records in Source does not suit well for RRI Jumps.
In ZBEX_2 query, create a Replacement path variable on Clearing Document. In that Replacement path variable, use the Replacement with query option and choose the ZBEX_1 as the underlying query source.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bd/589b3c494d8e15e10000000a114084/frameset.htm
When you execute ZBEX_2, what ever clearing document values that ZBEX_1 has will be passed through the replacement path variable as a filter to the ZBEX_2
Hope it helps!
Uday Pothireddy -
Error while sending query result
Hi all,
I am working on a JDBC-XI-IDoc scenario. In my sending JDBC adapter configuration, i have given the Query SQL statement as <b>SELECT * FROM SAP_PROMOTION</b> and Update SQL statement as: <b><TEST></b>
But when i go to adapter monitor, i am seeing an error as follws:
<b>Error: Sending query result failed with com.sap.aii.af.service.cpa.impl.exception.CPALookupException: Couldn't retrieve binding for the given channelId: Binding:CID=875514bc047b3557a5b53dfb5ef4babe; - retry
last retry interval started 10:54:09 2006-05-25
length 60,000 secs</b>
Can anybody help me how to solve this problem.
Regards,
DivijaDivija,
Am not sure if this is the exact cause for your problem, but would anyways suggest that you take a look at it,
<i>classes12.zip is not compatible with JDK 1.4.</i>
From the note : <b>831162</b>
Oracle JDBC Driver (classes12.zip / classes12.jar) Deadlocks
<b>Q: I have deployed the Oracle classes12.zip / classes12.jar JDBC driver as per the instructions in the XI Configuration Guide.
Unfortunately, I frequently notice hanging database connections. A thread dump taken according to the instructions in note 710154 shows one or more blocking JDBC Sender/Reciver threads and optionally that the JVM has detected a deadlock.
A: The Oracle classes12.zip / classes12.jar driver is compatible with Java 1.2 and Java 1.3 only, but not with Java 1.4. Please upgrade to a current driver (ojdbc14.jar), which does support the Java 1.4 JVM you are using.
Please make sure that you remove classes12.zip / classes12.jar from aii_af_jmsproviderlib.sda prior to adding the new driver as per the instructions in the answer to question #1 above as you will get a class name collision otherwise (all JARs from aii_af_jmsproviderlib.sda are loaded into the same class loader and the driver class name of both driver versions is the same).
Before deploying the updated driver, ensure that the new version is still compatible with your Oracle database server release. For details, please refer to the release notes provided by Oracle.</b>
Regards,
Bhavesh -
Send query's result via SMS (BW3.0b)
Hi
we need to send query's results via sms.
We're going to use reporting agent (we configured an exception in bex and created a follow up action).
Now I can only send a SAP office message.
In order to send a sms, could you help me to understand which are the necessary configuration?
It is enough configure adequately users?? Is any configuration on the system needed?
Is any additional component needed? we're working on a BW 3.0B release.
Thanks in advance for your cooperation.
Regards,
Stefania IandoloHi dear,
look here to have more info about BEx Mobile Intelligence:
http://help.sap.com/saphelp_bw30b/helpdata/en/f1/50583cf7388362e10000000a114084/frameset.htm
Hope it helps!
Bye,
Roberto -
Sending query to third party portal from TREX Search Engine
HI Experts,
we need to implement normal search option in SAP portal.
when we search any thing from portal ,
It has to search in EP & KM and also it has to search
windows sharepoint portal and bring the data back to SAP Portal.
For this purpose one solution is
1) implementing enterpise search,
but my client dont want to go for enterprise search(federated search).
2) The other way
Sending query to third party portal from TREX Search Engine
In this way what i want is ,
how TREX can send query to third party portal SEARCH ENGINE
(in my case share point portal search ENGINE).
There is no problem to search in EP & KM becuse it is default.
To search in Micro soft Share point portal,
TREX should pass the query to share point portal search ENGINE.
Is there any API TO send a query to third party portal like sharepoint?
I searched in SDN and Other sites also but i am not getting exactly what I require.
If any one has ideas or implemented already please guide me.
My client require searching option like this,
we need to provide drop down box in SAP Portal with 3 options like
1) search in Share point portal
2) search in SAP EP & KM
3) Search in both the portals
please provide any code samples in case if you have.
please help me , its urgent
Thanks in advance.
Regards
BalaHi Bala,
please check the information on the KM IMS (Index Management Service) in KMC's developer guide. A connection to a 3rd party search is done from KM, then calling TREX and XY in parallel, not serially from TREX.
Here's a paper describing this for an older KM release:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5e514b57-0701-0010-3796-deb3636835fa
Regards, Karsten -
Regarding Sender query and receiver query
Hi Masters
I have one sender query and receiver query. Both queries contain G/L account.
First I got sender query report, in this report I drill down one free charactteristics field to get correponding field sales document in receiver report.
Is it mandatory which field i drill down in sender report should be in receiver report?
Could you please help ?
Thanks in Advance
Raja.SI would rewrite the first one to:
Select t.id_entity,t.id_trade_ref,p.am_stock
from trade t,posting p
where t.id_trade_ref = '5V973781B'
and p.id_trade_ref = t.id_trade_ref
This way, you really make the join between the table.
I think the join is better because it uses less code. I do not think you will notice much performance win between one or the other, especially because it concerns only a few rows.
Maybe you are looking for
-
Getting a blank white index page in browser
I have been working the tutorial on Creating your First Web Site by David Powers (Dreamwiver CC) that has worked flawless up to the end, where I tried adding the scripting code for older IE browsers. I downloaded the JS file aFarkas-html5shiv-67bff28
-
I cant view my photos aperture 2
Please help Im in a pickle, Because of various problems with Kernal Panic which Apple are dealing with currently. I deleated my Aperture 2 vault by mistake. I had backed up the files to a seperate Hard drive but when i open Aperture 2 it shows me the
-
I just installed iOS7 on my new iPhone 4. Huge typing lag problem now. Any fixes out there? How do I uninstall this update. The phone worked better without it. Don't even like the new layout and icon design. Apple, please fix this now!!!
-
Thermal issues with PowerMac G5 Dual 2.0 Processor
I've been having issues with my fans running super loud for no apparent reason. I have been told that my thermal meter for one of my processors has gone bad and that I have to replace both my processors at a cost of over $800! I am simply wondering i
-
Hello All, I've run into a compiling error that has me stumped. I'm using labview 8.5.1, NRIO 2.4.0, and FPGA 8.5.1 on a CRIO-9014 & 9104. When compiling the code attached I get the following error: Analyzing generic Entity <bushold> in library <work