|
|
 |
| SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2000 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

September 17th, 2009, 08:08 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2005
Location: Cochin, Kerala, India.
Posts: 183
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
Converting Text column to image column
Dear friends,
My old db contains a text column.
In my new db it is image datatype.
I want to migrate my old data to new db.
Is there any method to do it..
Thanks
__________________
jomet.
`````````````````````````````````````````````````` ``````````````````````
Once you start a working on something, dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
Last edited by jomet : September 17th, 2009 at 08:13 AM.
Reason: typo
|

September 17th, 2009, 09:05 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Location: India
Posts: 563
Thanks: 0
Thanked 14 Times in 14 Posts
|
|
If you are using SQL server then
text
Variable-length non-Unicode data in the code page of the server and with a maximum length of 2^31-1 (2,147,483,647) characters. When the server code page uses double-byte characters, the storage is still 2,147,483,647 bytes. Depending on the character string, the storage size may be less than 2,147,483,647 bytes.
image
Variable-length binary data from 0 through 2^31-1 (2,147,483,647) bytes.
I think conversion from text to image data type is not allowed in SQL
text and image Data Types
Automatic data type conversion is not supported for the text and image data types.
You can explicitly convert text data to character data, and image data to binary or varbinary, but the maximum length is 8000 bytes. If you try an incorrect conversion such as trying to convert a character expression that includes letters to an int, SQL Server returns an error message.
__________________
Om Prakash Pant
|
|
The Following User Says Thank You to om_prakash For This Useful Post:
|
jomet (September 17th, 2009) |

September 17th, 2009, 09:45 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2005
Location: Cochin, Kerala, India.
Posts: 183
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
Thanks om_prakash
Tried converting text to varchar(8000) and then to image.
It is working,but my text column contains more than 8000 characters.
So now i am trying to write an application , which reads data , convert and then insert to table.
__________________
jomet.
`````````````````````````````````````````````````` ``````````````````````
Once you start a working on something, dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
|

September 18th, 2009, 02:03 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2005
Location: Cochin, Kerala, India.
Posts: 183
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
Any possibilities are there within sql 2000?
(using file system object or so...)
Any good links , for the usage of file system object..
__________________
jomet.
`````````````````````````````````````````````````` ``````````````````````
Once you start a working on something, dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
|

September 18th, 2009, 02:20 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Location: India
Posts: 563
Thanks: 0
Thanked 14 Times in 14 Posts
|
|
Hi,
Please check the following link for usage of filesystem object in ASP:
http://www.w3schools.com/asp/asp_ref_filesystem.asp
__________________
Om Prakash Pant
|

September 18th, 2009, 02:30 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2005
Location: Cochin, Kerala, India.
Posts: 183
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
But i am checking whether it is possible with some SP which uses File system object
like
EXEC @hr = sp_OACreate 'Scripting.FileSystemObject', @ole_FileSystem OUT
__________________
jomet.
`````````````````````````````````````````````````` ``````````````````````
Once you start a working on something, dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
|

September 18th, 2009, 03:36 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Location: India
Posts: 563
Thanks: 0
Thanked 14 Times in 14 Posts
|
|
__________________
Om Prakash Pant
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |