473,769 Members | 6,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

import data

I'm basically a database noob hoping to find a shortcut if at all possible.

I've created an ER diagram for a site I plan to build and have used that to
create the database in MS SQL 2000.

Now I want to import various data from (basically) excel spreadsheets (for
example, company names from a different sql dbase, addresses from excel and
phone numbers from a csv file) into the new database.

I have tried various methods outlined on web sites (including DTS) and have
learned I need to go back and create default values for essentially every
non-null field if I am to update literally any linked table.

My question is this: Is there any easy way/program via which I can import
the data to two different tables -- i.e. address into one table and
corresponding city into another table -- and have the relationship(s)
continue?

Or alternatively is there a "better/easy" way to do it inside sql once I
import the entire data into it's own single table?

Not to belabor the point (versus to more fully explain), but say I have two
data sets

[ Company Name | Address ]

and

[ Company Name | Phone ]

and I want to import them both into a database with separate three tables:

1. Company Name
2. Address
3. Phone

What is the least labour intensive way to effect this??

Thanks in advance

May 3 '07 #1
2 1872
Also, (though it is the same issue essentially) what if the first
dataset is Company Name, Address, City where each different city is
listed from 1 to ? number of times -- is there a way the dbase can
know that say New York only needs to be added once to a City table and
then the other tables just have a reference to that ID in the city
table?

"Mark S" <bo*@bob.comwro te in message
news:GVc_h.1569 92$aG1.70770@pd 7urf3no...
I'm basically a database noob hoping to find a shortcut if at all
possible.

I've created an ER diagram for a site I plan to build and have used that
to create the database in MS SQL 2000.

Now I want to import various data from (basically) excel spreadsheets (for
example, company names from a different sql dbase, addresses from excel
and phone numbers from a csv file) into the new database.

I have tried various methods outlined on web sites (including DTS) and
have learned I need to go back and create default values for essentially
every non-null field if I am to update literally any linked table.

My question is this: Is there any easy way/program via which I can import
the data to two different tables -- i.e. address into one table and
corresponding city into another table -- and have the relationship(s)
continue?

Or alternatively is there a "better/easy" way to do it inside sql once I
import the entire data into it's own single table?

Not to belabor the point (versus to more fully explain), but say I have
two data sets

[ Company Name | Address ]

and

[ Company Name | Phone ]

and I want to import them both into a database with separate three tables:

1. Company Name
2. Address
3. Phone

What is the least labour intensive way to effect this??

Thanks in advance

May 3 '07 #2
Mark S wrote:
Not to belabor the point (versus to more fully explain), but say I have two
data sets

[ Company Name | Address ]

and

[ Company Name | Phone ]

and I want to import them both into a database with separate three tables:

1. Company Name
2. Address
3. Phone

What is the least labour intensive way to effect this??
I would create a table with columns (name, address, phone), import
into it, then use queries to copy its data to the other tables.
May 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1823
by: Olivier Noblanc ATOUSOFT | last post by:
Hello, In the botom of this post you will see my source code. The problem is when i launch main.py that doesn't make anything why ? Thanks olivier noblanc Atousoft http://www.logiciel-erp.fr
3
6272
by: Doug Baroter | last post by:
Hi, One of my clients has the following situation. They use Access DB for data update etc. some business functions while they also want to view the Access data quickly and more efficiently in SQL Server 2000. Huge Access db with over 100 user tables, over 60 MB data. The DTS package that comes with SQL Server 2000 seems pretty "messy" in the sense that it assumes that one needs to do one time import only or accurately it does not...
1
9755
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no control. It outputs all text fields surrounded by quotes, and all numeric fields w/o quotes. All fields are separated with commas. This has been working for 2 years, until today, when one of the data fields
1
6703
by: Dan | last post by:
Could someone please help me with auto importing a series of data files into an Access table. I tried to follow code given below in a previous messagebut i'm getting error messages. Here's my database stats: Path: C:\Database (contains the database and all the text files to be imported) Text files to import: (SampleData4.txt and SampleData3.txt as testing examples)
4
3025
by: Steve Jorgensen | last post by:
I'm restarting this thread with a different focus. The project I'm working on now id coming along and will be made to work, and it's too late to start over with a new strategy. Still, I'm not coming to a firm conclusion over whether it was the better approach, and wonder if I should do it differently the next time I'm faced with a similar issue. I needed an app to automatically import from spreadsheets with a semi-dynamic structure,...
3
3717
by: deko | last post by:
I've been trying to use the Access Import Wizard to expedite importing data into my mdb. The nice thing about the wizard is that I can import from different file formats - txt, xls, even Outlook - and dump everything into a table. The problem is once I have the data imported into a new table, I can't do much with it. If I try to run an Append query and insert data from the new table into an existing table, the query fails - "Error...
10
2562
by: shumaker | last post by:
I don't need a detailed description of a solution(although I wouldn't mind), but I am hoping someone could tell me in general the best path to go about accomplishing a task, since I don't know all the capabilities of what I have available. I can learn the details myself I think. I am trying to set this up to be as simple to use as possible since others will be importing data on a weekly or daily basis. I need to import some text files,...
4
6110
by: Bruce W. Roeser | last post by:
All, I'm reading a book by Charles Petzold (Programming VS.Net). Pretty good content but am confused about the difference. From the text: ---------------------------------------------------------------------------------------------------------------------------------------------------------- The @ Import Directive Next to @ Page, the directive that ASP.NET programmers use the most is @ Import. The @ Import directive is ASP.NET's...
3
2304
by: Chris | last post by:
Hi, 1) In file test.aspx, i put: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %> <%@ import namespace="System.Data"%> <%@ import namespace="System.Data.OleDb"%> .... In file test.aspx.vb, i put:
10
1602
by: nisp | last post by:
Hi all ! I'm trying to capture stderr of an external module I use in my python program. I'm doing this by setting up a class in my module overwriting the stderr file object method write. The external module outputs to stderr this way: from sys import std err
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3963
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.