What you should do before asking SQL questions on this forum is the
following:

Create the string as you are doing, then do a System.out.println on it. Copy
the string from your log file and run it from your command line/console. The
console will probably give you more specific info on what went wrong.

Dave

-----Original Message-----
From: Bhushan_Bhangale [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 11:54 PM
To: [EMAIL PROTECTED]
Subject: Re: another sql statement error


Hey Halil,

Why don't you understand the difference between a java variable and a String
value? You have asked this type of question previously also and everybody
explained also why you are getting error.

Just keep in mind when ever you are creating a String value the java
variable value needs to be concatenated into it like this
String value = "static stuff" + tno + "static stuff";

-----Original Message-----
From: Halil AKINCI [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 10:43 PM
To: [EMAIL PROTECTED]
Subject: another sql statement error



Hi group,

I want to ask another sql question. In this example both TaxNumber and "tno"
have a integer value. I received an error message from my sql statement.
Can anyone check it?
-------------------------------------------------------------------------
String sql="SELECT  FirstNname, LastName, TaxNumber, SUM(Debt) As Total
FROM " +
  "Arsa_beyan WHERE TaxNumber=tno GROUP BY TaxNumber, Firstname, Lastname ";

following is a error message:

java.sql.SQLException:[Microsoft][ODBC Microsoft Access Driver] the select
statement includes a reserved word or an argument name that is misspelled or
missing, or the punctuation is incorrect.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to