------*********$$$$$$$ SQL Text IMPORT HELP !!!! $$$$$$*******------------ 
Author Message
 ------*********$$$$$$$ SQL Text 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:57:54 GMT
 ------*********$$$$$$$ SQL Text IMPORT HELP !!!! $$$$$$*******------------

What do you mean by periodically?  Once a day?  Once every two weeks?

One way you can approach this is writing a small DTS package that looks
on the file system for your import file.  Pull everything into a working
table.  Not
a #tmp table, but a table for temporary usage.  Once you have the data in
this temp
table, you can have the package process the insert into your perm table,
based on
your criteria for non duplicates.

After you're done, purge the table and rename or move the processed file.

If you get the file several times a day, you can have a job fire off every
10 minutes or so
to look for the file.  If it finds it, start the DTS package.



Tue, 27 Sep 2005 14:18:32 GMT
 ------*********$$$$$$$ SQL Text IMPORT HELP !!!! $$$$$$*******------------
You can setup DTS to point to this file and then setup ActiveX scripts that
add all the embelishments that you need. You can lookup the SQL Server BOL
on how to do this..
--
HTH,
SriSamp
Please reply to the whole group only!


Quote:
> 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 20:52:47 GMT
 ------*********$$$$$$$ SQL Text IMPORT HELP !!!! $$$$$$*******------------
What you do is import the data in a temporary table and
the use ActiveX scripts modification and then insert into
the permanent table. All these can be in one DTS package.

Rabindra Das

Quote:
>-----Original Message-----
>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

>..

>.



Thu, 29 Sep 2005 15:59:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. ------*********$$$$$$$ SQL Text IMPORT HELP !!!! $$$$$$*******------------

2. ------*********$$$$$$$ SQL Text IMPORT HELP !!!! $$$$$$*******------------

3. Importing text from Text file- Help needed

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

5. Help--Control DTS import text file to SQL Server 7

6. Help importing text files into SQL tables

7. Help! Importing Text Data into SQL Server 7.0

8. Import text file in SQL Server 6.5 via SQL in Visual Basic

9. Import text file in SQL Server 6.5 via SQL in Visual Basic

10. Import text file in SQL Server 6.5 via SQL in Visual Basic

11. DTS Import Error When Importing Text File

12. HELP - Errors on Importing Text file


 
Powered by phpBB® Forum Software