Solved

SQL 2005 need to generate XML per each new record

Posted on 2014-02-28
5
296 Views
Last Modified: 2014-03-01
We are currently running SQL 2005.  We need to generate an xml file as each new record is entered into the database.  I'm not sure where this would be done and we need to name each XML file with the incident number which has its own field.
0
Comment
Question by:tommyo94
  • 3
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39896618
I'm not sure where this would be done and we need to name each XML file with the incident number which has its own field.
This would be done at the application (presentation layer) and not in SQL Server itself.
0
 

Author Comment

by:tommyo94
ID: 39896626
So in the export from SQL server you cannot name the XML export with the value of one of the fields?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39896633
So in the export from SQL server you cannot name the XML export with the value of one of the fields?
What do you mean by export?  Do you mean SSIS?  If so, absolutely, SSIS is your application (presentation layer) and are at liberty to do whatever you can in that environment.
0
 

Author Comment

by:tommyo94
ID: 39896654
SSIS is what I am using.  I'm not sure what commands to issue to modify the naming of the XML output file .
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 39897368
You can use an expression for that.  Here is a good explanation as to how to do it:
http://www.mssqltips.com/sqlservertip/1084/dynamic-flat-file-connections-in-sql-server-integration-services/
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now