473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access Defaults in Standard SQL

Just want you all to know (just in case you have this issue) that some
standard sql doesnt work by default in MS ACCESS 2003 anymore (I didnt
know this, not sure if others do or not - and I couldnt find an answer
to my problem anywhere else on the internet)

I was getting a maddening syntax error on an alter statement that I
knew should work
ALTER TABLE [ARTICLE]
ADD COLUMN [APPROVED] CHAR(1) DEFAULT "N"

- it turns out its because 2003 defaults to "Access SQL" and you have
to switch it to Standard SQL syntax by doing the following..
Tools | Options | Tables/Queries | SQL Server Compatible Syntax (ANSI
92) |
<CheckThis database.

Oct 21 '06 #1
3 2136
On 21 Oct 2006 12:47:08 -0700, "mishj" <mi***@yahoo.comwrote:

Wow, I would have missed this question on an exam :-)

I wonder if it's a good idea to set this flag, or if it would create
other problems. The warning message is rather severe. I would only do
this on a NEW database, not on an existing app.

There is an Access way of adding a field: see the CreateField function
in the Help file.

-Tom.

>Just want you all to know (just in case you have this issue) that some
standard sql doesnt work by default in MS ACCESS 2003 anymore (I didnt
know this, not sure if others do or not - and I couldnt find an answer
to my problem anywhere else on the internet)

I was getting a maddening syntax error on an alter statement that I
knew should work
ALTER TABLE [ARTICLE]
ADD COLUMN [APPROVED] CHAR(1) DEFAULT "N"

- it turns out its because 2003 defaults to "Access SQL" and you have
to switch it to Standard SQL syntax by doing the following..
Tools | Options | Tables/Queries | SQL Server Compatible Syntax (ANSI
92) |
<CheckThis database.
Oct 22 '06 #2
"mishj" <mi***@yahoo.comwrote in news:1161460027.904701.254170
@b28g2000cwb.googlegroups.com:
Just want you all to know (just in case you have this issue) that some
standard sql doesnt work by default in MS ACCESS 2003 anymore (I didnt
know this, not sure if others do or not - and I couldnt find an answer
to my problem anywhere else on the internet)

I was getting a maddening syntax error on an alter statement that I
knew should work
ALTER TABLE [ARTICLE]
ADD COLUMN [APPROVED] CHAR(1) DEFAULT "N"

- it turns out its because 2003 defaults to "Access SQL" and you have
to switch it to Standard SQL syntax by doing the following..

Tools | Options | Tables/Queries | SQL Server Compatible Syntax (ANSI
92) |
<CheckThis database.
Do you think the JET of pre-2003 versions of Access uses Ansi 92 SQL by
default?

In any case instead of making the option change you recommend which can
influence all your SQL it may be less hazardous just to use OLE DB as
manifested in ADO as:

CurrentProject.Connection.Execute "ALTER TABLE [ARTICLE] ADD COLUMN
[APPROVED] CHAR(1) DEFAULT 'N'"

or to rewrite the SQL in a fashion that JET SQL can handle.

Persons who have Ansi 92 SQL experience, skill and knowledge might want to
make the change you suggest. There may be half-a-dozen who post here who
would be safe in doing so.

--
Lyle Fairfield
Oct 22 '06 #3
Lyle Fairfield wrote:
Persons who have Ansi 92 SQL experience, skill and knowledge might want to
make the change you suggest. There may be half-a-dozen who post here who
would be safe in doing so.
ANSI JOINS (how Jet constructs joins, BTW) BLOW!!!!! Who the hell ever
came up with such a stupid way to make joins deserves to be buried in
parenthesis. Viva Oracle's simple theta join in this regard!!!!

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Oct 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: serge | last post by:
I am doing a little research on Google about this topic and I ran into this thread: ...
166
by: Graham | last post by:
This has to do with class variables and instances variables. Given the following: <code> class _class: var = 0 #rest of the class
7
by: Bonnie R | last post by:
Hello! I am writing VBA code in Access 97 to import an Excel 2000 Spreadsheet. I had hoped to do this using ODBC, but that was not to be, for who knows what reason. The problem is that I import...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
34
by: Mathieu Trentesaux | last post by:
Hello I downloaded Office 2007 for this reason : It seems, once again, that it is impossible to save any modification done in a VBA library, from the main project in Access. The save button...
4
by: dorpnospam | last post by:
We have an old but very critical application that was written in VB 6 against Access 95 dbs. We need to ditch this decrepit old unstable db platform but we are trying to determine the best...
1
by: Luke Bailey | last post by:
I have an access database that I have secured using ueser-level security. I have my own logon in the Admins group. I have also removed Admin from the Admins group so that the standard end-user...
1
by: janetopps | last post by:
I used a database transfer utility (Bullzip) to move data from Access to MySQL Asp pages, I couldn't transfer the data if i did not opt to leave the default values, therefore the default values...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.