text file import HELP !!!!! 
Author Message
 text file import HELP !!!!!

I was wondering if you could give some advice with this:
I periodically receive a text file, with fixed length
columns. There are no delimiters. I need to insert this
data into a database, performing several minor
modifications such as changing adding dashes to some
fields, date formats, etc., on-the-fly.

We are currently using SQL 2000 desktop edition
How do I set up a DTS or bpc package/T-SQL storedproc/VB
app that will
dynamically import this text file into a SQL Server table ?

This import must also be selective, I need setup a index
that includes 3 or 4 fields and only import new data that
is not on the table, when those 3 or 4 fields do not match.

I remember in FoxPro I can create a index of multiple
fields (index on field_a+field_b+field_c to IndexName)
can something like this be accomplished on SQL to ? I'm
sure, but I don't know how. Please help.

Thanks in advance

.



Tue, 27 Sep 2005 13:54:35 GMT
 text file import HELP !!!!!

Hello, Humberto!

You can create a DTS package that does everything you need and then you can
schedule it.  At predefined intervals from then on SQL Server will fire the
package and import the text file.

Importing A Text File Using The DTS Wizard
http://www.sqldts.com/default.aspx?6,107,276,7,1

Building a Package in the DTS Designer
http://www.sqldts.com/default.aspx?6,107,278,7,1

If the import needs to be selective then what I like to do in any event is
import text files into scratch tables of their own.  I can then leverage the
full power of TSQL against the table and use it to compare and manipulate.

For you this would most likely involve a LEFT OUTER JOIN on the Scratch
table to the Real table comparing the key columns.

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

: We are currently using SQL 2000 desktop edition
: How do I set up a DTS or bpc package/T-SQL storedproc/VB
: app that will
: dynamically import this text file into a SQL Server table ?

: This import must also be selective, I need setup a index
: that includes 3 or 4 fields and only import new data that
: is not on the table, when those 3 or 4 fields do not match.

: I remember in FoxPro I can create a index of multiple
: fields (index on field_a+field_b+field_c to IndexName)
: can something like this be accomplished on SQL to ? I'm
: sure, but I don't know how. Please help.

: Thanks in advance

      ---  Microsoft Outlook Express 5.00.2314.1300



Tue, 27 Sep 2005 14:35:21 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Importing text from Text file- Help needed

2. DTS Import Error When Importing Text File

3. Importing text files into SQL Server 2000 Database using DTS Import/Export Wizard

4. Help Importing a text file with DTS Wizard

5. HELP - Errors on Importing Text file

6. Error Import Text File - Help me

7. help needed - importing a text file

8. Help importing text files into SQL tables

9. NEED HELP IMPORTING TEXT FILE

10. help with import of text files

11. Help with DTS and ActiveX Script to import text file to a table

12. Help: Using BCP to import a text file


 
Powered by phpBB® Forum Software