dbTalk Databases Forums  

Importing 2 columns only

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Importing 2 columns only in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter
 
Posts: n/a

Default Importing 2 columns only - 07-14-2004 , 09:47 PM






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



Reply With Quote
  #2  
Old   
Francesco Anti
 
Posts: n/a

Default Re: Importing 2 columns only - 07-15-2004 , 04:20 AM






"Peter" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
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 ?
See the previous answer of Darren Green
"Only map transformations for the columns you are interested in, and ignore
the others, or if using auto-generated trasnforms, go back and delete the
additional ones."

Quote:
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 ?
You can define a Default value for the column, or add an ActiveX Script
Transformation in your DTS that sets a default value for the column

Quote:
Thanks






Reply With Quote
  #3  
Old   
Francesco Anti
 
Posts: n/a

Default Re: Importing 2 columns only - 07-15-2004 , 04:23 AM



"Peter" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
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 ?
Read the previous Post of Darren Green
"Only map transformations for the columns you are interested in, and ignore
the others, or if using auto-generated trasnforms, go back and delete the
additional ones."

Quote:
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 ?
You can define a Default value for the column, or add an ActiveX Script
Transformation in your DTS that sets a default value for the column

Quote:
Thanks







Reply With Quote
  #4  
Old   
Peter
 
Posts: n/a

Default Re: Importing 2 columns only - 07-15-2004 , 06:57 PM



Thank you for your advice.

Do you mean that I only have to select "Ignore" for those
columns in thte Source BUT not in the Destination ?

The table is full and I have to update 2 columns (1 is the
key to identify the column and another column). The non-
nullable column is not a column I have to import and it
contains production data.

Thanking you in anticipation


Quote:
-----Original Message-----
"Peter" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:2d1ef01c46a16$13018cf0$a401280a (AT) phx (DOT) 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 ?

See the previous answer of Darren Green
"Only map transformations for the columns you are
interested in, and ignore
the others, or if using auto-generated trasnforms, go
back and delete the
additional 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 ?

You can define a Default value for the column, or add an
ActiveX Script
Transformation in your DTS that sets a default value for
the column

Thanks





.


Reply With Quote
  #5  
Old   
Francesco Anti
 
Posts: n/a

Default Re: Importing 2 columns only - 07-19-2004 , 03:03 AM



"Peter" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thank you for your advice.

Do you mean that I only have to select "Ignore" for those
columns in thte Source BUT not in the Destination ?
I mean you have to delete the mapping between the two columns in the
"Transformation" tab of the Transform Data Task

Quote:
The table is full and I have to update 2 columns (1 is the
key to identify the column and another column). The non-
nullable column is not a column I have to import and it
contains production data.
See BOL About DTS Data Driven Query...you may define insert and update
query.
Or you may use a temporary table to retrieve your Excel data and then use an
"Execute SQL" task to do an update query.

Quote:
Thanking you in anticipation





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.