I have a text file that is generated from a host transaction. I have a batch
program that loads the text file into SQL and does a boatload of validation.
Is it possible to create DTS job or do this some how in SQL to make it
pretty less painful?you can create a dts package using import/export wizard in mssql server
enterprise manager, store it somewhere ( either on the server, or as a
file ), and then call this package from your app, and supply all dynamic
variables, including the filename, etc.
Ilyan Mishiyev
IGM Consulting Corporation
Enterprise Web Solutions
www.igmcc.com
"microsoft.news.com" <CSharpCoder> wrote in message
news:exxPynAUFHA.1432@.TK2MSFTNGP09.phx.gbl...
>I have a text file that is generated from a host transaction. I have a
>batch program that loads the text file into SQL and does a boatload of
>validation. Is it possible to create DTS job or do this some how in SQL to
>make it pretty less painful?
>
>|||would i still have to do all the business rules, validation etc, in the
batch program or could I use SQL to do all of that?
"Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
news:exhFJ5AUFHA.2556@.TK2MSFTNGP12.phx.gbl...
> you can create a dts package using import/export wizard in mssql server
> enterprise manager, store it somewhere ( either on the server, or as a
> file ), and then call this package from your app, and supply all dynamic
> variables, including the filename, etc.
> --
> Ilyan Mishiyev
> IGM Consulting Corporation
> Enterprise Web Solutions
> www.igmcc.com
>
> "microsoft.news.com" <CSharpCoder> wrote in message
> news:exxPynAUFHA.1432@.TK2MSFTNGP09.phx.gbl...
>|||after you load all the data, you can call a stored proc by the same app
that proc might be used for validation
Ilyan Mishiyev
IGM Consulting Corporation
Enterprise Web Solutions
www.igmcc.com
"microsoft.news.com" <CSharpCoder> wrote in message
news:Of5CG$AUFHA.2056@.tk2msftngp13.phx.gbl...
> would i still have to do all the business rules, validation etc, in the
> batch program or could I use SQL to do all of that?
> "Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
> news:exhFJ5AUFHA.2556@.TK2MSFTNGP12.phx.gbl...
>|||is there somewere online i could read about or look at this being done or
something like it being done?
"Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
news:uxYGZUBUFHA.3652@.TK2MSFTNGP10.phx.gbl...
> after you load all the data, you can call a stored proc by the same app
> that proc might be used for validation
> --
> Ilyan Mishiyev
> IGM Consulting Corporation
> Enterprise Web Solutions
> www.igmcc.com
>
> "microsoft.news.com" <CSharpCoder> wrote in message
> news:Of5CG$AUFHA.2056@.tk2msftngp13.phx.gbl...
>|||not sure about that
actually it's really not that complicated
step 1 - create dts package
step 2 - call tht package from the app to load data
step 3 - call stored proc that validates loaded data
Ilyan Mishiyev
IGM Consulting Corporation
Enterprise Web Solutions
www.igmcc.com
"microsoft.news.com" <CSharpCoder> wrote in message
news:ebXU5cBUFHA.736@.TK2MSFTNGP10.phx.gbl...
> is there somewere online i could read about or look at this being done or
> something like it being done?
> "Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
> news:uxYGZUBUFHA.3652@.TK2MSFTNGP10.phx.gbl...
>|||that appears easy, but how will i define what data goes into what column in
the table since my data in the file looks like this:
BMW325i20051212 65222 John Smith
its:
Car: BMW
Model: 3251
Year: 20051212
Price: 65222
Buyer: John Smith
and so on.
"Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
news:O0YBSwBUFHA.2556@.TK2MSFTNGP12.phx.gbl...
> not sure about that
> actually it's really not that complicated
> step 1 - create dts package
> step 2 - call tht package from the app to load data
> step 3 - call stored proc that validates loaded data
> --
> Ilyan Mishiyev
> IGM Consulting Corporation
> Enterprise Web Solutions
> www.igmcc.com
>
> "microsoft.news.com" <CSharpCoder> wrote in message
> news:ebXU5cBUFHA.736@.TK2MSFTNGP10.phx.gbl...
>|||Is it a fixed length file?
Do you know the layout of this file?
For example,
from 1st character to 5th, field 1
from 6th character to 12th, field 2, etc.
If this is a fixed length file and you do know what the layout is, then you
can specify that when creating a dts package.
If it's a delimited file ( i don't think it's a delimited file by looking at
data ), then specify what the delimiter ( comma, semicolon, pipe, etc. ) is
so dts knows how to split that data into fields.
Then, when that package is called by your application, all the data will
automatically be loaded into the specified fields.
Try creating a package first and load that data manually.
Ilyan Mishiyev
IGM Consulting Corporation
Enterprise Web Solutions
www.igmcc.com
"microsoft.news.com" <CSharpCoder> wrote in message
news:uIr9U8BUFHA.2820@.tk2msftngp13.phx.gbl...
> that appears easy, but how will i define what data goes into what column
> in the table since my data in the file looks like this:
> BMW325i20051212 65222 John Smith
>
> its:
> Car: BMW
> Model: 3251
> Year: 20051212
> Price: 65222
> Buyer: John Smith
> and so on.
>
> "Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
> news:O0YBSwBUFHA.2556@.TK2MSFTNGP12.phx.gbl...
>