Sql querry not working
Hello... Am developing a web application where granite blocks are to be traced.. The main blocks are cut into cut-blocks at first.. Then these cut-blocks are converted to slabs.. I use two tables here:
- cutblockdata contains the data of cut-block.
- slabcutblockdata contains the data of slabs.
CBID is cutblock ID.
My code:
ResultSet rc=st.executeQuery("select DISTINCT APP.CUTBLOCKDATA.* from APP.CUTBLOCKDATA,APP.SLABCUTBLOCKDATA where APP.CUTBLOCKDATA.CBID<>APP.SLABCUTBLOCKDATA.CBID)");
while(rc.next())
{
RowCount++;
}
System.out.println("ROWCOUNT: "+RowCount);
Suppose i have 3 cut-blocks. For the first time my output for the above query is:
ROWCOUNT:0
Now I convert cut-block1 into slab. Executing the query again my output is:
ROWCOUNT:2
"2" indicates that there are remaining 2 cut-blocks. The output is correct here.
But.. When I convert cut-block2 into slab. Executing the query again my output is:
ROWCOUNT:3
The output is wrong here. I should get ROWCOUNT:1
For the first two times my query is getting executed properly.. But not for the rest of the times.. I need to resolve it quickly too.. Please help.. Thanks in advance..
View Answers
Related Tutorials/Questions & Answers:
Sql querry not workingSql querry not working Hello... Am developing a web application where granite blocks are to be traced.. The main blocks are cut into cut-blocks at first.. Then these cut-blocks are converted to slabs.. I use two tables here
Advertisements
htpasswd working htpasswd
working hii,
What does htpasswd do?
hello,ADS_TO_REPLACE_1
htpasswd creates a new user in a specified group, and asks to specify a password for that user
hibernate.archive.autodetection not workinghibernate.archive.autodetection not working Hi,
What is the use of hibernate.archive.autodetection?
I am trying to use in my project but its not
working.
How to resolve hibernate.archive.autodetection not
working issue
Datagrid not workingDatagrid not working The code here is
working fine, apart from the fact that that I'm using netbeans 6.5 and the servlet v2.5 and struts 1.1....
working. please help me out
sqldifference between
sql and oracle what is the difference between
sql and oracle
sqlsql how to get first row in
sql with using where condition in
sql?
how to get last row in
sql with using where condition in
sql sqlsql I want interview
sql questions
Please visit the following link:
SQL Tutorials
Why this is not working...?Why this is not
working...? import java.util.*;
public class Family {
int size_of_family=0;
public Person[] members=new Person[size_of_family];
Person d = new Person();
public Family (int size_of_family){
members = new
SqlSql how to find maximum of a101,a102,a103 from a table in
sql SQLSQL hii
What is
sql?
hello,ADS_TO_REPLACE_1
SQL, which stands for Structured Query Language, is a special-purpose language used to define, access, and manipulate data.
SQL is non procedural, meaning
sqlsql returning value from a store procedure in
sql with example
Please visit the following links:
http://www.roseindia.net/mysql/mysql5/stored-procedures-and-functions.shtml
http://www.roseindia.net/
sql/create
SQLSQL In my computer i have microsoft
sql 2008.how can i set that in the cmd.i want to use that in cmd.what is the default username and password
SQlSQl . Given two tables:
table1(player, groundname, numcenturies);
table2(ground_name, country);
Write and
SQL query for the following:
" Select all the players from table1 who has
Nitobi Grid is not working in IE10/IE11Nitobi Grid is not
working in IE10/IE11 Nitobi grid is
working in IE8, but not
working in IE10/IE11.
we are using above two javascript files to open the grid
SQLSQL 1)How to Store 1000 records in Oracle object.
2)Write a query for calculate highest, 3rd Highest & 10th highest salary from emp teble.
3)What is Sequence.
4)How to use rowid in
Sql.
5)What is Views.
6)How
SQLSQL how to get ( 15 march 2011) and (15/03/2011) output using
SQL
Use the following queries to get the data from database in the given format.
For (15 march 2011) format:
SELECT DATE_FORMAT(dob, '%d %M %Y') FROM
SQLSQL how to get ( 15 march 2011) and (15/03/2011) output using
SQL
Use the following queries to get the data from database in the given format.
For (15 march 2011) format:
SELECT DATE_FORMAT(dob, '%d %M %Y') FROM
ModuleNotFoundError: No module named 'working'ModuleNotFoundError: No module named '
working' Hi,
My Python... '
working'
How to remove the ModuleNotFoundError: No module named '
working... to install padas library.
You can install
working python with following command
ModuleNotFoundError: No module named 'working'ModuleNotFoundError: No module named '
working' Hi,
My Python... '
working'
How to remove the ModuleNotFoundError: No module named '
working... to install padas library.
You can install
working python with following command
ModuleNotFoundError: No module named 'working'ModuleNotFoundError: No module named '
working' Hi,
My Python... '
working'
How to remove the ModuleNotFoundError: No module named '
working... to install padas library.
You can install
working python with following command
SQLSQL Trigger query Why we use the Trigger and what it's uses?
A database trigger is procedural code that is automatically executed..., user events, and
SQL statements to subscribing applications
10)Restrict DML
calender working in struts - Strutscalender
working in struts when i execute the following code ,that is
working properly
if i convert to struts html tags that code is not
working
please help me to rectify the problem
html dropdown not working firefoxhtml dropdown not
working firefox I am writing a Dropdown code in HTML which is not
working in firefox. What could be the reason as it's perfectly
working in IE and Crome.
Thanks
SQL Date
SQL Date
The
SQL Date is used when you are
working with dates. This include...
Understand with Example
The Tutorial illustrate a Example from
SQL Date
SQL tables EMP, and DEPT, the structure for which are given above.
Write
SQL queries
SQL events, user events, and
SQL statements to subscribing applications
10)Restrict DML
SQL events, and
SQL statements to subscribing applications
10)Restrict DML
SQL, user events, and
SQL statements to subscribing applications
10)Restrict DML
JTextfields working with JTextAreaJTextfields
working with JTextArea I have 2 database tables one...
sql = "select pHistory from patient where pName" +
" = '"+textboxValue+"'";
PreparedStatement ps = con.prepareStatement(
sql r set working directoryr set
working directory Hi,
How to set
working directory in r.... There are command to set the
working directory in R.
Working directory is the base... project.
After setting
working directory you can load data files without providing
sql - SQLorder by
SQL Query What is order by in
SQL and when this query is used in
SQL?Thanks! Hi,In case of mysql you can user following query.Select salary from salary_table order by salary desc limit 3,1Thanks
sql - SQL want query?
4.what is the diffrence between
sql and plsql? Hi Friend... HAVING n>1;
Difference between
SQL and PL/
SQL:
SQL is a structured query...(select,insert,update etc.), manipulate objects(DDL) and data(DML).
PL/
SQL Dynamic-update not working in Hibernate.Dynamic-update not
working in Hibernate. Why is dynamic update not
working in hibernate?
Dynamic-update is not
working. It means when you are running your update, new data is added in your table in place
Working of POS TerminalWorking of POS Terminal Hi there, thanks for this post. Just curious how actual POS terminal will interact with PHP. PHP doesn't provide hardware interaction.
Thanks for reply.
Regards.
(adsbygoogle
UIWebView zoom not workingUIWebView zoom not working Hi,
I don't know why UIWebView zoom not
working? Tell the solution.
Thanks
Hi,
Open the .xib file and set scalesPageToFit to YES.
Thanks
sql - SQLsql write a dyamic
sql program to display the name of a employee whose salary is <5000 Hi Friend,
Use the following query... the following link:
http://www.roseindia.net/
sql/
Thanks
background images in css not workingbackground images in css not working In the application i'm passing a background image from CSS in the given format ...
background-image: url("Image\backgroundImage.GIF");
which is not
working. So, please give me an example
calculate working hourcalculate
working hour why echo not come out?
<html><body>
<form action="<?php $_SERVER['PHP_SELF'];?>" method="post">
Working hour : <input name="workout" type="text"/><input name="submit1
data science for working professionalsdata science for
working professionals Hi,
I am beginner in Data...:
data science for
working professionals
Try to provide me good examples or tutorials links so that I can learn the
topic "data science for
working Working with Eclipse IDE - StrutsWorking with Eclipse IDE hello, i am beginner to eclipse .
i want to run my first struts program in eclipse 3.2.
what are the steps for running struts in eclipse .
Any body plz, tell me the setting environment of eclipse
php <? ?> tag not workingphp tag not working why PHP tags not
working in my application?
This might happen when your shortopentag is turned off. So, you will have to turn it on by changing the status of this PHP tag in php.ini file.
Here