Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 28th, 2003, 09:16 AM
Registered User
 
Join Date: Jul 2003
Location: Cape Town, , South Africa.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Alter Table - Add Column

Hi
Can anyone help. I am trying to use the 'Alter Table' statement to add a column to a table. The column I need to add is a Yes/No data type:

ALTER TABLE TargetSelect ADD COLUMN TransSelect Yes/No

Access doesn't seem to accept the data type 'Yes/No' so I just get a syntax error. Any suggestions?
Thanks
Liz


Reply With Quote
  #2 (permalink)  
Old July 28th, 2003, 11:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Use the ANSI SQL data type BIT as in:

ALTER TABLE TargetSelect ADD COLUMN TransSelect BIT

(Yes/No is the Access SQL synonym for the ANSI SQL data type).

Bob
Reply With Quote
  #3 (permalink)  
Old July 29th, 2003, 03:06 AM
Registered User
 
Join Date: Jul 2003
Location: Cape Town, , South Africa.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Bob
Thanks for your response. It worked well.
Regards
Liz


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
alter add puzzle: Invalid column name JL1024 SQL Server 2000 11 June 11th, 2013 04:59 PM
Alter Column SQLScott SQL Server 2005 5 January 5th, 2007 11:53 AM
Alter a column as identity for table kasanar SQL Server 2000 5 July 6th, 2005 08:44 AM
Access SQL alter table add constraint Skipmeok SQL Language 0 April 27th, 2004 08:02 PM



All times are GMT -4. The time now is 07:11 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.