I am going to import 2 columns (out of ten) from a CSV to
a database in SQL Server 2000.
I would like how can I choose these 2 columns ? In DTS
Import / Export Wizard, I click the Transform button.
Should I change the source columns to "Ignore" for those I
don't want to import OR change the destination ones ?
Besides, for the table I am importing data, there is a
column that is non-nullable that may cause problem when I
import the columns. Is there any suggestion how to fix
it ?
Thanks
.You will have to ignore those columns, by selecting ignore from the combo
box - you are right.
Or simply, you could write a query that selects only the required columns,
and use that as your source, instead of a table.
If your target column in non-nullable and if you think your source has
NULLs, then you could use a COALESCE or ISNULL function in your source query
to replace those NULLs with something suitable.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:2dcd901c46a34$f76520a0$a301280a@.phx
.gbl...
I am going to import 2 columns (out of ten) from a CSV to
a database in SQL Server 2000.
I would like how can I choose these 2 columns ? In DTS
Import / Export Wizard, I click the Transform button.
Should I change the source columns to "Ignore" for those I
don't want to import OR change the destination ones ?
Besides, for the table I am importing data, there is a
column that is non-nullable that may cause problem when I
import the columns. Is there any suggestion how to fix
it ?
Thanks
.|||Thank you for your advice.
I would like to know should I select "Ignore" in Source
Columns only?
The table is already full and I just have to import data
to 2 columns only (1 is the key).
Actually the column causes problem is not my target column
(A column I don't import anything but it is only a non-
nullable field only) and I should not update the
production data.
Thanking you in anticipation.
>--Original Message--
>You will have to ignore those columns, by selecting
ignore from the combo
>box - you are right.
>Or simply, you could write a query that selects only the
required columns,
>and use that as your source, instead of a table.
>If your target column in non-nullable and if you think
your source has
>NULLs, then you could use a COALESCE or ISNULL function
in your source query
>to replace those NULLs with something suitable.
>--
>HTH,
>Vyas, MVP (SQL Server)
>http://vyaskn.tripod.com/
>Is .NET important for a database professional?
>http://vyaskn.tripod.com/poll.htm
>
>"Peter" <anonymous@.discussions.microsoft.com> wrote in
message
> news:2dcd901c46a34$f76520a0$a301280a@.phx
.gbl...
>I am going to import 2 columns (out of ten) from a CSV to
>a database in SQL Server 2000.
>I would like how can I choose these 2 columns ? In DTS
>Import / Export Wizard, I click the Transform button.
>Should I change the source columns to "Ignore" for those I
>don't want to import OR change the destination ones ?
>Besides, for the table I am importing data, there is a
>column that is non-nullable that may cause problem when I
>import the columns. Is there any suggestion how to fix
>it ?
>Thanks
>
>..
>
>.
>
Showing posts with label toa. Show all posts
Showing posts with label toa. Show all posts
Sunday, March 25, 2012
DTS Problem
I am going to import 2 columns (out of ten) from a CSV to
a database in SQL Server 2000.
I would like how can I choose these 2 columns ? In DTS
Import / Export Wizard, I click the Transform button.
Should I change the source columns to "Ignore" for those I
don't want to import OR change the destination ones ?
Besides, for the table I am importing data, there is a
column that is non-nullable that may cause problem when I
import the columns. Is there any suggestion how to fix
it ?
Thanks
..
You will have to ignore those columns, by selecting ignore from the combo
box - you are right.
Or simply, you could write a query that selects only the required columns,
and use that as your source, instead of a table.
If your target column in non-nullable and if you think your source has
NULLs, then you could use a COALESCE or ISNULL function in your source query
to replace those NULLs with something suitable.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:2dcd901c46a34$f76520a0$a301280a@.phx.gbl...
I am going to import 2 columns (out of ten) from a CSV to
a database in SQL Server 2000.
I would like how can I choose these 2 columns ? In DTS
Import / Export Wizard, I click the Transform button.
Should I change the source columns to "Ignore" for those I
don't want to import OR change the destination ones ?
Besides, for the table I am importing data, there is a
column that is non-nullable that may cause problem when I
import the columns. Is there any suggestion how to fix
it ?
Thanks
..
|||Thank you for your advice.
I would like to know should I select "Ignore" in Source
Columns only?
The table is already full and I just have to import data
to 2 columns only (1 is the key).
Actually the column causes problem is not my target column
(A column I don't import anything but it is only a non-
nullable field only) and I should not update the
production data.
Thanking you in anticipation.
>--Original Message--
>You will have to ignore those columns, by selecting
ignore from the combo
>box - you are right.
>Or simply, you could write a query that selects only the
required columns,
>and use that as your source, instead of a table.
>If your target column in non-nullable and if you think
your source has
>NULLs, then you could use a COALESCE or ISNULL function
in your source query
>to replace those NULLs with something suitable.
>--
>HTH,
>Vyas, MVP (SQL Server)
>http://vyaskn.tripod.com/
>Is .NET important for a database professional?
>http://vyaskn.tripod.com/poll.htm
>
>"Peter" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2dcd901c46a34$f76520a0$a301280a@.phx.gbl...
>I am going to import 2 columns (out of ten) from a CSV to
>a database in SQL Server 2000.
>I would like how can I choose these 2 columns ? In DTS
>Import / Export Wizard, I click the Transform button.
>Should I change the source columns to "Ignore" for those I
>don't want to import OR change the destination ones ?
>Besides, for the table I am importing data, there is a
>column that is non-nullable that may cause problem when I
>import the columns. Is there any suggestion how to fix
>it ?
>Thanks
>
>..
>
>.
>
a database in SQL Server 2000.
I would like how can I choose these 2 columns ? In DTS
Import / Export Wizard, I click the Transform button.
Should I change the source columns to "Ignore" for those I
don't want to import OR change the destination ones ?
Besides, for the table I am importing data, there is a
column that is non-nullable that may cause problem when I
import the columns. Is there any suggestion how to fix
it ?
Thanks
..
You will have to ignore those columns, by selecting ignore from the combo
box - you are right.
Or simply, you could write a query that selects only the required columns,
and use that as your source, instead of a table.
If your target column in non-nullable and if you think your source has
NULLs, then you could use a COALESCE or ISNULL function in your source query
to replace those NULLs with something suitable.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:2dcd901c46a34$f76520a0$a301280a@.phx.gbl...
I am going to import 2 columns (out of ten) from a CSV to
a database in SQL Server 2000.
I would like how can I choose these 2 columns ? In DTS
Import / Export Wizard, I click the Transform button.
Should I change the source columns to "Ignore" for those I
don't want to import OR change the destination ones ?
Besides, for the table I am importing data, there is a
column that is non-nullable that may cause problem when I
import the columns. Is there any suggestion how to fix
it ?
Thanks
..
|||Thank you for your advice.
I would like to know should I select "Ignore" in Source
Columns only?
The table is already full and I just have to import data
to 2 columns only (1 is the key).
Actually the column causes problem is not my target column
(A column I don't import anything but it is only a non-
nullable field only) and I should not update the
production data.
Thanking you in anticipation.
>--Original Message--
>You will have to ignore those columns, by selecting
ignore from the combo
>box - you are right.
>Or simply, you could write a query that selects only the
required columns,
>and use that as your source, instead of a table.
>If your target column in non-nullable and if you think
your source has
>NULLs, then you could use a COALESCE or ISNULL function
in your source query
>to replace those NULLs with something suitable.
>--
>HTH,
>Vyas, MVP (SQL Server)
>http://vyaskn.tripod.com/
>Is .NET important for a database professional?
>http://vyaskn.tripod.com/poll.htm
>
>"Peter" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2dcd901c46a34$f76520a0$a301280a@.phx.gbl...
>I am going to import 2 columns (out of ten) from a CSV to
>a database in SQL Server 2000.
>I would like how can I choose these 2 columns ? In DTS
>Import / Export Wizard, I click the Transform button.
>Should I change the source columns to "Ignore" for those I
>don't want to import OR change the destination ones ?
>Besides, for the table I am importing data, there is a
>column that is non-nullable that may cause problem when I
>import the columns. Is there any suggestion how to fix
>it ?
>Thanks
>
>..
>
>.
>
Sunday, March 11, 2012
dts package errors
I am transferring data from a text file to a table in SQL Server. Is
there any way to export the dts package logs or a similar error log to
a text file. I need to know if the errors are duplicate keys or
missing files. I don't know if I need to write some code or what I
need to do. Any help'It largely depends on what type of transformation you're using. If you are
using the Transform Data Task then on the options tab of the task properties
you can set a filename for the "Exception file". If you uncheck the '7.0
format' option and select the other 3 check boxes you'll get an exception
file and 2 other files - each containing the erroring rows. If you are using
the BULK INSERT task then there is no such granular option. You could try
package logging (right-click on the white background, "Package Properties",
"Logging" tab and "Error file:" text box) but AFAIR you don't get much
useful info there.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .|||I have tried the exception file but if the file does not exist there is
no error written to that file. I will need to know this.
Paul Ibison wrote:
> It largely depends on what type of transformation you're using. If you are
> using the Transform Data Task then on the options tab of the task properti
es
> you can set a filename for the "Exception file". If you uncheck the '7.0
> format' option and select the other 3 check boxes you'll get an exception
> file and 2 other files - each containing the erroring rows. If you are usi
ng
> the BULK INSERT task then there is no such granular option. You could try
> package logging (right-click on the white background, "Package Properties"
,
> "Logging" tab and "Error file:" text box) but AFAIR you don't get much
> useful info there.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
there any way to export the dts package logs or a similar error log to
a text file. I need to know if the errors are duplicate keys or
missing files. I don't know if I need to write some code or what I
need to do. Any help'It largely depends on what type of transformation you're using. If you are
using the Transform Data Task then on the options tab of the task properties
you can set a filename for the "Exception file". If you uncheck the '7.0
format' option and select the other 3 check boxes you'll get an exception
file and 2 other files - each containing the erroring rows. If you are using
the BULK INSERT task then there is no such granular option. You could try
package logging (right-click on the white background, "Package Properties",
"Logging" tab and "Error file:" text box) but AFAIR you don't get much
useful info there.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .|||I have tried the exception file but if the file does not exist there is
no error written to that file. I will need to know this.
Paul Ibison wrote:
> It largely depends on what type of transformation you're using. If you are
> using the Transform Data Task then on the options tab of the task properti
es
> you can set a filename for the "Exception file". If you uncheck the '7.0
> format' option and select the other 3 check boxes you'll get an exception
> file and 2 other files - each containing the erroring rows. If you are usi
ng
> the BULK INSERT task then there is no such granular option. You could try
> package logging (right-click on the white background, "Package Properties"
,
> "Logging" tab and "Error file:" text box) but AFAIR you don't get much
> useful info there.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
Subscribe to:
Posts (Atom)