Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ragh
Starting Member
34 Posts |
Posted - 2004-03-11 : 00:23:21
|
| Hi guys,I have a problem and i think it can be done very nicely in SQL Server itself instead of using VC++.The Scenario:I get some text files(XXXXfd.txt) where XXXX=Areaname and fd = Fixed Deposits - Naming convention used.Now i put these files into a folder in C:\FilesArrived.Then when i run the program it will convert each line in this file into a row in tableXXX.Now i want this to be made in SQL Server, i think a store proc can make this operation.can u guys help me with a code, pleaseethen text file format will be as follows:---All i want is to fectch each line from a textfile from specified folder and put it in a table, if the same details exists then overwrite with newly arrived textfile or else leave it as it is.---This is the file i get in filexxx.txt format" 1010 ";"SHIPOO";"FD ";"GHARE GAJANAN RAGHUNATH ";"120350 ";"12/11/1999";"RIRD ";" 1670600";"1050";" 1935200";"12/11/2002";" 2279900";"21/04/2001";**just copy and paste it in notepad..** ** The semi-colon represents Seperator**I hope u guys will help me !thanks in Adv, and warm regardsRagh |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-03-11 : 00:26:34
|
| Look in Books Online under "BULK INSERT" and "bcp". You'll find a lot of information on how you can use them for this task. |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
|
|
|
|
|