Solved

SQL 2005 need to generate XML per each new record

Posted on 2014-02-28
5
298 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

777 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