Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL 2005 need to generate XML per each new record

Posted on 2014-02-28
5
Medium Priority
?
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

610 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