Generate Reports From Database Information And Email It Weekly
Sep 23, 2005
Hello there,
Im alittle stuck
what im trying to find out is:
MS SQL 2000
1. How to Generate Reports from selected Database information
2. then email that report weekly.
Ive heard about Visual Studio .NET 2003: Business Intelligence Projects
but is there away to create the reports directly in Enterprise manager?
any pointers would be great
View 3 Replies
ADVERTISEMENT
Nov 30, 2007
Dear Forum Community,
I am new to this forum (actually to forums in general). I apologize for the long post, but I feel that someone must have done all this before and perhaps there are better approaches, so I felt I had to explain my objectives.
I have written a Daily(date) report for all the pertinent data in our production database. We want this data to persist for two years and be easily accessible. We also want other reports to use this data as a datasource rather than the production data because the production database is periodically purged of old data that may be of interest to these reports. So I am using SSRS not only as a reporting tool but also a sort of historical database.
To persist the daily report I added a Yesterday report that includes the Daily(date) as a subreport. The Yesterday report uses yesterday's date and has no paramters so it can be set up to run as a snapshot and be stored in the history. Daily(date) is set to use the cache which expires after 7 reports. So far so good.
I have now created a Weekly(weeknumber) report that includes 7 Daily(date) subreports and a LastWeek report that is schedule to run weekly as a snapshot and is stored in the history. I am hoping that because the Daily(date) reports have already been run by the Yesterday report, their datasets will still be in the cache and this will not cause a refresh from the production database. Am I right?
Basically, I want to keep access to the production database to a minimum, not store (much) duplicate data in the Report Server database and yet still have quick and easy access to the data going back 2 years even though it has long since been purged from the production database.
I considered to use the 7 daily reports as a datasources for the weekly report so that I could aggregate the data each week and expire the daily reports (and again for months, quarters and years). However, I was unable to figure out how to use a report as a datasource.
My questions come down to these...
Will the approach I am pursuing work?
Is it the best approach?
If a report includes subreports that have already been run individually with the same parameters, will the cached subreport be used.
How do you use an existing reports as datacsources for an aggregated report?
I look forward to hearing your suggestions.
Dave
View 3 Replies
View Related
Feb 18, 2014
I have a query that will generate records monthly based on the number of months that i calculate between two date feilds for a given requestid. How can i use the same query to generate records for weekly and bi weekly based on the receiveddate field that i use in the subtraction for calculating the number of months.
Also when inserting i have been adding a month for every record as i was generating monthly and now i would have to add week and 2 weeks to the receiveddate
SET NOCOUNT ON
GO
declare @num_of_times int
declare @count int
declare @frequency varchar(10)
declare @num_of_times1 int
[Code] ....
View 6 Replies
View Related
Jan 21, 2005
Help with query: I currently cannot be alerted by SQL Mail so I would like to take the script that was generated by SQL server and using the store procedure sp_sqlsmtpmail to generate a email using smtp server to alert me. The store procedure does work. I would like to know if this is possible.
Thanks
Lystra
-- Script generated on 1/21/2005 10:04 AM
-- By: MAMSIsa
-- Server: (local)
IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Demo: Full tempdb'))
---- Delete the alert with the same name.
EXECUTE msdb.dbo.sp_delete_alert @name = N'Demo: Full tempdb'
BEGIN
EXECUTE msdb.dbo.sp_add_alert @name = N'Demo: Full tempdb', @message_id = 9002, @severity = 0, @enabled = 1, @delay_between_responses = 10, @include_event_description_in = 5, @database_name = N'tempdb', @category_name = N'[Uncategorized]'
Then
Exec sp_sqlsmtpmail
@vcTo = 'lwilliams@Huc.com',
@vcBody ='Check out problem Immediataly.',
@vcSubject ='DOCSITE01FDK - Full Tempdb Log'
END
View 2 Replies
View Related
Jul 1, 2015
I am wanting to fire-off an email with the failed jobs anytime they are deposited into a table. Â My syntax fires off an email even when the table does not contain data, it just sends a blank email. Â this will only generate an email if teh table contains data? Â
if exists (Select from FailedJobs)
exec msdb.dbo.sp_send_dbmail
@profile_name = 'DatabaseMail'
@recipients = 'asdfasdfsdf@aafas.com'
@from_address = 'asdfasdfacasca@cc.com'
@query = 'Select * from failedjobs'
@subject = 'List Of Failed Jobs'
@attach_query_result_as_file = 1;
View 3 Replies
View Related
Mar 26, 2008
Hi!
I have an original database that I want to copy once to another database. Then I want to update the data weekly with the data of the original database. I don€™t change any tables or columns in that part of the database. Just some tables more in the €˜new€™ database (than the tables from the original database) with some references to the tables that have to be updated weekly.
How can I do this? (if you know what I mean... it's a sort of a datawarehouse where different sources come together.. that part that represents the original database is just a part of the datawarehouse. That part is exactly the same structure as the original database.)
Thanks,
Sandra
View 1 Replies
View Related
May 5, 2008
in the report data base one stored pocedure is there they generating daily reports from there
in other data base margin they are inserting daily data into the tables changing date wise
how to generate reports in sql server
View 1 Replies
View Related
Jan 30, 2007
Hi All,
I want to know how to generate a report from SSIS, for example, a report telling what has changed to a table.
Thanks,
TPK
View 4 Replies
View Related
Nov 13, 2007
Hi all,
Is it possible to generate mulitple reports from parameter? what I want is for example: I have a report with a sales orders table, it has 2 input parameter fields; two dates to make up a date range. If the date range is between yesterday and today, I will get two reports (two reports with two different total page number); one is for yesterday and one is for today.
I did some research on resetting the total page, but their solution doesnt work on my special case (very complicate..). A similiar work out also apperciate.
Regards,
Bryan
View 3 Replies
View Related
Jul 31, 2006
Hi Everybody
can somebody please help in finding how to mail the sql server reports via email.
Thanks alot
Nee123
View 8 Replies
View Related
Feb 13, 2007
Is this possible?, i hope it is:). Your help is very much appreciated.
View 2 Replies
View Related
Jun 27, 2007
I am looking for some examples of code for an appliction which will let run RS reports from a custom application. The user will choose the reports from a menu structure
We have an exiting application which we use to run crystal reports which we are going to be migrating to RS. We use custom web controls to capture the required parameter values for the reports, and hope to reuse the same controls (with minimal rework) to capture the parameters values for the RS reports.
What I am after is some code which will
a) let me run the report and display it. I don't want to display the report parameters in the URL etc as we generate some report parameter values based upon the user's ID and do NOT want them displayed back to the users
b) export the report to PDF, CSV etc depending upon the option chosen by the user.
The application will be developed in VS 2005 - VB. Does any one know of some links to some sample code
View 1 Replies
View Related
Oct 3, 2007
I'm using (SQL RS 2005) data-driven subscription with Delivery by: Email.
How do I prevent that an E-mail is sent when the result set is empty?
(I don't wan't to do this in the select statment where I select my subscribers and parameters for the report)
View 1 Replies
View Related
Apr 30, 2008
I currently have a report on our Reporting Services 2005 server that takes a CompanyID as its only parameter. Also, in our database, we have a list of contacts that are linked to the CompanyID that is used in the report. What I would like to do is email a pdf or each company's report to every contact for that company in our database daily. However I am stuck on how to do that. My project is using C#, but if there is a way to do this directly through Reporting Services I could do that as well. If anyone could help me out I would greatly appreciate it. Thanks!
View 5 Replies
View Related
Mar 14, 2006
I am using SS 2005 RS. I am able to generate single page pdf reports by passing "id" as a parameter. Now I need to send multiple ids as parameter and generate one big report which would contain reports for all the ids supplied on separate pages. Is this possible? If yes, then how do i do this.
What I have tried so far is, I created new report with a list control and added single page report as a subreport to this list control and grouped this list control using id parameter. When i send multiple ids in the parameter, for example 3 ids, it generates 3 page report but only for the first id. So it generates report for the first id and repeats same report 3 times.
Thanks for your help,
View 9 Replies
View Related
Feb 14, 2008
Hi All,
Can we render a report directly on to a mobile device/ interface from SSRS?
View 6 Replies
View Related
Apr 24, 2008
Hi
I am generating a Report by using SSRS. I am making using use of SSRS Report Viewer control for displaying the report. Which has an option to export the generated report in PDF format. Instead of displaying the report in by using report viewer I want to generate it directly in PDF format whenever that report is selected from the list of reports. So is there is any way to generate the report directly in PDF format which prompt a pop up for opening or saving the PDF?
Thanks,
Shailesh
View 3 Replies
View Related
Oct 25, 2007
SSRS 2000
Data driven subscription uses a SQL query to create report parameter values.
The subscription errors are inconsistent meaning sometimes no reports in a batch fail and sometimes 3 out of 5 will fail. I don't think it is data related because I'm using the same data each time.
When a report fails to email there is a consistent error related to rendering a chart. That message is in red below.
The data source is Analysis Services 2000. Has anyone seen this before? I've seen a lot of postings that are similar but no solutions. Is it possible for RS to lose data or get corrupt data from an MDX query?
Is there a timeout between RS and Analysis Services (PivotTable Service) to check?
SSRS trace log:
ReportingServicesService!runningjobs!237c!10/25/2007-14:15:01:: w WARN: Thread pool pressure: turning off threads
ReportingServicesService!processing!237c!10/25/2007-14:15:01:: e ERROR: System.ArgumentException: Invalid parameter used.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at Dundas.Charting.WebControl.ChartImage.GetImage()
at Dundas.Charting.WebControl.Chart.Save(Stream imageStream)
at Microsoft.ReportingServices.ReportRendering.DundasChart.GetImage(ImageType type, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.DundasChart.GetImage(ImageType type, ChartInstanceInfo instanceInfo, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.Chart.GetImage(ImageType type, Boolean& hasImageMap)
ReportingServicesService!processing!237c!10/25/2007-14:15:01:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An error has occurred during rendering of chart chart_SalesMarginTrend. Details: Invalid parameter used., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An error has occurred during rendering of chart chart_SalesMarginTrend. Details: Invalid parameter used. ---> System.ArgumentException: Invalid parameter used.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at Dundas.Charting.WebControl.ChartImage.GetImage()
at Dundas.Charting.WebControl.Chart.Save(Stream imageStream)
at Microsoft.ReportingServices.ReportRendering.DundasChart.GetImage(ImageType type, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.DundasChart.GetImage(ImageType type, ChartInstanceInfo instanceInfo, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.Chart.GetImage(ImageType type, Boolean& hasImageMap)
--- End of inner exception stack trace ---
ReportingServicesService!reportrendering!237c!10/25/2007-14:15:01:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown., ;
Info: Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An error has occurred during rendering of chart chart_SalesMarginTrend. Details: Invalid parameter used. ---> System.ArgumentException: Invalid parameter used.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at Dundas.Charting.WebControl.ChartImage.GetImage()
at Dundas.Charting.WebControl.Chart.Save(Stream imageStream)
at Microsoft.ReportingServices.ReportRendering.DundasChart.GetImage(ImageType type, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.DundasChart.GetImage(ImageType type, ChartInstanceInfo instanceInfo, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.Chart.GetImage(ImageType type, Boolean& hasImageMap)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.ReportRendering.Chart.GetImage(ImageType type, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.Chart.GetImage()
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderChart(PageTableGrid pageTableGrid, Int32 row, Int32 col, ReportItemInfo reportItemInfo, PageCell pageCell, Boolean addHeaderRows)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderGridCell(PageLayout pageLayout, Int32 row, Int32 col, Hashtable& duplicateItemsTable, Boolean addHeaderRows)
at Microsoft.ReportingServices.Rendering.BIFFUtility.WorkSheet.WriteRowBlocksAndCells(ExcelRenderer excelRenderer, Stream stream, UInt32 indexBeginOffsetPosition, Int32 minCol, Int32 maxCol)
at Microsoft.ReportingServices.Rendering.BIFFUtility.BaseWorkSheet.WriteWorkSheet(ExcelRenderer excelRenderer, Stream stream, Int32 offset)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageLayout(PageLayout pageLayout, Int32& currentPageNumber, Stack& stack)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageCollection(PageCollection pageCollection, Int32& currentPageNumber, Stack& stack, PageLayout& lastPageLayout)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateWorkSheets()
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateMainSheet()
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderExcelWorkBook(CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.ProcessReport(CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(DateTime A_0, GetReportChunk A_1, ProcessingContext A_2, RenderingContext A_3, CreateReportChunk A_4, Boolean& A_5)
--- End of inner exception stack trace ---
ReportingServicesService!library!237c!10/25/2007-14:15:01:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
ReportingServicesService!emailextension!237c!10/25/2007-14:15:01:: Error sending email. Microsoft.ReportingServices.Diagnostics.Utilities.RSException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. ---> Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An error has occurred during rendering of chart chart_SalesMarginTrend. Details: Invalid parameter used. ---> System.ArgumentException: Invalid parameter used.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at Dundas.Charting.WebControl.ChartImage.GetImage()
at Dundas.Charting.WebControl.Chart.Save(Stream imageStream)
at Microsoft.ReportingServices.ReportRendering.DundasChart.GetImage(ImageType type, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.DundasChart.GetImage(ImageType type, ChartInstanceInfo instanceInfo, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.Chart.GetImage(ImageType type, Boolean& hasImageMap)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.ReportRendering.Chart.GetImage(ImageType type, Boolean& hasImageMap)
at Microsoft.ReportingServices.ReportRendering.Chart.GetImage()
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderChart(PageTableGrid pageTableGrid, Int32 row, Int32 col, ReportItemInfo reportItemInfo, PageCell pageCell, Boolean addHeaderRows)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderGridCell(PageLayout pageLayout, Int32 row, Int32 col, Hashtable& duplicateItemsTable, Boolean addHeaderRows)
at Microsoft.ReportingServices.Rendering.BIFFUtility.WorkSheet.WriteRowBlocksAndCells(ExcelRenderer excelRenderer, Stream stream, UInt32 indexBeginOffsetPosition, Int32 minCol, Int32 maxCol)
at Microsoft.ReportingServices.Rendering.BIFFUtility.BaseWorkSheet.WriteWorkSheet(ExcelRenderer excelRenderer, Stream stream, Int32 offset)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageLayout(PageLayout pageLayout, Int32& currentPageNumber, Stack& stack)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageCollection(PageCollection pageCollection, Int32& currentPageNumber, Stack& stack, PageLayout& lastPageLayout)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateWorkSheets()
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateMainSheet()
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderExcelWorkBook(CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.ProcessReport(CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(DateTime A_0, GetReportChunk A_1, ProcessingContext A_2, RenderingContext A_3, CreateReportChunk A_4, Boolean& A_5)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(DateTime A_0, GetReportChunk A_1, ProcessingContext A_2, RenderingContext A_3, CreateReportChunk A_4, Boolean& A_5)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc)
at Microsoft.ReportingServices.Library.RSService.RenderAsLive(CatalogItemContext reportContext, ItemProperties properties, ParameterInfoCollection effectiveParameters, Guid reportId, ClientRequest session, String description, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, Boolean cachingRequested, Warning[]& warnings, ReportSnapshot& resultSnapshotData, DateTime& executionDateTime, RuntimeDataSourceInfoCollection& alldataSources, UserProfileState& usedUserProfile)
at Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
at Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.ReportImpl.Render(String renderFormat, String deviceInfo)
at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
ReportingServicesService!library!237c!10/25/2007-14:15:01:: Data Driven Notification for activation id 1ab1f67c-82c0-4dba-9745-a4057ab1cb4f was saved.
ReportingServicesService!library!237c!10/25/2007-14:15:01:: Status: Failure sending mail: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown.
ReportingServicesService!notification!237c!10/25/2007-14:15:01:: Notification 15307c1b-0b60-493d-b2c1-fde89780ff06 completed. Success: False, Status: Failure sending mail: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown., DeliveryExtension: Report Server Email, Report: SalesPerfScorecard_Email, Attempt 0
ReportingServicesService!dbpolling!237c!10/25/2007-14:15:01:: NotificationPolling finished processing item 15307c1b-0b60-493d-b2c1-fde89780ff06
View 4 Replies
View Related
Nov 10, 2015
Is there a way to send out an email woth deadlock information (victim query, winner query, process id's and resources on which the deadlock occurred) as soon as a deadlock occurs in a database or at instance level?I currently has trace flag 1222 turned on. And also created an alert that send me an email whenever a deadlock occurs. but it just says that a deadlock occurred and I log into sql server error log and review the information.
View 5 Replies
View Related
Jul 12, 2007
Hello ALL
what I want to achieve is to load a text file that has email addreses from disk and using the email addresses in the text file look it up against the email addresses in the database table then once matched delete all the users in the table whose email address were in the text file.
I also want to update some users using a different text file.
Please help me with the best way to do this
Thanks in advance
View 6 Replies
View Related
Jun 21, 2007
I'am doing functionality test on DTS packages and saving my DTS packages to meta data services instead of saving them as local packages. We would like to see what information would be provided by saving them this way, but when we try to open the meta data browser (the 3rd icon under DTS) we get the following error:
An error occurred while trying to access the database information. The msdb database could not be opened.
View 3 Replies
View Related
Oct 29, 2015
I actually work in an organisation and we have to find a solution about the data consistancy in the database. our partners use to send details to the organisation and inserted directly in the database, so we want to create a new database as a buffer database to insert informations from the partners then make an update to the main database. is there a better solution instead of that?
View 6 Replies
View Related
Apr 15, 2007
I'm having a weird problem with an easy process. I have a section that allows people to enter their name and email address if they wish to be contacted. I have it set up so that when they enter that information into the text boxes, the info is then sent to my SQL database. The code looks right to me, but it never comes up. Here is the code I have for the button_click.
Dim NTAdatasource As New SqlDataSource()
NTAdatasource.ConnectionString = ConfigurationManager.ConnectionStrings("DatabaseConnectionString1").ToString()
NTAdatasource.InsertCommandType = SqlDataSourceCommandType.Text
NTAdatasource.InsertCommand = "INSERT into ContactUs (YourName, EmailAddress, DateTimeStamp) VALUES (@YourName, @EmailAddress, @DateTimeStamp)"
NTAdatasource.InsertParameters.Add("YourName", txtYourName.Text)
NTAdatasource.InsertParameters.Add("EmailAddress", txtEmailAddress.Text)
NTAdatasource.InsertParameters.Add("DateTimeStamp", DateTime.Now)
Dim RowsAdded As Integer = 0
Try
RowsAdded = NTAdatabase.Insert()
Catch ex As Exception
Server.Transfer("problem.aspx")
End Try
If RowsAdded <> 1 Then
Server.Transfer("problem.aspx")
Else
Server.Transfer("success.aspx")
End If
End Sub
The strange thing is that when I debug, the "rowsadded" value comes up to 1. The process runs through debugging just fine and redirects me to my "success.aspx" page. What am I doing wrong?
Thanks
View 1 Replies
View Related
Apr 5, 2001
I work with multiple servers and I have system administrator rights on all server. My question is, why on some server when I click on a database it shows the General, Table & Index, Space Allocated tool bar, than if I go to a different server, click a database it does not show? I would like to see this toolbar on all my servers when I click a database.
Thanks Reggie
View 1 Replies
View Related
Feb 18, 2003
I want to write a sql query for information from a table in different database but on the same server.
what is the syntax.
select * from databse2.owner.table ??
i am in application1 database and i want to query from application2 database on the same server.
use application1
go
Select * from application2.dbo.tablename
go
Is this query correct?
View 1 Replies
View Related
Oct 11, 2001
Pardon the possibly senseless question - I have been an NT Administrator for some years, and have just gotten thrown into picking up some SQL DBA work and I'm still feeling my way around.
Is it possible to query the Master database for the setup information (etc) on the other databases? Several have been marked suspect due to a hard drive failure and I am trying to figure out what the original setup of the databases was.
Thanks,
Mary Elizabeth
NW Natural
View 1 Replies
View Related
Jul 17, 2007
Hello,I am trying to use the SQl Server database reporting tools to create areport on the database to find areas for optimization including tableformats, column formats, and sizes. Can anybody please help me withthis. If any body has used any other tool by which I can create abovementioned reports plz do let me know. I will be really thankful foryour help.ThanksSuneel
View 1 Replies
View Related
Aug 14, 2007
I have a serious problem with either SQL Server or SQL Reporting Services. I have 7 tables in a database that are relational. I have created serveral reports against this database. Last week when I pulled one of the reports, I was missing information on one of the cells. The reason why I know this is because my boss has us verify the report against the database. That took about an hour to complete. When we found that the report was not correct I repulled the report and the cell that was empty, was now populated. What gives? This is the same report I have pulled for the last month and had no problems until now. Is there a time issue involved between the last update to the database to the time I pull the report? Or maybe there is something wrong with the query?
SELECT Lease.[Lease #], MineralContacts.[Mineral Owner First Name], MineralContacts.[Mineral Owner Last Name], Tract.County, Tract.[Tract Number],
Tract.[Tract Description], Tract.Section, Tract.Block, Tract.Survey, Tract.Abstract, Lease.[Lease Date], Tract.[Title Check Though], Tract.[2ndTitleReview],
Tract.[2nd R/S Complete], Tract.[Title Agent], Tract.[Tract Gross Acres], SubTract.[Tract Net Acres], Draft.[Draft Status], Draft.[Draft Due Date],
Draft.[Draft Amount], Draft.[Draft #], Draft.[ANB Invoice #], Draft.[Lse File Sent to CP], Draft.[Money Wired from CP to EA],
Draft.[STA Approved Draft for pmt], Draft.[STA Recommend to Return Daft], Draft.[KE Advised ANB to Pay Draft], Draft.[KE Advised ANB to Return Draft],
Draft.[Paid Draft Recd], SubTract.Comments, SubTract.Hide
FROM Tract INNER JOIN
SubTract ON Tract.TractID = SubTract.TractID INNER JOIN
Mineral ON SubTract.SubTractID = Mineral.SubTractID INNER JOIN
Lease ON Mineral.MineralID = Lease.MineralID INNER JOIN
Draft ON Lease.LeaseID = Draft.LeaseID INNER JOIN
MineralContacts ON Mineral.MineralID = MineralContacts.MineralID
WHERE (Draft.[Draft Status] IS NOT NULL) AND (Draft.[Draft Due Date] IS NOT NULL)
View 1 Replies
View Related
Mar 31, 2008
If I had a bunch of paragraphs stored in a database field, is there a way, when displaying that data, that I can write instructions to only retrieve the very first paragraph?
View 4 Replies
View Related
Dec 1, 2005
This is probably a very simple question but i am having problems with inserting information into database
The function takes the values "FirstName" And "LastName" from A table Called "Customer" and the value "ProductID" from a table called "Products" and inserts them into a table called " NewOrder".
Everything compiles ok but when I press the button the information is not uploaded to thedatabase. ( There is no error message)
This is the stored procedure
CREATE PROCEDURE SP_NewOrder(@CartID char (36), @CustomerID Varchar (50))AS
INSERT INTO NewOrder (FirstName, LastName, ProductID)
SELECT Customer.FirstName, Customer.LastName, Products.ProductID
From Customer,Products Join ShoppingCart ON Products.ProductID =ShoppingCart.ProductIDWHERE ShoppingCart.CartID = @CartID AND Customer.CustomerID = @CustomerIDGO
This is the Function
Public Shared Function CreateOrder() AS String Dim customerID As integer Dim connection as New SqlConnection(connectionString) Dim command as New SqlCommand("SP_NewOrder",connection) command.CommandType = CommandType.StoredProcedure command.Parameters.Add("@CartID", SqlDbType.Char,36) command.Parameters("@CartID").Value = shoppingCartID command.Parameters.Add("@CustomerID", SqlDbType.Varchar,36) command.Parameters("@CustomerID").Value = customerID Try
connection.Open() command.ExecuteNonQuery() Finally connection.Close()
End TryEnd Function
This is the page code
Sub btn3_Click(sender As Object, e As EventArgs)Dim cart as New ShoppingCart()Dim shoppingCartID As IntegerDim customerID As Integer = Context.Session("worldshop_CustomerID")cart.CreateOrder()End Sub
Can Anyone see where I am going wrong
Many thanks
martin
View 2 Replies
View Related
Feb 7, 2001
I would like to know how to (if it is at all possible) in SQL (or even ADO) to retrieve all the data concerning database X's
a) Tables
b) Tables column names
c) Tables column's data types
I don't want to use the doa.tabledefs object.. .i would prefer to do it in SQL, but using ADO objects (since I am developing stuff in VB) would be ok too.
Please Help.. i have been going crazy trying to find anything useful.. email me back please!
Thanks,
Matt
View 2 Replies
View Related
Sep 8, 2003
Hi,
I want to get information about all the indexes in a database.
Can any one suggest me a query for this.
Thanks.
View 2 Replies
View Related
Dec 13, 2006
Hi,
I ´d like to know if there is any way to access an Informix database from sqlserver 2005.
We are trying to build a data warehouse in SS2005, and I want to know If I could avoid the generation of hundreds of flats files from Informix and loading them into SS2005, directly recovering all information from SS2005 across any kind of migration or connection.
Any help would be very appreciated
Regards.
View 2 Replies
View Related