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!

Change Field type after Upsizing

Status
Not open for further replies.

Ausburgh

Programmer
Jul 21, 2004
62
US
Hello All,

can I change a field type from text to memo after upsizing from Access to Sql Server.

The 255 characters (Text) does not seem to be enough for my users.

Do you foresee any problems with that? Please Advise.

thanks in advance
 
In SQL Server there is no memo data type and the text data type is 2,147,483,647 characters, so the text field should be enough. ;)

So, if upsizing changed the field to text, you should be ok.


Dale
 
You can issue the following command...

Alter Table <Table Name> Alter Column <Field Name> VarChar(1000)

the 1000 is an example, any value up to 8000 is valid. You need to be a little careful though because SQL Server has a size limit per row/record of 8060 bytes.

You could change it to a "memo" field if you really want to. The problem with memo fields is that many of the string functions will not work with it.

Alter Table <Table Name> Alter Column <Field Name> Text

Hope this helps.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks AccordingToDale & gmmastros - I appreciate your help.
 


I just wanted to clarify something here ...

so if I changed the field type on the Access side (it is currently 'Text') to 'Memo' -- everything should be fine on the Sql Server backend (in the field which is a 'Text' field).

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top