freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Andrew Pimlott <andrew AT pimlott.net>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] MSSQL syntax flavors
- Date: Thu, 3 Jul 2003 09:02:59 -0400
On Thu, Jul 03, 2003 at 08:30:00AM +0200, Michael Peppler wrote:
> On Thu, 2003-07-03 at 02:21, Andrew Pimlott wrote:
> > I have a create trigger statement (that I didn't write) with a line
> >
> > declare @rc int;
> >
> > When I run it with sqsh, I get
> >
> > Line 8: Incorrect syntax near 'int'.
> >
> > (line 8 being that line). If I erase the ';', it runs fine. The
> > original code runs fine in a native MSSQL query tool.
>
> Interesting - maybe the MSSQL query tool silently removes the
> semi-colon.
I doubt it's just that: The line above is part of a long statement,
so the query tool would have to be parsing the whole statement.
Plus, I found other discrepancies (since sending the message), for
example with sqsh I get complaints of errors that the MSSQL tool
ignores, like non-existent columns (in this respect, sqsh works
better!). Also, I had to change "GO" to "go" in one place. It
really seems like I'm using a whole (but subtly) different mode.
> In any case the semi-colon shouldn't be there T-SQL doesn't use
> statement terminators like C or perl (and sqsh will often interpret the
> ; as meaning "go" - i.e. send the current SQL batch to the server).
You're right that removing the semicolon makes everyone happy.
Andrew
-
[freetds] MSSQL syntax flavors,
Andrew Pimlott, 07/02/2003
-
Re: [freetds] MSSQL syntax flavors,
Michael Peppler, 07/03/2003
- Re: [freetds] MSSQL syntax flavors, Andrew Pimlott, 07/03/2003
- <Possible follow-up(s)>
-
RE: [freetds] MSSQL syntax flavors,
Lowden, James K, 07/03/2003
- Re: [freetds] MSSQL syntax flavors, Andrew Pimlott, 07/03/2003
- Re: [freetds] MSSQL syntax flavors, Arnar Birgisson, 07/03/2003
-
Re: [freetds] MSSQL syntax flavors,
Michael Peppler, 07/03/2003
Archive powered by MHonArc 2.6.24.