Re: Java.sql.SQlException



David Harper, 31.10.2007 12:27:
select * from Property1 where SurveyID = "Users.SurveyID"

which is testing an ID column, which is presumably a number, against a literal string "Users.SurveyID".

Unless SQL Server is completely ignoring the SQL standard "Users.SurveyID" identifies a column name (because of the double quotes). Character literals have to be enclosed in single quotes

Thomas
.



Relevant Pages

  • Re: SQL query fails
    ... > that is acceptable to Oracle, SQL Server, and Access. ... > this requires using the single quote as the literal string delimiter as well ... > thise case determines it to be the single quote. ...
    (microsoft.public.access.queries)
  • Re: Trim Email Address down to domain only
    ... SQL Server uses single quotes, ... "Steve Roberts" wrote in message ... >> Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • SQL Injecton - Strange Result
    ... after your excellent help i am able to bypass single quotes using ... -MSQQL-2000 Web App), which by the way, in not being filtered by the ... and goes directly to the SQL Server ... all of them always execute a store procedure after a semicolon but no ...
    (Pen-Test)
  • Re: The identifier is too long in SQL 2000
    ... Change your double quotes to single quotes. ... are considered identifiers and as such your entire query is being treated as ... declare @querystring char ... Pro SQL Server 2000 Database Design - ...
    (microsoft.public.sqlserver.programming)
  • Re: Making user input safe
    ... >I am working on a project were a user can update a SQL Server DB via a web ... I've included a number of text boxes for a user to enter in strings. ... >Here is a code snippet. ... You want to change single quotes into two single quotes.. ...
    (microsoft.public.dotnet.languages.vb)