Possible To Send Parameter To Excel (via Web) To Pas Along Through To SQL Server?

Sep 14, 2004

Is there anyway to pass a parameter to an Excel spreadsheet (loaded in a browser) to use as a parameter in SQL statement?





I know that the Microsoft Technologies can write Excel files and then load them, but I'm looking to take an existing workbook, parameterize the SQL statement and pass parameters via the Querystring/Form Post to it.





Why you may ask? For existing PivotTables/Charts that can be filtered BEFORE they are run.





Any/all thoughts appreciated.





Bob

View 3 Replies


ADVERTISEMENT

Integration Services :: Send Excel File From SSIS Using Send Mail Task Without Saving Excel File Locally?

Jul 14, 2015

Is there anyway to  send excel file from ssis using send mail task without saving the excel file locally. I need to automate the process which involves loading the excel file from the database and send it to some people. 

View 6 Replies View Related

SQL Server 2008 :: Excel File Name In Send Mail Task Using SSIS

Jun 1, 2015

I have a package which is creating a excel file 'ExcelName.xls' and storing in 'E:ReportingDelivered_Reports'. Now I have to attach this report using send mail task and send it to given mail id. To achieve this I have configured the send mail task and in Expression Builder, I have selected the below expression:

"E:ReportingDelivered_ReportsExcelName_"+
((DT_WSTR,4)Year(@[System::StartTime]))+
RIGHT("0"+((DT_WSTR,2)Month(@[System::StartTime])),2)+
RIGHT("0"+((DT_WSTR,2)Day(@[System::StartTime])),2)+".xls"

I need file name should be 'ExcelName_20150601' where suffix is the current date. But I recieve file which name is 'ExcelName', which is the original file name.

View 7 Replies View Related

How Do I Send RS Parameter To XML Query?

Jan 19, 2007

I Have this web service method:

[WebMethod]

public DataSet EeoReport(DateTime start, DateTime end)

{}

I have this XML query that sends blanks to start and end and properly gets my data.

<Query>
<ElementPath IgnoreNamespaces="True">
EeoReportResponse {}/
EeoReportResult/diffgram{}/
DataSetName {}/TableName {Field1, Field2, Field3, Field4, Field5, Field6, Field7, Field8}
</ElementPath>

<SoapAction>http://services.mydomain.com/EeoReport</SoapAction>
<Method Namespace="http://services.mydomain.com"
Name="EeoReport">
</Method>
</Query>

How do i add RS parameters to this query to represent start and end in the above webmethod...?

View 4 Replies View Related

Send Excel File With SQL Output

Oct 11, 2004

OK, another problem but the same member, i am feeling REALLY thick now!

I have a job set up that extracts data from a table and puts to an Excel sheet, this is then emailed to certain recipients.

why is the data appending in the Excel file rather than overwriting? How can i prevent this?

View 7 Replies View Related

Send Parameter Via QueryString To A StoredProcedure

Apr 19, 2008

 Halloi have a problem to send a parameter via QueryString to my storedProcedure.If i run the procedure in VisualWebDeveloper everything works fine, when i enter the parameter with the DialogBox: 1 ALTER PROCEDURE dbo.StoredProcedure2 2 @appart varchar(50)3 4 AS5 BEGIN6 7 SELECT category FROM immovables WHERE category = @appart 8 END9 /* SET NOCOUNT ON */ 10 RETURNThen i have a simple Page with a link <a href="Test.aspx?objtxt=34" target="_self">send</a> that send the QueryString to the Following Site:   <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Unbenannte Seite" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="StoredProcedure2" SelectCommandType="StoredProcedure" SortParameterName="objtxt"> <SelectParameters> <asp:QueryStringParameter Name="appart" QueryStringField="objtxt" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" AutoGenerateRows="False" DataSourceID="SqlDataSource1"> <Fields> <asp:BoundField DataField="category" HeaderText="category" SortExpression="category" /> </Fields> </asp:DetailsView> </asp:Content> Now, when i run the application, i get the following message, when i fire up the Link:Für die Prozedur oder Funktion StoredProcedure2 wurden zu viele Argumente angegeben.I'm german so i get this message in german, tranlated: to many aguments wher passed to the procedure or funktion StoredProcedure2  I think the problem has thomething to do with the parameter deklaration in the storedProcedure.am I wrong?can somebody help me?Regards from Cologne (Germany) Caspar 

View 5 Replies View Related

SQL Server 2012 :: Can Excel Be Passed As Stored Procedure Parameter

Sep 29, 2015

Currently i am using SQL Server 2012 Import/Export Wizard to upload data to sql tables manually. However i was trying to write a procedure to update that table. and on the time of execution, if i can pass excel. Is there any way to pass excel to stored procedure parameter?

View 1 Replies View Related

SQL Auto Send Email Based On Parameter

May 5, 2008

I would like some help conceptualizing how to acomplish this task. My client has requested the ASP.NET web/SQL Server application send an email to one of our locations based on whether that location complied (via the web app) to each week's report. Here's how the flow would go:
The location checks the webpage weekly and selects their compliance to each record on the report. (They could overlook one of the records and not make a selection.)  The SQL db would then query the compliance table and create a report of those locations with at least one "non-compliance."  Then the Db would send a reminder email to each location on that report. The Db tables have the email address info assigned to each location, so I can join that to the compliance log table.
Can this be done? I am using SQL Server Management Studio Express and Visual Web Developer (VB.net).
Thank you for your ideas,SMc

View 7 Replies View Related

How To Send Query Result As Attachment With EXCEL Format

Feb 17, 2012

i am using sp_send_dbmail to send Emails.how to send query result as an attachment with EXCEL Format.

View 1 Replies View Related

SQL Server 2008 :: 2 Emails Being Send From Job When Only 1 Should Send?

Apr 18, 2012

I have a job that emails out shipment notifications at the end of the day to our customers. The problem I have is I don't understand why the same email is sending out twice within a minute of each other when the job is only scheduled to run once. If I take the code out of the step and run it in management studio it only emails once. I attached the code for one customer for reference. We are running SQL 2008 on a VM sending to an exchange 2010 server.

DECLARE @tableHTML NVARCHAR(MAX) ;
SET @tableHTML =N'<H1>XYZ Company ASN For ' + CONVERT(VARCHAR(10), GETDATE(), 101) + ' </H1>' +
N'<table border="1">' +
N'<tr><th>Vendor</th><th>Delivery Date</th>' +
N'<th>Purchase Order Number</th><th>Item Number</th><th>Item Description</th>' +
N'<th>Quantity Shipped</th><th>UOM</th><th>BOL Number</th>'

[code]....

View 9 Replies View Related

SSIS SEND MAIL TASK EXCEL ATTACHMENT TIME OUT

Mar 3, 2008

HI !

I need help to fix SSIS Send Mail Task Error.
I have a

Data Flow
Read from Sql Data base and then put the query result into excel file
(OLE DB Source --> Excel Destination)

Send Mail Task
Email excel file from the data flow

Control Flow :
Data Flow --> Send Mail Task

The package throws an error below. I tried to disable my antivirus because i thought it's throwing an error because of the antivirus.
But, it's still throwing the same error. If i tried to send email without attachment, it works just fine.
Is there anybody know how to fix this?

Progress: The SendMail task is initiated. - 0 percent complete
[Send Mail Task] Error: An error occurred with the following error message: "The operation has timed out.".
Progress: The SendMail task is completed. - 100 percent complete
Task Send Mail Task failed

View 3 Replies View Related

Transact SQL :: Create Job Which Automatically Convert Output Into Excel And Send Mail

Oct 31, 2015

I have an existing MS SQL database (2008 R2). I have a very simple SQL script. I need to automate this script means wants to create a job which runs on a Friday basis and save the output results of the query as a excel file and then automatically sends the mail to everyone.

View 9 Replies View Related

DB Engine :: Send Query Result As Excel Attachment With Database Mail?

Aug 12, 2015

I have below table in the snapshot, My task is to send the same output as a attachment in Excel to email. i used the below procedure
 
EXEC [msdb]..sp_send_dbmail 
@profile_name='TSSSendMail',
@recipients='mymailID@gmail.com.com',
@subject='DB Mail',
@body='HI Team',
@execute_query_database = 'DbName',
@query = 'EXEC J16ReimbursementFortnightly1TO15 1',
@attach_query_result_as_file=1,
@query_attachment_filename = 'SummaryReimbursement.xls'

But I am not getting Proper Output, is seems like CSV Format, but i want it proper tabular format in Excel.

View 4 Replies View Related

Return An Unique Identifier To An ASP.NET Page To Send It As A Parameter Into Another Stored Procedure

May 1, 2007

Hi !
I have a problem with the unique identifier and  don't know how to solve it.
I have a stored procedure, called from my ASP.NET page, which inserts a new record into a table. I need to get the Id of the row just inserted in order to use it as a parameter of another stored procedure which inserts a new row with this value and other values.
I tried with SCOPE_IDENTITY but i don't know how to ask for this value to the first stored procedure and stored it into an ASP variable.
Dim cmd As New SqlCommand
cmd.CommandText = "Insertar_Contacto"
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = connect
 Thanks!!
 

View 2 Replies View Related

Transact SQL :: Convert Output Into Excel And Schedule Automate Job That Runs Every Friday And Send Email With Attachment

Nov 3, 2015

Here below is the perfect query i made which is working fine and giving me the sql output but just only need is how to convert to excel and automate the job scheduling so that it run on everyday and send the mail with attachment .

SELECT DN, cn, displayName, mail, objectClass, sAMAccountName, Company, givenName, sn
FROM
(
SELECT DN, cn, displayName, mail, objectClass, sAMAccountName, Company, givenName, sn, 1 [ordering] FROM alpha.dbo.DCADFeed
where sAMAccountName collate SQL_Latin1_General_CP1_CI_AS in

[Code] ....

View 4 Replies View Related

SQL 2012 :: Using OVER Command Together With (WITH) And Excel With A Parameter?

Dec 29, 2014

I'm am using an Excel with a parameter, in this case a customer-number. For retrieving the data I use a view. In this view I start with a WITH to retrieve the data because I need the customer number in several places in the view. In the beginning all data I need is a 1:1 relation with the customer but problems occurs when there is a 1:n relation, in my case a customer can have more contact persons. When I try to collect the contact person information it always finds the first contact person in the table and that's from a different customer.

What do I have to do to find the contact person(s) that belongs to my specific customer/?

with Customer as (
Select * from [ods].[custtable] where ODSACTIVE = '1' AND DATAAREAID = 'NL01'
)
union all
select src.accountnum, 'Contact Person 1 Name' as 'Field', SRC.NAME as 'Value'
FROM (SELECT CP.NAME, CT.accountnum, ROW_NUMBER() OVER (ORDER BY CP.PARTYID) AS RN, ct.partyid
from [ods].[contactperson] cp inner join CUSTOMER CT on ct.partyid = cp.ORGpartyid and ct.DATAAREAID = cp.DATAAREAID
WHERE cp.DATAAREAID = 'NL01'
) AS SRC WHERE SRC.RN = 1

View 2 Replies View Related

Passing Excel File As A Parameter

Feb 24, 2008

All,

I am developing the SSIS pacakge. I am loading the data from excel file to Sqlserver table. I have two set of excel files and each excel file belongs to one division. I want the same mapping should call both file. Basically, i wanted to pass the filename as a parameter. Any help....

Regards
Govind

View 1 Replies View Related

Excel OmitFormulas DeviceInfo Parameter:

Jun 30, 2006

Is there a way I can set OmitFormulas DeviceInfo parameter to true for a whole site so that when a user exports the data to Excel, they only get the values?



Joe

View 4 Replies View Related

Export Parameter Values To Excel

Jan 7, 2008

Can someone tell me if this is possible?

I would like the parameter values used in the SSRS report to be exported to Excel.

I thought the following would work:
1. Create a table displaying parameter values
2. Set visibility of the table to be Hidden = True (I don't want the values to appear on the SSRS report since it is just repeating the same information in the parameters pane)
3. Select Table >> Properties >> Data Output. Set Element output to yes.

The result is that a big white space is rendered in the report for the table which looks awful. I was hoping that the visibility property would work in the same way as the 'Suppress' option in Crystal Reports and also hide the white space.

Also when the report is exported to Excel, the table values do not exist but the white space also shows. I thought setting the Data Output property on the table would show the table values.

Any ideas on where I am going wrong or is there another way to achieve this?

View 4 Replies View Related

How To Send Long String Using SqlContext.pipe.send(strString)?

Aug 15, 2006

Hi,



I have a string almost 11006 length.. when i try to send back from SQLCLR procedure

it says cannot send ..

here is Exception Text "Message length 11060 exceeds maximum length supported of 4000."

Max limit to send a string using pipe is 4000

How I can send a string which is large in size than 4000.



Thanks

View 6 Replies View Related

How To Send A Dynamic Files Attachment By Send Mail Task?

Jan 19, 2007

Hello All,

Hopefully someone out there will have an idea as this is driving me nuts.

I want to send a dynamic files in attachment files ny send mail task that file name has change follow datetime.

I try to use the expression but I can't use it.

please tell me for this problem.

Any suggestions appreciated,

Thanks.

View 4 Replies View Related

How To Export Report To Separate Excel Sheet By Different Parameter

Feb 26, 2007

How to export report to separate excel sheet? Does reporting service support it? Can I export report to separate sheet by parameter?

Thank you!

View 1 Replies View Related

Launching A Stored Procedure With Parameter From Excel 2003

Oct 2, 2007

I have a stored procedure in SQL Server which needs a parameter and returns a resultset.

sp_xxx 'parameterValue'

I'd like to know if it is possible to launch this stored procedure through Excel 2003 and get the resultset in the active spreadsheet.


I have tried to do this with Microsoft Query but it doesn't allow parameters in queries that can't be graphically represented.

I have tried also through an ODC files but I get an error.


Is it possible to do this?

View 6 Replies View Related

Integration Services :: How To Upload Excel File Using SSIS With Out Excel Installed On Server

Jul 25, 2015

Trying to upload excel in server where excel is not installed. BIDs was there in the server, when i am trying to craete Excel source I am not able.what the workround for this.. How to upload excel without excel installed on the server.

View 4 Replies View Related

SQL Server 2012 :: Set Default Parameter For Function Parameter?

Jan 13, 2014

I want to set the default parameters for a function. I;d like to set the date start date to current date and end date for the last 90 days. how to make this work?

Create Function HR.Equipment
(
@startdate Date =(Convert(Date,DATEADD(DAY,-1,GETDATE())),
@enddate Date = (Convert(Date,@StartDate-90)
)
RETURNS TABLE AS RETURN
(
SELECT
EquipID,
EmpName,
IssueDate
FROM HR.Equipment
WHERE IssueDate <=@StartDate and IssueDate >=@EndDate
)
GO

View 5 Replies View Related

Send Mail From SQL Server 2000 Running On Small Business Server 2003

Nov 5, 2007

I'm trying to configure SQL server 2000 (standard edition) to send e-mail on a Small Business Server 2003. There's a great article on how to do this on a SBS 2000 server (KB304967), but it does not apply to SBS 2003. Can anyone point me to a article or white paper on how to configure SQL on a SBS 2003 server to send e-mail. Thanks.

David Neahusan

View 1 Replies View Related

Reporting Services :: How To Check Report Server Windows Service Has Send As Permissions On The SMTP Server

Sep 3, 2015

i want to check.. Report Server Windows service has Send As permissions on the SMTP server.

how can i do this..

View 2 Replies View Related

Send Email From Sql Server

Oct 25, 2004

How can I send an email from sql server.

I tried the following code which gives me no errors but doesn't send the email.


Code:

CREATE Procedure sp_SMTPMail@SenderName varchar(100),@SenderAddress varchar(100),@RecipientName varchar(100),@RecipientAddress varchar(100),@Subject varchar(200),@Body varchar(8000)ASSET nocount ondeclare @oMail int --Object referencedeclare @resultcode intEXEC @resultcode = sp_OACreate 'CDONTS.NewMail', @oMail OUTif @resultcode = 0BEGINEXEC @resultcode = sp_OASetProperty @oMail, 'From', @SenderAddressEXEC @resultcode = sp_OASetProperty @oMail, 'To', @RecipientAddressEXEC @resultcode = sp_OASetProperty @oMail, 'Subject', @SubjectEXEC @resultcode = sp_OASetProperty @oMail, 'Body', @BodyEXEC @resultcode = sp_OAMethod @oMail, 'Send', NULLEXEC sp_OADestroy @oMailENDSET nocount off GO
GO



Can anyone recommend a solution to send email from sql server?

View 1 Replies View Related

How To Send Mail Through SQL Server...

Oct 6, 2004

Hi,

I have a requirement of sending mail through SQL Server through SMTP port... But, I dont want to configure my database server as e-mail client...

Is there any way to do it...

Thanks in advance...

View 5 Replies View Related

How To Send File To Different Server Using FTP

May 4, 2015

I found following script but getting invalid command error.

/****** Object: StoredProcedure [dbo].[FtpPutFile] Script Date: 03/25/2014 10:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:<Author,,Name>
-- Create date: <Create Date,,>

[code]....

View 0 Replies View Related

How Can I Send Mail By Using Sql Server

Aug 24, 2007

hi allmy query is how can i send mail by using sql server, i think by unsingxp_sendmail store procedure we can do this but my problem is whatparamater to be pass to this store procedure if i want to send mailfrom my local machine to another user, bcos i am geeting this errormsg in query analyzer...query:-EXEC master..xp_sendmail 'ss35934' (ss35934 is valid user namepresent into my local nerwork)getting error msg :- xp_sendmail: failed with mail error 0x80040111from:- sachin shah

View 3 Replies View Related

Send E-Mail TO SQL Server

Jul 20, 2005

I have a SQL Server 2000 application that send's e-mail to users usingthe xp_smtp_sendmail procedure. That works fine. What I would liketo do is RECIEVE e-mail with SQL Server.Example: I text message an alert to a user. They reply with somekeyword in the subject of their reply e-mail, such as 'ACKNOWLEDGED'or 'ACK' for short. SQL Server recieves this and then acts upon itwith a stored procedure, etc.Anyone know if this is possible and with what tool?TIA,Lindsey

View 3 Replies View Related

How Can Send Mail Using Proxy Server?

Jun 13, 2008

 How can send mail using proxy server?

View 1 Replies View Related







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