Error Message - Help Needed
From: Amy (Amy_at_discussions.microsoft.com)
Date: 07/22/04
- Next message: Gaetan: "How to keep, in a table, a result set ?"
- Previous message: zeyneddine: "Re: DDL Created but how to get key constraints and primary key etc"
- Next in thread: Brian: "Error Message - Help Needed"
- Reply: Brian: "Error Message - Help Needed"
- Reply: martin: "Re: Error Message - Help Needed"
- Reply: Adam Machanic: "Re: Error Message - Help Needed"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Jul 2004 08:19:58 -0700
Hi all
I'm trying to use a sql statement in an asp page. I have 2 separate statements that work, but I'm trying to UNION them.
When I run this query in the web page I get the following error. Not exactly helpful since it doesn't tell me WHAT it want.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ';'.
/management/bi/newtest4.asp, line 393
My query IS line 393 and this is what it is:
SELECT Sum(SumOfSDAEXP)
FROM (Select Sum(proddta.F554211B.SDAEXP) AS SumOfSDAEXP
FROM proddta.F554211B
WHERE proddta.F554211B.SDEMCU LIKE '%DEN'
UNION ALL
Select Sum(proddta.F554211A.SDAEXP) AS SumOfSDAEXP
FROM proddta.F554211A
WHERE proddta.F554211A.SDEMCU LIKE '%DEN');
The tables that end in A are doing current sales, the table that ends in B is doing historical sales, both have EXACTLY the same column names.
Any ideas on what the syntax error is??
THanks
- Next message: Gaetan: "How to keep, in a table, a result set ?"
- Previous message: zeyneddine: "Re: DDL Created but how to get key constraints and primary key etc"
- Next in thread: Brian: "Error Message - Help Needed"
- Reply: Brian: "Error Message - Help Needed"
- Reply: martin: "Re: Error Message - Help Needed"
- Reply: Adam Machanic: "Re: Error Message - Help Needed"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|