I made a union all between two query's in I've built all of the queries in
query analyzer without any problem but in reportingssvcs I get a ADO error
(syntax error or access violation) Does any one know why?Can you give an example and repro steps for Northwind or AdventureWorks?
Send to me directly and I will try it.
--
| From: "Marco van de Kraats" <marcovdkNoSpam999@.dbs.nl>
| Subject: ADO error (syntax error or access violation)
| Date: Thu, 26 May 2005 13:56:40 +0200
| Lines: 6
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <O6Hr7neYFHA.2956@.TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: 62.58.60.27
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:44797
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| I made a union all between two query's in I've built all of the queries
in
| query analyzer without any problem but in reportingssvcs I get a ADO
error
| (syntax error or access violation) Does any one know why?
|
|
|
||||I am having the same problem where I get an "ADO error: syntax error or
access violation" when I try to run my query. Here is my query:
SELECT Table1.Name,
(SELECT Table2.Billings
WHERE Table2.Date >= CONVERT(datetime,
@.StartDate) AND Table2.Date <= CONVERT(datetime, @.EndDate))
AS Billings
FROM Table2 RIGHT OUTER JOIN
Table1 ON Table2.Name = Table1.Name
GROUP BY Table1.Name, Table2.Date, Table2.Billings
""Brad Syputa - MS"" wrote:
> Can you give an example and repro steps for Northwind or AdventureWorks?
> Send to me directly and I will try it.
> --
> | From: "Marco van de Kraats" <marcovdkNoSpam999@.dbs.nl>
> | Subject: ADO error (syntax error or access violation)
> | Date: Thu, 26 May 2005 13:56:40 +0200
> | Lines: 6
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
> | X-RFC2646: Format=Flowed; Original
> | Message-ID: <O6Hr7neYFHA.2956@.TK2MSFTNGP10.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: 62.58.60.27
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:44797
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | I made a union all between two query's in I've built all of the queries
> in
> | query analyzer without any problem but in reportingssvcs I get a ADO
> error
> | (syntax error or access violation) Does any one know why?
> |
> |
> |
> |
>|||I found out that:
- if you use a parameter in the second query the error occurd if the quey is
complex(no example)
- if you use a parameter in both first and the second query the error occurd
if the quey is complex(no example)
- if you use a parameter in the first query or second and you wil use a
UNION ALL statement a error occurd
See the example's
On northwind WITH error
SELECT OrderDate, OrderID, 0 AS bel
FROM Orders
WHERE (OrderID = @.orderID)
UNION ALL
SELECT 2, 0 AS fiets, EmployeeID AS bel
FROM Employees
On northwind WITH error
SELECT OrderDate, OrderID, 0 AS bel
FROM Orders
WHERE (OrderID = @.orderID)
UNION ALL
SELECT 2, 0 AS fiets, EmployeeID AS bel
FROM Employees
WHERE (EmployeeID = @.orderID)
On northwind WITH error
SELECT OrderDate, OrderID, 0 AS bel
FROM Orders
WHERE (OrderID = 1)
UNION ALL
SELECT 2, 0 AS fiets, EmployeeID AS bel
FROM Employees
WHERE (EmployeeID = @.orderID)
On northwind NO error
SELECT OrderDate, OrderID, 0 AS bel
FROM Orders
WHERE (OrderID = @.orderID)
UNION
SELECT 2, 0 AS fiets, EmployeeID AS bel
FROM Employees
On northwind NO error
SELECT OrderDate, OrderID, 0 AS bel
FROM Orders
WHERE (OrderID = 1)
UNION ALL
SELECT 2, 0 AS fiets, EmployeeID AS bel
FROM Employees
On northwind NO error
SELECT OrderDate, OrderID, 0 AS bel
FROM Orders
WHERE (OrderID = 1)
UNION
SELECT 2, 0 AS fiets, EmployeeID AS bel
FROM Employees
WHERE (EmployeeID = @.orderID)
I found out that if you use a parameter in the second query the error occurd
So for example
""Brad Syputa - MS"" <bradsy@.Online.Microsoft.com> wrote in message
news:LVe3MZiZFHA.3928@.TK2MSFTNGXA01.phx.gbl...
> Can you give an example and repro steps for Northwind or AdventureWorks?
> Send to me directly and I will try it.
> --
> | From: "Marco van de Kraats" <marcovdkNoSpam999@.dbs.nl>
> | Subject: ADO error (syntax error or access violation)
> | Date: Thu, 26 May 2005 13:56:40 +0200
> | Lines: 6
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
> | X-RFC2646: Format=Flowed; Original
> | Message-ID: <O6Hr7neYFHA.2956@.TK2MSFTNGP10.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: 62.58.60.27
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl
> microsoft.public.sqlserver.reportingsvcs:44797
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | I made a union all between two query's in I've built all of the queries
> in
> | query analyzer without any problem but in reportingssvcs I get a ADO
> error
> | (syntax error or access violation) Does any one know why?
> |
> |
> |
> |
>
Thursday, February 16, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment