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!

ALTER TABLE statement in MS ACCESS SQL Query not working 1

Status
Not open for further replies.

kamm

Programmer
Dec 4, 2000
17
GB
Hi

I am trying to execute this SQL statement in MS Access:
ALTER TABLE Client_Detail ALTER COLUMN Notes Memo
Everytime I run it the following error shows:
"Syntax error in ALTER TABLE Statement" and the cursor highlights the second ALTER in the query.

(I am trying to change the data type from text to Memo, I do not want to do this manually, it must be as an SQL statemment, as eventually this SQL statement will be running from Visual Basic code.)

Does anyone have any ideas why this does not work?

Thanks in advance
 
Code:
ALTER TABLE tablename 
MODIFY column_name 
MEMO NOT NULL;

I think, can't verify, computer doesn't have access on it
 
What version of Access are you using? Either of the following work for me using Access 2000:

1)
Code:
ALTER TABLE Client_Detail ALTER COLUMN Notes Memo

2)
Code:
ALTER TABLE Client_Detail ALTER Notes Memo

-dave
 
I confirm that, for Access 97 (Jet 3.5), ALTER TABLE does not have an ALTER COLUMN syntax. All it can do is add and drop columns or constraints.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top