Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Importi VERY large Memo fields into SQL server

Status
Not open for further replies.

arthuro111

Programmer
Aug 15, 2002
18
US
I am importing data from Access to SQL Server.

The challenge is that one of the fields I am importing is a Memo field, and sometimes it is VERY long. The maximum length I found via a query was about 28,000 characters.

How can I get this successfully imported without cutting these fields off? I know char fields can be up to 8000 long, but there are quite a few longer than that.

Any help is appreciated. Thanks, Arthur
 
you could create various fields and split the memo text into them

Code:
create table lengthtest (col1 char (10), col2 char (10))

insert into lengthtest
values (substring ('This is the best way',1,10),substring ('This is the best way',11,10))

select * from lengthtest

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Text and ntext fields are the equivalent of large memo fields.

And incidentally you would not want to use char(8000) for a shroter one. YOu would want to use varchar. Why? Becasue char will allot the fill 8000 characters whether the entry has 8000 charcters or not. Varchar will only store as many characters as you have in the entry. Char and nchar datatypes should only be used for fields where all or almost all the entried will have the same length syuh as a state abrreviation field where all the entries are 2 characters long.

Questions about posting. See faq183-874
Click here to learn Ways to help with Tsunami Relief
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top