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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Reading Tab Delimited Text File

Author  Topic 

chava_sree
Yak Posting Veteran

56 Posts

Posted - 2008-03-28 : 17:24:09
Is there anyway Sql Server reads a "Tab Delimited Text File" and Compare each record with the Column in a table..

my question is..

I've a Country_Code table which has 3 letter Country Code and the Actual Country names are listed in a Tab Delimited Text File "Country Data" with Country Code and Country Name, how do i read each record and compare to get the Actual Country Name for Display.

any ideas/suggestions.

thanks

ocary
Starting Member

12 Posts

Posted - 2008-03-28 : 18:56:16
Import the text file to a table?
Go to Top of Page

chava_sree
Yak Posting Veteran

56 Posts

Posted - 2008-03-28 : 19:02:37
YES and compare that table (country names table) with Country code to get Actual Country Name.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-03-29 : 02:17:46
You can use BULKINSERT or bcp or Export/Import wizard for exporting text file to db.
Go to Top of Page
   

- Advertisement -