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 2000 Forums
 SQL Server Development (2000)
 how to inserting a text file into a column?

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
Go to Top of Page

gsrinivas.
Yak Posting Veteran

56 Posts

Posted - 2009-06-12 : 04:46:03
dear senthil,
I have done that basic operation also but
the column accepts 256 characters only.
remaing file ...omitted.

even i used 'text' data type... no result..

-thanks
Go to Top of Page

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.

Greetings
Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

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.

Greetings
Webfred


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
Go to Top of Page

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
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-06-12 : 11:17:58
SQL Query Analyzer:
Tools, Options
Move 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.
Go to Top of Page

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
Go to Top of Page

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.

Greetings
Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

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
Go to Top of Page

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
Go to Top of Page

subhaoviya
Posting Yak Master

135 Posts

Posted - 2009-06-15 : 06:15:08
while am trying bulk insert
i got the following error

Could 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).
Go to Top of Page

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.
Go to Top of Page
   

- Advertisement -