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
>
>..
>
>.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment