I usually modify data types like so:
Change Datatypes:
ALTER TABLE table_name ALTER COLUMN some_column char(1000);
Run that query in your database and it should do the trick.
As far as being able to execute the query - if you're on the machine that the database is on first thing to check is to see if by some chance you have OSQL installed.
1. Goto Start > Run
2. Type "CMD" in the box (without quotes) and press enter
3. Type "osql" and press enter (again without quotes)
If you don't get "Bad command or filename" you should be able to use osql to pass the above SQL statement to your database. The OSQL command would look something like this:
osql -E -S ServerName -Q "ALTER TABLE table_name ALTER COLUMN some_column char(1000)"
That line may or may not work (after you've changed the table and column info as well as the server name which probably isn't necessary if you're running this on the same computer the database is stored on - maybe just remove the -S ServerName). Maybe someone who is more familiar with osql can help you/me make sure that command is correct.
If it doesn't work and you don't get a swift response from some one else consult Microsoft's site for the reference on the osql command:
http://msdn2.microsoft.com/en-us/lib...8(SQL.80).aspx
Hope that helps!
Hi,
I hired a programmer to create a simple database system for my office.
I now need to extend a character field within the database table, from 60 to 1000, but are unable to comtact him.
When i tried to do it myself (using tutorials from google) I realised he did not install any administrative tools etc...
I have no ideas how he entered the data and now have no idea how to edit the field length.
This is a matter of the utmost urgency as i have a meeting tomorrow and need to have this working properly.
I would be very grateful if anyone could help me with this matter.
Many thanks
Dee