dbTalk Databases Forums  

Import data from Excel-duplicate rows

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


Discuss Import data from Excel-duplicate rows in the microsoft.public.sqlserver.dts forum.



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

Default Import data from Excel-duplicate rows - 11-05-2003 , 09:26 AM






Hi, I use DTS to transfer data from Excel to SQL table.
There are some ids appear more than one times in the file
but I just want the latest one. How can I eliminate the
previous rows for the same id?
Thanks
Ava

Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Import data from Excel-duplicate rows - 11-05-2003 , 07:03 PM






How do you define the latest one? For the transform data
task, you can write a query that just selects the data you
want based upon whatever defines the latest one.

-Sue

On Wed, 5 Nov 2003 07:26:57 -0800, "Ava Meng"
<avameng (AT) yahoo (DOT) com> wrote:

Quote:
Hi, I use DTS to transfer data from Excel to SQL table.
There are some ids appear more than one times in the file
but I just want the latest one. How can I eliminate the
previous rows for the same id?
Thanks
Ava


Reply With Quote
  #3  
Old   
Ava
 
Posts: n/a

Default Re: Import data from Excel-duplicate rows - 11-06-2003 , 07:42 AM



Thanks, Sue,
They just append rows into Excel so the latest one should
be the one with the largest row number for the same id. I
don't know how I can define the condition.
Please help.
Thanks
Ava

Quote:
-----Original Message-----
How do you define the latest one? For the transform data
task, you can write a query that just selects the data you
want based upon whatever defines the latest one.

-Sue

On Wed, 5 Nov 2003 07:26:57 -0800, "Ava Meng"
avameng (AT) yahoo (DOT) com> wrote:

Hi, I use DTS to transfer data from Excel to SQL table.
There are some ids appear more than one times in the
file
but I just want the latest one. How can I eliminate the
previous rows for the same id?
Thanks
Ava

.


Reply With Quote
  #4  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Import data from Excel-duplicate rows - 11-06-2003 , 01:16 PM



I know you can work with importing ranges in a
worksheet...maybe you could work off of that and manage your
imports that way. You can find an example of importing a
named range at:
http://www.sqldts.com/default.aspx?243

-Sue

On Thu, 6 Nov 2003 05:42:53 -0800, "Ava"
<anonymous (AT) discussions (DOT) microsoft.com> wrote:

Quote:
Thanks, Sue,
They just append rows into Excel so the latest one should
be the one with the largest row number for the same id. I
don't know how I can define the condition.
Please help.
Thanks
Ava

-----Original Message-----
How do you define the latest one? For the transform data
task, you can write a query that just selects the data you
want based upon whatever defines the latest one.

-Sue

On Wed, 5 Nov 2003 07:26:57 -0800, "Ava Meng"
avameng (AT) yahoo (DOT) com> wrote:

Hi, I use DTS to transfer data from Excel to SQL table.
There are some ids appear more than one times in the
file
but I just want the latest one. How can I eliminate the
previous rows for the same id?
Thanks
Ava

.



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.