Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

How to Create href link with a SQL Variable?

$
0
0

I have a trigger that sends an email when a record is inserted into the table and it works great, but I have decided to try and add a few bells and whistles to it. In the email there is a link that opens a SQL Report which prompts the user to select a date, but I want to insert the parameter EndDate into the href link.

This is the current link:

'">http://reports/SQLRpts/Pages/ReportViewer.aspx?%2fSales%2fSalesForcast_Snapshot&rs:Command=Render">; View Report'

I want to add &EndDate=@VARIABLE to the link. The @VARIABLE would be the date. I have tried many variations of the following link with no luck:

'">http://reports/SQLRpts/Pages/ReportViewer.aspx?%2fSales%2fSalesForcast_Snapshot&rs:Command=Render&EndDate=@VARIABLE">; View Report'

Anyone have a way to accomplish this task?

Thanks!


Viewing all articles
Browse latest Browse all 4871


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>