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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TRUNCATING COLUMN SIZE

Status
Not open for further replies.

sirita

Programmer
Sep 14, 2005
1
US
Can have some one have any pointers on this problem...

I have a a same set up of database tables in Staging and Production environment. There is a column with text field as the data type.
But the behaviour is different in both the environments.

In staging the complete value of the text is stored as the column value, where as in production the value after certain characters is truncated and stored.

Can some one explain why I am seeing a different behaviour?
What command do i need to execute to make sure that the set up is infact the same in botht the environments?

Thanks and I appreciate any pointers
 
Is an application writing to the database? If so, then you need to look at the application and what it's doing.

Otherwise, check the column datatype in EM, make sure the data types are the same.

I believe the ALTER TABLE tablename ALTER COLUMN... command is what you're looking for. See BOL.
 
you can also change the data type, length etc from EM - just go to the table, then right-click > design table...
 
also, one more thing...if you are making the column smaller, you probably need to edit the data first, so that it will fit in the smaller column, other wise you will get an error (on oracle anyways, i assume sql server is the same)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top