Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > help,a text how to sql table code ?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 17th July 03:56
linchi shea
External User
 
Posts: 1
Default help,a text how to sql table code ?


If the text is in a file, you can use bcp to import them into a table with
the desired columns. The bcp.exe command line would be similar to the
following (assuming that junk is the table name and junk.txt is the file
containing the text):

cmd>bcp myDB..junk in junk.txt -c -SmyServer -T -t "|"

If the text is already inside a single column in a table, you can use T-SQL
substring(), charindex(), and so on to parse the strings. But that's ugly.
I'd still would just bcp the column out to the file, and bcp the file back
into the table with multiple colunms.

Linchi
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666