Monday, March 19, 2012

Cant SAVE a view

HI,
Whats wring with the followng views? I can view the results if i run the
view without saving; but when try to save the view, I get error .
View1:
SELECT COUNT(*)
FROM dbo.Cingular_AllMin MINUS
SELECT MDN
FROM Testallmatches
VIEW2:
SELECT COUNT(*)
FROM dbo.Cingular_AllMin MINUS
SELECT mdn
FROM Testallmatches INNER JOIN
Cingular_AllMin ON
Cingular_AllMin.previousmin = Testallmatches.mdn OR
Cingular_AllMin.currentmin = Testallmatches.mdn
Error:
ODBC error: [Microdoft][odbc sql server driver][sql server] Incorrect syntax
near keyword 'SELECT'.
Please help.
Thanks
pmudMINUS is not valid T-SQL.
"pmud" <pmud@.discussions.microsoft.com> wrote in message
news:29AC1DA5-6153-4F9E-A053-330DEFA9B583@.microsoft.com...
> HI,
> Whats wring with the followng views? I can view the results if i run the
> view without saving; but when try to save the view, I get error .
> View1:
> SELECT COUNT(*)
> FROM dbo.Cingular_AllMin MINUS
> SELECT MDN
> FROM Testallmatches
> VIEW2:
> SELECT COUNT(*)
> FROM dbo.Cingular_AllMin MINUS
> SELECT mdn
> FROM Testallmatches INNER JOIN
> Cingular_AllMin ON
> Cingular_AllMin.previousmin = Testallmatches.mdn OR
> Cingular_AllMin.currentmin = Testallmatches.mdn
> Error:
> ODBC error: [Microdoft][odbc sql server driver][sql server] Incorrect
> syntax
> near keyword 'SELECT'.
> Please help.
> Thanks
> --
> pmud|||Hi Aaron,
Is there a way I can get around this problem?
Thanks
--
pmud
"Aaron Bertrand [SQL Server MVP]" wrote:

> MINUS is not valid T-SQL.
>
> "pmud" <pmud@.discussions.microsoft.com> wrote in message
> news:29AC1DA5-6153-4F9E-A053-330DEFA9B583@.microsoft.com...
>
>|||Can you show table structure, sample data, and desired results, so we can
understand what "this problem" is?
http://www.aspfaq.com/5006
"pmud" <pmud@.discussions.microsoft.com> wrote in message
news:82899AA1-B1BC-4B46-8D7B-10D9583614EB@.microsoft.com...
> Hi Aaron,
> Is there a way I can get around this problem?
> Thanks
> --
> pmud
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>

No comments:

Post a Comment