Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Sql Server Programming

Using the EXCEPT keyword in Jet queries


I have an SQL query that is as follows:

SELECT headline,url,summary,updated FROM worldnews EXCEPT (SELECT
headline,url,summary,updated FROM worldnews WHERE newssection='Archives'
UNION SELECT TOP 5 headline,url,summary,updated FROM worldnews WHERE
newssection='Archives' UNION SELECT TOP 5 headline,url,summary,updated FROM
worldnews WHERE newssection='Main') ORDER BY displayorder DESC

When I test it using Microsoft Access 2003 it tells me there is a syntax
error in the FROM clause. I tried executing everything inside the ()'s
separately, which worked correctly, so I believe that the part causing the
error is the EXCEPT keyword. Does Access not support the EXCEPT keyword (I
am actually executing it through Jet using an ASP.NET application, but I
designed the *.mdb file using Access 2003)? The ASP.NET application gives
the following error:

IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

The following query, which uses the same fields and tables, works with no
problems:

SELECT TOP 5 headline,url,summary,updated FROM worldnews WHERE
newssection='Main' ORDER BY displayorder DESC

Does anybody have any ideas what might be the problem? Thanks.
--
Nathan Sokalski
njsokal@hotmail.com
http://www.nathansokalski.com/

Nathan
I think you will be better of asking ACCESS group to answer the question.

"Nathan Sokalski" <njsokal@hotmail.com> wrote in message

news:%23Ascz1KqHHA.1776@TK2MSFTNGP05.phx.gbl...

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc