General Forum - Forums about everything!




General Tech General discussion for tech related things that don't fit specifically in one of the categories here. Talk about gadgets in here too!

Go Back   General Forum > General > Technology > General Tech

» Sponsored Ads
 



160X600 - Love Your New Phone

Reply
 
Thread Tools Display Modes
  #1 
Old 06-15-2006, 11:03 AM
abbysomeone00
Registered Member
 
Loading a text file into Sql Server

I'm trying to load a sql server 2000 table with a text file where the table needs to be in the order of the .txt file. Each line of text is a record in the table. Sometimes the lines load in proper order, but more often they don't. How can I force the lines to load in the proper order? It's done in a DTS package, but I also get the same problem when I load it using the DTS wizard. Each row in the table is a line of text, so there's nothing I can use to order by



Join GeneralForum.com Today!

Join GeneralForum.com today for FREE!

GeneralForum.com is the fastest growing general forum on the web!

  • Join thousands of discussions on every topic imaginable!
  • Chat with people from all over the world in real time!
  • Play live games with other members in real time! 
  • Make new friends, discuss new ideas, talk about whatever!
  • Yes, it's free! What are you waiting for? DO IT NOW!
» Click here to join the fun!

  #2 
Old 06-15-2006, 12:01 PM
Hybrix's Avatar
Hybrix
Través del Espejo
 
Can you post a sample few lines from the file? That way I can see exactly what you mean. Just edit out important information with XXXXX if necessary when you post it. Thanks.
  #3 
Old 06-21-2006, 10:15 AM
abbysomeone00
Registered Member
 
Here's a sample. (data may have wrapped to another line) There can be more than 20 pages in the file. Each line in the file is loaded as a row in the table. The order is important because information for a customer is grouped in the 5 lines beginning w/ the one above My NAME. I look for keywords and take information from 3 of the lines to use in subsequent steps. If they aren't loaded in this exact order, customer information gets mixed up. Sometimes the file loads properly, but usually it doesn't (eg. Part of page 3 is loaded before the beginning of the file, etc). Could it be a buffering problem?

PageHeading1 :06-04-2006 DATE:06-04-2006 TIME:12:39:36 PAGE: 1
Report Title
Report date 06-04-2006
Other Heading Line

T TYPE CODE AMOUNT DATE TIME Rep Comment
----------------------------------------------------------------------------------
Q XXXXXXXXXXXXXXXXXxxxxxx 21.36 06-04 11:36 028287 xxx xxxxx xxxxx xxxx xx xx xxx
My NAME : Joe Smith
My Customer# : 12345678
My zip code : 12345
My email : xxx@xxx.xxx
C XXXXXXXXXXXXXXXXXxxxxxx 10.00 06-04 11:36 028288 xxx xxxxx xxxxx xxxx xx xx xxx
My NAME : Bob Smith
My Customer# : 213456789
My zip code : 23456
My email : xxxx@xxx.xxx
G XXXXXXXXXXXXXXXXXxxxxxx 24.46 06-04 11:36 028289 xxx xxxxx xxxxx xxxx xx xx xxx
My NAME : Roger Smith
My Customer# : 34567
My zip code : 44646
My email : xxxxxxxx@xxxxx.xxx
H XXXXXXXXXXXXXXXXXxxxxxx 31.95 06-04 11:36 028290 xxx xxxxx xxxxx xxxx xx xx xxx
My NAME : Sue Smith
My Customer# : 98765
My zip code : 49876
My email : xxxxxxxxxxxxxxxx@xxxxxxxxxxxxxxx.xx
Q XXXXXXXXXXXXXXXXXxxxxxx 21.16 06-04 11:36 028291 xxx xxxxx xxxxx xxxx xx xx xxx
My NAME : Nancy Smith
My Customer# : 87654
My zip code : 43522
My email : xxxxxxxxxxxxxxxxxxxxx@xxxxx.xxx
F XXXXXXXXXXXXXXXXXxxxxxx 39.00 06-04 11:36 028292 xxx xxxxx xxxxx xxxx xx xx xxx
My NAME : Terry Smith
My Customer# : 22732
My zip code : 33511
My email : xxxxxxx@xxxxxxxxxxxxx.xxx
  #4 
Old 06-28-2006, 01:29 AM
Hybrix's Avatar
Hybrix
Través del Espejo
 
What are you using to import the data? It looks pretty standard from what I can tell..
  #5 
Old 07-19-2006, 07:46 PM
abbysomeone00
Registered Member
 
I'm using a DTS package in SQL Server 2000. I also tried to load it using the DTS wizard and get the same result - sometimes it loads ok, sometimes it doesn't.
  #6 
Old 07-19-2006, 08:11 PM
Hybrix's Avatar
Hybrix
Través del Espejo
 
Are you able to break it up into multiple files and import them individually? It might be that the file is too big and is using too many system resources when importing it.
  #7 
Old 07-24-2006, 09:41 AM
abbysomeone00
Registered Member
 
No, it can't be broken up into smaller files. Could it be a buffering problem? The DTS pkg had a row size of 8000. I switched it to 255 & played around w/ other numbers, but it didn't seem to help.
  #8 
Old 07-25-2006, 10:55 PM
Albey's Avatar
Albey
Registered Member
 
Are yo just tring to place the info in the correct place? so you can search for it later?
  #9 
Old 08-01-2006, 09:23 AM
abbysomeone00
Registered Member
 
I'm trying to load the text file in the original order so I can search for keywords to extract information on different lines for a particular customer. Customer information is grouped together over several lines, so I need it to be in the order it occurs in the text file
Closed Thread

  General Forum > General > Technology > General Tech

Bookmarks



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




 


All times are GMT -6. The time now is 01:53 AM.

Powered by: vBulletin | Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Site designed and maintained by NURV® Original Concepts, Graphics, and Design Copyright © NURV® 2010
All user submitted content, threads and posts becomes the copyright-protected property of GeneralForum.com unless previously copyrighted.
The views and opinions expressed on this site are not necessarily the views of the staff or administration.
We are not responsible, nor can we be held liable for information posted on this site, or what it influences you to do.
Rules & Privacy Policy

3D Motion Graphics | Poker Design | Web Design | Mafia Graphics | Pop Culture News | Money Forum | Make Money Online | Stephen King