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:
>
Showing posts with label views. Show all posts
Showing posts with label views. Show all posts
Monday, March 19, 2012
Sunday, February 12, 2012
can''t import views and store procedures
I recently set up a new sql 2005 standard edition and planning to mirgrate our production sql 2000 data. but only the tables were migrated from the copy data or import / export task. I cannot find a way to recreate the store procedures and views on the new server without create one view and one store procedure at a time unless all hundreds of views and procedures were rescripted. can anyone help
Thank
Andy Wong
awong@.virginiadare.com
Right click the database > Taks > Generate Scripts, this will give you the option to put it in one output-file
Jens K. Suessmeyer
http://www.sqlserver2005.de
Subscribe to:
Posts (Atom)