aspose file tools*
The moose likes Struts and the fly likes What is error in query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What is error in query" Watch "What is error in query" New topic
Author

What is error in query

Pradeep
Ranch Hand

Joined: Sep 19, 2006
Posts: 49
update wk_share set deleted='Y',where fund_id="" and share_id="";
please tell me error in above query
[ November 23, 2006: Message edited by: Bear Bibeault ]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

Pradeep,
For the future, note that we have a JDBC forum for SQL questions.

What error do you get? Do you want to check for empty strings or nulls?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
this is more of an sql problem, but I think the problem is the comma before the word where. (You should use an sql forum for this, not to mention including details about which db etc etc)
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Also, you've used single quotes for one comparison and double quotes for two other comparisons. Some databases only accept single quotes to denote literals.

If you're trying to check for null, you should use the expression:

fund_id is null
[ November 23, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Pradeep
Ranch Hand

Joined: Sep 19, 2006
Posts: 49
thanks it helped me
Pradeep
Ranch Hand

Joined: Sep 19, 2006
Posts: 49
thanks it helped me
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is error in query
 
Similar Threads
SQL syntaxt error in CMP in JBoss 4.0
Hibernate exception
query error...
loops in java
Validation of indexed properties