SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Export top(n) rows from Excel


Export top(n) rows from Excel

Author
Message
engg.pankaj
engg.pankaj
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 20
Hi,

I am trying to export only top (100) rows from an excel source. I added the excel file to the source, went to Source properties and changed the OpenRowset from Sales to Sales$A2BigGrin101, so that it would read only first 100 rows. Now, the excel source gives me an error saying "The external columns of component "Excel Source" are out of sync with the data source...."

Can someone please tell me where am i going wrong?

Thanks
subbu1
subbu1
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1049 Visits: 695
if you will use ssis
pls follow given steps.
(1)create excle connection..
(2) go to excel sourse after that Data acess mode:sql commane
SELECT TOP 100 *
FROM [Sheet1$]

(3) after map the excel sourse to oledb destination...
engg.pankaj
engg.pankaj
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 20
Thanks much Smile
raghavender.2369
raghavender.2369
SSC Journeyman
SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)SSC Journeyman (79 reputation)

Group: General Forum Members
Points: 79 Visits: 391
col1 col2 col3
5.0 6.0 3.5
9.5 9.8 6.3
9.0 6.0 8.0
Col4 col5 col6
9.5 6.0 8.0
6.3 9.3 3.9
8.7 8.0 8.8
9.0 8.3 6.9
8.6 9.0 6.2

I have data like this in excel, how to load into 2 different tables
first table contain col1,col2,col3 as columns
second table contain Col4,col5,col6 as columns.

Note: Here the number of columns are fixed(3).
anthony.green
anthony.green
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10106 Visits: 6336
raghavender.2369 (11/30/2012)
col1 col2 col3
5.0 6.0 3.5
9.5 9.8 6.3
9.0 6.0 8.0
Col4 col5 col6
9.5 6.0 8.0
6.3 9.3 3.9
8.7 8.0 8.8
9.0 8.3 6.9
8.6 9.0 6.2

I have data like this in excel, how to load into 2 different tables
first table contain col1,col2,col3 as columns
second table contain Col4,col5,col6 as columns.

Note: Here the number of columns are fixed(3).

Do not hijack other peoples threads, you have already created your own thread here, please be patient, we are all unpaid volunteers who help in our spare time.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search