Showing posts with label flat. Show all posts
Showing posts with label flat. Show all posts

Tuesday, March 20, 2012

Save to XML file

i'm trying to save data to an XML file from an OLE DB source using the "For XML" clause in the SQL command. Do I need to use a flat file connection manager or a raw file connection manager? And what destination do I use?

jschroeder wrote:

i'm trying to save data to an XML file from an OLE DB source using the "For XML" clause in the SQL command. Do I need to use a flat file connection manager or a raw file connection manager? And what destination do I use?

There are no built in components to allow you to output as XML but Donald Farmer's book contains code showing you how to do it in a script component.

If you don't want to buy the book (although i recommend you do - its very cheap) then read this:

Output a file as a csv or an XML file
(http://blogs.conchango.com/jamiethomson/archive/2006/07/11/4209.aspx)

-Jamie

|||Save it to a flat file destination. It's just text, and you can give it whatever file name you want.|||I've been unsuccessful with that. I got an error that said the input of data type DT_IMAGE is not allowed. I tried using the data conversion component to convert to DT_TEXT, but got garbage in the output file.

Monday, March 12, 2012

Save job results to a file minus header information

sql server 2005
There is a job that returns a date.The goal is to have a flat file of
dates with no header information.
Is there a way to do this in sql server or you have to find DOS scripts
to clean that out...How are you causing the output to the file? osql? sqlcmd? Job step output?
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Massa Batheli" <mngong@.gmail.com> wrote in message
news:1162987757.059162.108050@.b28g2000cwb.googlegroups.com...
> sql server 2005
> There is a job that returns a date.The goal is to have a flat file of
> dates with no header information.
> Is there a way to do this in sql server or you have to find DOS scripts
> to clean that out...
>|||I have the same question,
"Save job results to a file minus header information "
with the following exception. I am using SQL 2000
I am scheduling a stored proc to run using SQL Server Agent.
"Arnie Rowland" wrote:

> How are you causing the output to the file? osql? sqlcmd? Job step output?
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to th
e
> top yourself.
> - H. Norman Schwarzkopf
>
> "Massa Batheli" <mngong@.gmail.com> wrote in message
> news:1162987757.059162.108050@.b28g2000cwb.googlegroups.com...
>
>|||Sorry guys failed to update this
Regular internal sql server job that writes to a flat file ...
Thanks for your time
Massa|||Your Job step could direct output to a file,
OR the Job step itself could shell out to OSQL and allow OSQL to direct
output to a file.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Massa Batheli" <mngong@.gmail.com> wrote in message
news:1163703951.849624.192880@.h54g2000cwb.googlegroups.com...
> Sorry guys failed to update this
> Regular internal sql server job that writes to a flat file ...
> Thanks for your time
> Massa
>

Save job results to a file minus header information

sql server 2005
There is a job that returns a date.The goal is to have a flat file of
dates with no header information.
Is there a way to do this in sql server or you have to find DOS scripts
to clean that out...How are you causing the output to the file? osql? sqlcmd? Job step output?
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Massa Batheli" <mngong@.gmail.com> wrote in message
news:1162987757.059162.108050@.b28g2000cwb.googlegroups.com...
> sql server 2005
> There is a job that returns a date.The goal is to have a flat file of
> dates with no header information.
> Is there a way to do this in sql server or you have to find DOS scripts
> to clean that out...
>|||I have the same question,
"Save job results to a file minus header information "
with the following exception. I am using SQL 2000
I am scheduling a stored proc to run using SQL Server Agent.
"Arnie Rowland" wrote:
> How are you causing the output to the file? osql? sqlcmd? Job step output?
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to the
> top yourself.
> - H. Norman Schwarzkopf
>
> "Massa Batheli" <mngong@.gmail.com> wrote in message
> news:1162987757.059162.108050@.b28g2000cwb.googlegroups.com...
> > sql server 2005
> > There is a job that returns a date.The goal is to have a flat file of
> > dates with no header information.
> > Is there a way to do this in sql server or you have to find DOS scripts
> > to clean that out...
> >
>
>|||Sorry guys failed to update this
Regular internal sql server job that writes to a flat file ...
Thanks for your time
Massa|||Your Job step could direct output to a file,
OR the Job step itself could shell out to OSQL and allow OSQL to direct
output to a file.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Massa Batheli" <mngong@.gmail.com> wrote in message
news:1163703951.849624.192880@.h54g2000cwb.googlegroups.com...
> Sorry guys failed to update this
> Regular internal sql server job that writes to a flat file ...
> Thanks for your time
> Massa
>

Save job results to a file minus header information

sql server 2005
There is a job that returns a date.The goal is to have a flat file of
dates with no header information.
Is there a way to do this in sql server or you have to find DOS scripts
to clean that out...
How are you causing the output to the file? osql? sqlcmd? Job step output?
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Massa Batheli" <mngong@.gmail.com> wrote in message
news:1162987757.059162.108050@.b28g2000cwb.googlegr oups.com...
> sql server 2005
> There is a job that returns a date.The goal is to have a flat file of
> dates with no header information.
> Is there a way to do this in sql server or you have to find DOS scripts
> to clean that out...
>
|||I have the same question,
"Save job results to a file minus header information "
with the following exception. I am using SQL 2000
I am scheduling a stored proc to run using SQL Server Agent.
"Arnie Rowland" wrote:

> How are you causing the output to the file? osql? sqlcmd? Job step output?
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to the
> top yourself.
> - H. Norman Schwarzkopf
>
> "Massa Batheli" <mngong@.gmail.com> wrote in message
> news:1162987757.059162.108050@.b28g2000cwb.googlegr oups.com...
>
>
|||Sorry guys failed to update this
Regular internal sql server job that writes to a flat file ...
Thanks for your time
Massa
|||Your Job step could direct output to a file,
OR the Job step itself could shell out to OSQL and allow OSQL to direct
output to a file.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Massa Batheli" <mngong@.gmail.com> wrote in message
news:1163703951.849624.192880@.h54g2000cwb.googlegr oups.com...
> Sorry guys failed to update this
> Regular internal sql server job that writes to a flat file ...
> Thanks for your time
> Massa
>

Save data flow task result into specific table in database

Hello

Kindly i need support in this issue, i create task flow import from flat file and store in database but i need to save all result for task into specific table

Like Record count transferred

Destination table name

Time ..........etc

thanks

Sounds like you are looking for auditing information. Watch the Kimball Webcast on the main page of this forum. Plenty of examples in there.

In summary, you'll populate variables in your data flow, and then after the data flow completes, you'll use an Execute SQL task in the control flow to perform an insert statement into your "specific table" using those variables previously populated.|||where in the main page ?|||

Hosam Abd EL-Wahab wrote:

where in the main page ?

The Ralph Kimball Group Webcast

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=534505&SiteID=1

Tuesday, February 21, 2012

Sample on how to import Flat File with vertical structure

Hello,

I'm looking for an example on how to import a Flat file that is not a csv file but had data on several lines, a small indicator at the beginning of the line indicates what kind of data is on the rest of the line. Not every field is availabye for each block.

Anybody got an idea on where to find this kind of samples.

Thx.

? Harry, I think the inconsistency in which columns are present or not in each row is going to cause you problems in SSIS. If I understand your structure correctly you can't use the Flat File Connection manager for such data. I think you'll need to write some custom code. Without knowing the structure of your data I don't think I can be more specific. Andrew Watt [MVP] <Harry_Leboeuf@.discussions.microsoft.com> wrote in message news:22ebb616-102a-46db-b372-9c21df0d6f3f@.discussions.microsoft.com... Hello, I'm looking for an example on how to import a Flat file that is not a csv file but had data on several lines, a small indicator at the beginning of the line indicates what kind of data is on the rest of the line. Not every field is availabye for each block. Anybody got an idea on where to find this kind of samples. Thx.|||

Harry_Leboeuf wrote:

Hello,

I'm looking for an example on how to import a Flat file that is not a csv file but had data on several lines, a small indicator at the beginning of the line indicates what kind of data is on the rest of the line. Not every field is availabye for each block.

Anybody got an idea on where to find this kind of samples.

Thx.

I personally would import each row as simply a single column of type DT_STR/DT_WSTR and then parse out the required columns within the data-flow - probably using a script component.

You could make things slightly easier for yourself by importing the data as two columns: the first contains the indicator and the second contians the rest of it.

Alternatively you could combine those two steps into one and write a source component that imported the data and parsed it on the way. I wouldn't do that though cos there's no point in creating work for yourself - let SSIS import the data and you are then left with the relatively easy job of parsing out the columns.

-Jamie