• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

SQL 2005 need to generate XML per each new record

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
tommyo94
Asked:
tommyo94
  • 3
  • 2
1 Solution
 
Anthony PerkinsCommented:
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
 
tommyo94Author Commented:
So in the export from SQL server you cannot name the XML export with the value of one of the fields?
0
 
Anthony PerkinsCommented:
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
 
tommyo94Author Commented:
SSIS is what I am using.  I'm not sure what commands to issue to modify the naming of the XML output file .
0
 
Anthony PerkinsCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now