Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

importing a .txt file
I have a .txt file that I need to add to an existing table, which is
made up of Varchar, Char, numeric and int fields.

What is the best way to do it.
The first thing I tried was importing the .txt file, and then going
into the design and changing the field type, but I hit problems on the
Numeric fields.

Then I tried changing the field types from varchar to different types
at the transfom stage of importing, but that failed too.

Regards,
Ciar=E1n


Report this thread to moderator Post Follow-up to this message
Old Post
chudson007@hotmail.com
04-28-05 12:23 PM


Re: importing a .txt file
I assume you're using DTS, but without knowing what "I hit problems"
means, it's hard to give a specific answer. One general approach is to
load the data into a staging table, which may have a different
structure or data types than the target table, then use TSQL to clean
up and transform the data before an INSERT into the target.

If this isn't helpful, you'll probably have to give some more details -
your MSSQL version, exactly how you're importing the data, what the
source data looks like, the DDL for the target table, the
problems/errors you got etc.

Simon


Report this thread to moderator Post Follow-up to this message
Old Post
Simon Hayes
04-28-05 12:23 PM


Re: importing a .txt file
I assume you're using DTS, but without knowing what "I hit problems"
means, it's hard to give a specific answer. One general approach is to
load the data into a staging table, which may have a different
structure or data types than the target table, then use TSQL to clean
up and transform the data before an INSERT into the target.

If this isn't helpful, you'll probably have to give some more details -
your MSSQL version, exactly how you're importing the data, what the
source data looks like, the DDL for the target table, the
problems/errors you got etc.

Simon


Report this thread to moderator Post Follow-up to this message
Old Post
Simon Hayes
04-28-05 12:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 09:27 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006