473,406 Members | 2,378 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,406 software developers and data experts.

mssql lacks

Hello
I have recently decided to upgrade my programs to enable users to have mssql
databases instead of access.
I have since then run into many incompatibilities between their sql:
access has IIF(x>y,a,b) whereas mssql hase case when (this already means
hundreds of changes in queries)
it does not have format(number,'#,##0.00') or format(date,'dd.MM.yyyy') but
most surprising is following:

access allows this while mssql reports error ("Cannot perform an aggregate
function on an expression containing an aggregate or a subquery")
SELECT ....
SUM(a*b/(SELECT SUM(c) FROM d WHERE e=f))
FROM ...
(a-f are fields and tables )

I am totaly dissapointed in MS since I will have to have two variants of
queries in programs just to enable users to choose between databases.
Does anyone know an MS e-mail where I could flame them
Jul 23 '05 #1
5 1603
Markon (ma****@yahoo.com) writes:
I have recently decided to upgrade my programs to enable users to have
mssql databases instead of access. I have since then run into many
incompatibilities between their sql: access has IIF(x>y,a,b) whereas
mssql hase case when (this already means hundreds of changes in queries)
it does not have format(number,'#,##0.00') or format(date,'dd.MM.yyyy')
but most surprising is following:

access allows this while mssql reports error ("Cannot perform an aggregate
function on an expression containing an aggregate or a subquery")
SELECT ....
SUM(a*b/(SELECT SUM(c) FROM d WHERE e=f))
FROM ...
(a-f are fields and tables )

I am totaly dissapointed in MS since I will have to have two variants of
queries in programs just to enable users to choose between databases.
Does anyone know an MS e-mail where I could flame them


That would be fairly pointless. Access and MS SQL Server has completely
disjunct histories. I don't really know about the origins of Access, but
recall that SQL Server has its origins at Sybase, and until Microsoft
broke the partnership with Sybase, they did not have any control
over the syntax at all.

And there are too many difference for a merge to be really possible. For
instance on Access you can do this:

SELECT a + b + c AS d, d + p AS f
FROM tbl1, tbl2
WHERE ...

In Access "d" io "d + p" refers to "a + b + c". But on SQL Server, if
there is a column tbl2.d, this is what d refers to. Thus, the two
syntaxes are incompatible.

The best you can do, is to try find syntax that actually works on
both Access and SQL Server. Sometimes this can be difficult. For things
like formatting of dates and number, try to keep that out of the
database part altogether.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
All the features you think are lacking are in fact supported by SQL Server.
You just need to learn to write proper SQL instead of missing the Access
quirks that aren't there. Access is a fine application development tool but
as a database it's just a toy. I'm glad SQL Server looks nothing like it.

--
David Portas
SQL Server MVP
--
Jul 23 '05 #3

Hi

You are the first person I have seen who is disappointed with MS SQL
Server.

MSSQL Server is a RDBMS and Supports all ANSI and T-SQL syntaxes. Just
learn how to write queries in using ANSI SQL and you would definately
love using SQL Server.

The problem u were facing with Grouping can be easily solved using
derived tables or aliasing

..and there are so many user groups available to help you out when u are
stuck.

best Regards,
Chandra
http://groups.msn.com/SQLResource/
http://chanduas.blogspot.com/
---------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
Jul 23 '05 #4
Chandra (ch*****@discussions.hotmail.com) writes:
MSSQL Server is a RDBMS and Supports all ANSI and T-SQL syntaxes.


Ehum, there is a whole bunch of ANSI syntax that MS SQL Server does
not support.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #5
"Markon" wrote:
Hello
I have recently decided to upgrade my programs to enable users to have
mssql
databases instead of access.
I have since then run into many incompatibilities between their sql:
access has IIF(x>y,a,b) whereas mssql hase case when (this already means
hundreds of changes in queries)
it does not have format(number,'#,##0.00') or format(date,'dd.MM.yyyy')
but
most surprising is following:

access allows this while mssql reports error ("Cannot perform an aggregate
function on an expression containing an aggregate or a subquery")
SELECT ....
SUM(a*b/(SELECT SUM(c) FROM d WHERE e=f))
FROM ...
(a-f are fields and tables )

I am totaly dissapointed in MS since I will have to have two variants of
queries in programs just to enable users to choose between databases.
Does anyone know an MS e-mail where I could flame them


Just so you know... IIf and Format are in Access because the JET database
engine allows you to use native VBA functions. And if you're actually using
Access (instead of just the JET engine via VB, C++, etc), you can also use
VBA functions that you've created.

The problem you're facing is that Access/JET is the only database system
(that I know of) that allows you to use VBA that way. The fact is, if you
want to continue to use them, you'll need to stay with Access (instead of
Oracle, Sybase, SQL Server, DB2, whatever). Your only options would be to
rewrite your SQL (as you mentioned) or implement these functions in your
target environment.

Craig
Jul 23 '05 #6

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

Similar topics

11
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I...
7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
1
by: JackTorrance | last post by:
Hi i have a problem with IIS6 and MSSQL and i hope that someone can help me. this is the configuration: Windows 2003 IIS6 MSSQL 7.0 Standard Edition ADO 2.5
14
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with...
3
by: gharmel | last post by:
I'm trying to get some clues on why I get (much) slower responses from my PHP applications when dealing with a remote sql server as opposed to a local sql server. Here's my situation: Server...
11
by: ralphie | last post by:
hi all since nearly 2 days i fight with mssql and utf-8 as i need to store and retrieve arabic characters. i tried the com approach ...
0
by: DariuszK | last post by:
I am greeting I would like to consult the better solution(with security consideration) to the access is for MSSQL(2005) from ASP(Classic) in the system of the intranet. a) SQL mixed mode and...
0
by: Derftics | last post by:
Hi Guys, Is there anyone who have tried installing MSSQL 2000 and MSSQL 2005 servers in one desktop computer? I have tried using MSDE and successfully install the MSSQL 2000 server but when I...
14
by: guswebb | last post by:
Hi. I'm a newbie to PHP and am having a few problems as follows... I have installed PHP successfully on server 1 which is running IIS 6 (W2k3) and hosting multiple sites, some of which connect to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.