freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Please help: "create view" failing
- Date: Thu, 9 Nov 2006 17:28:14 +0100
>
> Hi there,
>
> I am having trouble with running a "create view" in the Mono
> (free .NET)
> client. The problem lies with the TDS it generates. I have managed to
> duplicate the issue with the FreeTDS tsql client, but now I
> realize that
> the real problem lies with the exact behaviour of TDS.
>
> Note that I am running on Linux against an MS SqlServer 2000.
> My FreeTDS
> installation is 0.64.
>
> The statement I am trying to execute is:
> create view TEST_VIEW as select * from otherdb..SOME_TABLE
> If I start tsql and do:
> 1> create view TEST_VIEW as select * from otherdb..SOME_TABLE
> 2> go
> it works just fine. If, however, I add a ";" at the end of the first
> statement, ie:
> 1> create view TEST_VIEW as select * from otherdb..SOME_TABLE;
> 2> go
> then I get the error:
> Msg 170, Level 15, State 1, Server XXX, Line 1
> Line 1: Incorrect syntax near ';'.
>
> I just don't understand what the problem is. Normally, a semi-colon is
> not a problem. Certainly, if I do a select with or without the ";", I
> don't see any behaviour change.
>
> Can someone please explain why the semi-colon is breaking the SQL? I
> would like to understand this so I can try to work around the problem
> (the ";" is inserted automatically in Mono).
>
> Thanks for the help,
>
> Paul Rensing
The ; is expect to separate statement in a batch however a view cannot
contain multiple statements so mssql refuse your query...
freddy77
-
[freetds] Please help: "create view" failing,
Paul Rensing, 11/09/2006
- Re: [freetds] Please help: "create view" failing, Orlando Colamatteo, 11/09/2006
- <Possible follow-up(s)>
- Re: [freetds] Please help: "create view" failing, ZIGLIO, Frediano, VF-IT, 11/09/2006
- Re: [freetds] Please help: "create view" failing, Lowden, James K, 11/09/2006
Archive powered by MHonArc 2.6.24.