Solved

alter size of varchar column, syntax

Posted on 2009-07-07
3
838 Views
Last Modified: 2012-05-07
The attached code returns:

Unclosed quotation mark after the character string 'ALTER COLUMN expanded [varchar(1024)]'.

web_site.expanded is currently a varchar(10), I want to be able to convert it to varchar(1024). The column doesn't contain any data at the time I'm trying to do this. Thanks!
ALTER TABLE web_site [ALTER COLUMN expanded [varchar(1024)]]

Open in new window

0
Comment
Question by:bbdesign
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Accepted Solution

by:
pssandhu earned 500 total points
ID: 24793364
Try this:
ALTER TABLE web_site 
ALTER COLUMN expanded varchar(1024)

Open in new window

0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24793440
it is good to use two part name like schemaname.tablename, assuming your schema is DBO.

ALTER TABLE dbo.web_site
ALTER COLUMN dbo.web_site.expanded varchar(1024)

0
 

Author Comment

by:bbdesign
ID: 24793557
Works great, thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question