Author |
Topic |
gsrinivas.
Yak Posting Veteran
56 Posts |
Posted - 2009-06-12 : 03:37:31
|
dear sql team ,how to inserting a text file into a column?-GSrinivas. |
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-06-12 : 03:43:23
|
create a column with text datatype and insert as usual..Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
|
|
gsrinivas.
Yak Posting Veteran
56 Posts |
Posted - 2009-06-12 : 04:46:03
|
dear senthil,I have done that basic operation also butthe column accepts 256 characters only.remaing file ...omitted. even i used 'text' data type... no result..-thanks |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-12 : 05:15:36
|
Maybe the following story:Your insert was successful.You have used query analizer to check if data is in table.Query analizer truncates the OUTPUT to 256 Chars without telling that...You can configure that in query analizer.GreetingsWebfred No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-06-12 : 05:26:13
|
quote: Originally posted by webfred Maybe the following story:Your insert was successful.You have used query analizer to check if data is in table.Query analizer truncates the OUTPUT to 256 Chars without telling that...You can configure that in query analizer.GreetingsWebfred No, you're never too old to Yak'n'Roll if you're too young to die.
Ya Query analyzer will truncate better u use enterprise manager!Run the Query in Enterprise Manager!Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
|
|
gsrinivas.
Yak Posting Veteran
56 Posts |
Posted - 2009-06-12 : 10:37:06
|
in enterprize manager also it is not showing even one character also.hear my text file containing 200 lines is it possible.thanks-srinivas |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-12 : 11:17:58
|
SQL Query Analyzer:Tools, OptionsMove to the Results tab and locate the Maximum characters per column. It’s set by default to 256, but you can change that to around 4096 for example.Now you should see your data when executing your select. No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
gsrinivas.
Yak Posting Veteran
56 Posts |
Posted - 2009-06-13 : 08:59:31
|
thank you webfred,just a small doubt,i insert the text actually stdio.h file from c language.it is showing in one line...can you tell show as it is file stdio.h (multiple lines )thanks.-srinivas |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-13 : 09:33:41
|
Switch output from grid to text in your query window.That should help.GreetingsWebfred No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
gsrinivas.
Yak Posting Veteran
56 Posts |
Posted - 2009-06-13 : 10:15:00
|
in query window also the pasted text is into one line.thanks-srinu |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-14 : 03:16:33
|
quote: Originally posted by gsrinivas. in query window also the pasted text is into one line.thanks-srinu
nope. dont paste text in query window. just choose option as results to text in toolbar of query analyser and then run the query |
|
|
subhaoviya
Posting Yak Master
135 Posts |
Posted - 2009-06-15 : 06:15:08
|
while am trying bulk insert i got the following errorCould not bulk insert because file 'c:\Documents and Settings\info.txt' could not be opened. Operating system error code 3(The system cannot find the path specified). |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-15 : 07:21:03
|
The file has to be in the file system of the server not on your local PC. No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|