Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Simple sql

Author  Topic 

John Till Man
Starting Member

9 Posts

Posted - 2009-03-04 : 09:00:11
Hi folks I am needing to import data from a xls field to a dbf table. Both have a common field (column) which would be the index to insure data in correct row.
Help please

I have excel 2000 v 9.0.3821 SR-1
and
Microsoft SQL Server Management Studio 10.0.1600.22 ((SQL_PreRelease).080709-1414 )
Microsoft Data Access Components (MDAC) 2000.085.1132.00 (xpsp.080413-0852)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 7.0.5730.11
Microsoft .NET Framework 2.0.50727.3053
Operating System 5.1.2600

John Till Man

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-04 : 09:04:55
make use SSIS Export import task or OPENROWSET.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-03-04 : 09:06:27
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

John Till Man
Starting Member

9 Posts

Posted - 2009-03-04 : 09:13:44
Give me a chance Madhivanan.

That is easy to say but how do I do Yak Knowledge.

John Till Man





John M Cowan
Go to Top of Page

John Till Man
Starting Member

9 Posts

Posted - 2009-03-04 : 11:16:21
Hi all you clever people HELP please.
Would it be best to import the xls as a new bdf then write a procedure. If so HOW??

John M Cowan
Go to Top of Page

John Till Man
Starting Member

9 Posts

Posted - 2009-03-05 : 02:26:03
Come on guys/girls give me some help here

John M Cowan
Go to Top of Page

John Till Man
Starting Member

9 Posts

Posted - 2009-03-05 : 04:28:52
Come on guys/girls give me some help here

This IS a starters forum

JOhn Till Man
Go to Top of Page

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-03-05 : 04:53:23
The link there explains it. Did you go thru it ?
Go to Top of Page

John Till Man
Starting Member

9 Posts

Posted - 2009-03-05 : 10:56:36
Thank you sakets 2000

That is getting there but I need to be more specific.

The excell sheet contains information about customers products I need to get into the BDF table. Thay have a common reference for
each product the BarCode No., so I need to pick up, for instance, the suppliers reference No for each product and put it in suppliers reference field in the dbf table.
There are not exactely the same No of products in excell and DBF so cannot just copy in the column as then the BarCode No would not be linked to correct suppliers reference.
To complicate things the BarCode No is held in one table with a product code No for each product that is commom and is the Index to the table that holds the suppliers reference field.
These all come together on a form for each product in the application but I do not want to have to go through 1600 plus forms to add the, for instance, suppliers code.
My thoughts are to 1st put the dbf tables common product code into the spread sheet into the correct rows with the BarCode. The product code could them be used to put the suppliers code in the correct row in the BDF table.
The question is how? I am sure I am missing somthing and there is a resonably easy way to do this. As I said before, I am a starter with SQL data bases.

Hope this makes sense.

John Till Man
Go to Top of Page

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-03-05 : 11:04:30
Why don't you post the structure of the tables, excel sheet, sample data and output. It'll be a lot easier helping you then.
Go to Top of Page

John Till Man
Starting Member

9 Posts

Posted - 2009-03-05 : 11:26:58
Thank you sakets_2000

I must go out now and then have to go to one of my customers in Scotland (I am in Norfolk UK that is 400+ miles each way so going to make a long weekend of it as son lives in Scotland) and will get back to this on Tuesday next week.

John Till Man
Go to Top of Page

John Till Man
Starting Member

9 Posts

Posted - 2009-03-10 : 14:21:28
Hi Folks
Back safe and sound with jobs done so I need to get my problem sorted if you experts (especialy sakets_2000) can help.. I have posted all the data to:- http://www.mailbigfile.com/e99e22080e665e7c09d7ca66145a26eb/listFiles.php

Any help greatly appreciated

John Till Man
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2009-03-10 : 17:00:39
Personally, if there is massaging of data that must occur, I would import the entire spreadsheet as is. Define what data from that needs to go where and write the appropriate TSQL scripts to accomplish the tasks. I apologize but from work I cannot access your posted data (darn web-blockers). I may have more when I get home and see what you've provided. Madhivanan has definitely provided what I would consider a great starting point to at least get your data into SQL. Once it's there, the particulars should be somewhat easy to accomplish - IMO.

Terry

-- Procrastinate now!
Go to Top of Page
   

- Advertisement -