Showing posts with label incorrect. Show all posts
Showing posts with label incorrect. Show all posts

Tuesday, March 6, 2012

[Microsoft][ODBC Sql Server Driver][Sql Server]Line1: Incorrect Sy

Hi,
I am using SQL server 2000. One of the tables in it has become really large
so i tried to use a sql query to view only a certain rows. I used the
following query:
SELECT * FROM TABLE WHERE Company= X
When i verified the syntax , it verified correctly. Buy when i tried to run
the query i got the error msg box :: [Microsoft][ODBC Sql Server Driver][Sql
Server]Line1: Invalid column name X .
But a column with the company value as X exists!
Also when i tried to use a little different query:: SELECT * FROM TABLE
WHERE Company LIKE s % , then i get the same error but the end part of the
error message says Incorrect Syntax Near %
Why is this happening?
pmud
It's a string, you need string delimiters.
WHERE Company='X'
http://www.aspfaq.com/
(Reverse address to reply.)
"pmud" <pmud@.discussions.microsoft.com> wrote in message
news:A17DE491-DF25-47D0-BBA4-F84A2FE6602A@.microsoft.com...
> Hi,
> I am using SQL server 2000. One of the tables in it has become really
large
> so i tried to use a sql query to view only a certain rows. I used the
> following query:
> SELECT * FROM TABLE WHERE Company= X
> When i verified the syntax , it verified correctly. Buy when i tried to
run
> the query i got the error msg box :: [Microsoft][ODBC Sql Server
Driver][Sql
> Server]Line1: Invalid column name X .
> But a column with the company value as X exists!
> Also when i tried to use a little different query:: SELECT * FROM TABLE
> WHERE Company LIKE s % , then i get the same error but the end part of
the
> error message says Incorrect Syntax Near %
> Why is this happening?
> --
> pmud
|||you need single quotes around all character fields
SELECT * FROM TABLE WHERE Company= 'X'
SELECT * FROM TABLE WHERE Company LIKE 's %'
-Andre
"pmud" <pmud@.discussions.microsoft.com> wrote in message
news:A17DE491-DF25-47D0-BBA4-F84A2FE6602A@.microsoft.com...
> Hi,
> I am using SQL server 2000. One of the tables in it has become really
> large
> so i tried to use a sql query to view only a certain rows. I used the
> following query:
> SELECT * FROM TABLE WHERE Company= X
> When i verified the syntax , it verified correctly. Buy when i tried to
> run
> the query i got the error msg box :: [Microsoft][ODBC Sql Server
> Driver][Sql
> Server]Line1: Invalid column name X .
> But a column with the company value as X exists!
> Also when i tried to use a little different query:: SELECT * FROM TABLE
> WHERE Company LIKE s % , then i get the same error but the end part of
> the
> error message says Incorrect Syntax Near %
> Why is this happening?
> --
> pmud

[Microsoft][ODBC Sql Server Driver][Sql Server]Line1: Incorrect Sy

Hi,
I am using SQL server 2000. One of the tables in it has become really large
so i tried to use a sql query to view only a certain rows. I used the
following query:
SELECT * FROM TABLE WHERE Company= X
When i verified the syntax , it verified correctly. Buy when i tried to run
the query i got the error msg box :: [Microsoft][ODBC Sql Server Driver][Sql
Server]Line1: Invalid column name X .
But a column with the company value as X exists!
Also when i tried to use a little different query:: SELECT * FROM TABLE
WHERE Company LIKE s % , then i get the same error but the end part of the
error message says Incorrect Syntax Near %
Why is this happening?
--
pmudIt's a string, you need string delimiters.
WHERE Company='X'
--
http://www.aspfaq.com/
(Reverse address to reply.)
"pmud" <pmud@.discussions.microsoft.com> wrote in message
news:A17DE491-DF25-47D0-BBA4-F84A2FE6602A@.microsoft.com...
> Hi,
> I am using SQL server 2000. One of the tables in it has become really
large
> so i tried to use a sql query to view only a certain rows. I used the
> following query:
> SELECT * FROM TABLE WHERE Company= X
> When i verified the syntax , it verified correctly. Buy when i tried to
run
> the query i got the error msg box :: [Microsoft][ODBC Sql Server
Driver][Sql
> Server]Line1: Invalid column name X .
> But a column with the company value as X exists!
> Also when i tried to use a little different query:: SELECT * FROM TABLE
> WHERE Company LIKE s % , then i get the same error but the end part of
the
> error message says Incorrect Syntax Near %
> Why is this happening?
> --
> pmud|||you need single quotes around all character fields
SELECT * FROM TABLE WHERE Company= 'X'
SELECT * FROM TABLE WHERE Company LIKE 's %'
-Andre
"pmud" <pmud@.discussions.microsoft.com> wrote in message
news:A17DE491-DF25-47D0-BBA4-F84A2FE6602A@.microsoft.com...
> Hi,
> I am using SQL server 2000. One of the tables in it has become really
> large
> so i tried to use a sql query to view only a certain rows. I used the
> following query:
> SELECT * FROM TABLE WHERE Company= X
> When i verified the syntax , it verified correctly. Buy when i tried to
> run
> the query i got the error msg box :: [Microsoft][ODBC Sql Server
> Driver][Sql
> Server]Line1: Invalid column name X .
> But a column with the company value as X exists!
> Also when i tried to use a little different query:: SELECT * FROM TABLE
> WHERE Company LIKE s % , then i get the same error but the end part of
> the
> error message says Incorrect Syntax Near %
> Why is this happening?
> --
> pmud|||Thanks I was trying to use double quotes instead of single...
Thanks :))
"Andre Chan" wrote:
> you need single quotes around all character fields
> SELECT * FROM TABLE WHERE Company= 'X'
> SELECT * FROM TABLE WHERE Company LIKE 's %'
> -Andre
> "pmud" <pmud@.discussions.microsoft.com> wrote in message
> news:A17DE491-DF25-47D0-BBA4-F84A2FE6602A@.microsoft.com...
> > Hi,
> >
> > I am using SQL server 2000. One of the tables in it has become really
> > large
> > so i tried to use a sql query to view only a certain rows. I used the
> > following query:
> >
> > SELECT * FROM TABLE WHERE Company= X
> >
> > When i verified the syntax , it verified correctly. Buy when i tried to
> > run
> > the query i got the error msg box :: [Microsoft][ODBC Sql Server
> > Driver][Sql
> > Server]Line1: Invalid column name X .
> >
> > But a column with the company value as X exists!
> >
> > Also when i tried to use a little different query:: SELECT * FROM TABLE
> > WHERE Company LIKE s % , then i get the same error but the end part of
> > the
> > error message says Incorrect Syntax Near %
> >
> > Why is this happening?
> > --
> > pmud
>
>

[Microsoft][ODBC Sql Server Driver][Sql Server]Line1: Incorrect Sy

Hi,
I am using SQL server 2000. One of the tables in it has become really large
so i tried to use a sql query to view only a certain rows. I used the
following query:
SELECT * FROM TABLE WHERE Company= X
When i verified the syntax , it verified correctly. Buy when i tried to run
the query i got the error msg box :: [Microsoft][ODBC Sql Server Dr
iver][Sql
Server]Line1: Invalid column name X .
But a column with the company value as X exists!
Also when i tried to use a little different query:: SELECT * FROM TABLE
WHERE Company LIKE s % , then i get the same error but the end part of the
error message says Incorrect Syntax Near %
Why is this happening?
--
pmudIt's a string, you need string delimiters.
WHERE Company='X'
http://www.aspfaq.com/
(Reverse address to reply.)
"pmud" <pmud@.discussions.microsoft.com> wrote in message
news:A17DE491-DF25-47D0-BBA4-F84A2FE6602A@.microsoft.com...
> Hi,
> I am using SQL server 2000. One of the tables in it has become really
large
> so i tried to use a sql query to view only a certain rows. I used the
> following query:
> SELECT * FROM TABLE WHERE Company= X
> When i verified the syntax , it verified correctly. Buy when i tried to
run
> the query i got the error msg box :: [Microsoft][ODBC Sql Server
Driver][Sql
> Server]Line1: Invalid column name X .
> But a column with the company value as X exists!
> Also when i tried to use a little different query:: SELECT * FROM TABLE
> WHERE Company LIKE s % , then i get the same error but the end part of
the
> error message says Incorrect Syntax Near %
> Why is this happening?
> --
> pmud|||you need single quotes around all character fields
SELECT * FROM TABLE WHERE Company= 'X'
SELECT * FROM TABLE WHERE Company LIKE 's %'
-Andre
"pmud" <pmud@.discussions.microsoft.com> wrote in message
news:A17DE491-DF25-47D0-BBA4-F84A2FE6602A@.microsoft.com...
> Hi,
> I am using SQL server 2000. One of the tables in it has become really
> large
> so i tried to use a sql query to view only a certain rows. I used the
> following query:
> SELECT * FROM TABLE WHERE Company= X
> When i verified the syntax , it verified correctly. Buy when i tried to
> run
> the query i got the error msg box :: [Microsoft][ODBC Sql Server
> Driver][Sql
> Server]Line1: Invalid column name X .
> But a column with the company value as X exists!
> Also when i tried to use a little different query:: SELECT * FROM TABLE
> WHERE Company LIKE s % , then i get the same error but the end part of
> the
> error message says Incorrect Syntax Near %
> Why is this happening?
> --
> pmud

Saturday, February 25, 2012

[LOG] Unable to read local eventlog (reason: The parameter is incorrect) - FLOOD

[LOG] Unable to read local eventlog (reason: The parameter is incorrect)

I just had two seperate SQL Server 2005 Enterprise Edition machines suddently throw thousands of these errors within the last 24 hours. In both cases the the SQL agent and application event logs are just being flooded with a new entry every couple of seconds.

While the errors are being logged the Agent continues to run jobs (e.g. scheduled backups, etc.) without error.

A restart of the agent stops the errors and everything seems to be back to normal.

There is no commonality between the two machines, they are on different networks, domains, etc.

Both machines have been up >30 days and have not previously logged this error.

Anybody else seen this?

Thanks,

Joe

See this post Joe:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124086&SiteID=1

HTH,

Saturday, February 11, 2012

@@SERVERNAME sql 2k

Hi,
Diff server name for same sql box.
Select @.@.SERVERNAME
and select * from sysservers
WHy?
@.@.SERVERNAME returns incorrect name. How do I correct it?
THnksHi
At some point you probably renamed the server at some point, run
sp_dropserver and sp_addserver as shown in:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
John
"mecn" wrote:
> Hi,
> Diff server name for same sql box.
> Select @.@.SERVERNAME
> and select * from sysservers
> WHy?
> @.@.SERVERNAME returns incorrect name. How do I correct it?
> THnks
>
>

@@SERVERNAME sql 2k

Hi,
Diff server name for same sql box.
Select @.@.SERVERNAME
and select * from sysservers
WHy?
@.@.SERVERNAME returns incorrect name. How do I correct it?
THnksHi
At some point you probably renamed the server at some point, run
sp_dropserver and sp_addserver as shown in:
http://msdn.microsoft.com/library/d...nstall_5r8f.asp
John
"mecn" wrote:

> Hi,
> Diff server name for same sql box.
> Select @.@.SERVERNAME
> and select * from sysservers
> WHy?
> @.@.SERVERNAME returns incorrect name. How do I correct it?
> THnks
>
>