Questions tagged [resultset]

A result set is a set of rows from a database, which is usually generated by executing a statement that queries the database. A resultSet object maintains a cursor pointing to its current row of data.

A result set is a set of rows from a database, which is usually generated by executing a statement that queries the database. A resultSet object maintains a cursor pointing to its current row of data.

2543 questions
0
votes
1 answer

SQLite: replace result values using bijective table

In SQLite, I have the following query SELECT x.nameIndex, y.nameIndex FROM relation x, relation y WHERE x.label=y.label AND x.feature=1 AND y.feature=0; which returns all pairs of x.nameIndex,y.nameIndex with the same label where x has feature 1…
Radio Controlled
  • 825
  • 8
  • 23
0
votes
4 answers

Select only those rows that are in multiple result sets

I have multiple SELECT statements that all return the same columns but may return different resultsets. Is there any way to select all rows that are in all resultsets on database level? E.g. |---------------------|------------------|---------| | …
Christian Riese
  • 594
  • 1
  • 5
  • 18
0
votes
2 answers

JDBC ResultSet closed statement

I'm trying to write a function that updates 2 tables in my database. I'm getting an error which i think is caused by calling next() on a resultset that has no more rows in the set. I was thinking an if condition on hasNext() would fix this but it's…
el_pup_le
  • 11,711
  • 26
  • 85
  • 142
0
votes
3 answers

jdbc empty resultset check not working

In the following java class i'm having a method authenticate, in which i'm using resultSet.next() method to check that whether the given userName and password exist in the database or not, but it is returning false even when the given userName and…
Adnan
  • 4,517
  • 15
  • 44
  • 54
0
votes
1 answer

Select statement returning no rows

I was asked to write an MYSQL code that returns data from specific dates (2003-2005 December only)from my database. I, however, cannot figure out why I am getting no data returned. The code I am using is below. I tried to use the BETWEEN clause but…
0
votes
1 answer

SQL: Reduce resultset to X rows?

I have the following MYSQL table: measuredata: - ID (bigint) - timestamp - entityid - value (double) The table contains >1 billion entries. I want to be able to visualize any time-window. The time window can be size of "one day" to "many years".…
Alex
  • 365
  • 1
  • 2
  • 9
0
votes
0 answers

Why is my result set in java reading my dbeaver column for date as null and how can I work around this?

Why is my result set in Java reading my DBeaver column for date as null and how can I work around this? Below you can see photos showing that Java is reading my date column from DBeaver as null when that is not the case, as well as my prepared…
0
votes
0 answers

How to get value from a sum on resultset and print on JOptionPane?

I'm trying to get the sum of a column but its printing only the value started in the variable That's what i have: double sum = 0; PreparedStatement st = con.prepareStatement("SELECT SUM(REPLACE(`preço`, 'R$ ', '' )) AS…
0
votes
1 answer

SQL: NULL placeholder values in a TOP 10 list that returns less than ten values

I have written a query that returns a resultset of the top 10 values. This works great, but where a resultset returns a list of values that is smaller than 10 items then I would like the query to return placeholder values to pas the resultset out to…
Matt
  • 9
  • 3
0
votes
1 answer

Extracting correct start and end times in SQL from same day

We have a dataset containing shift activity times from employees, looking like this: Data Table The results set should look like this: Date - Employee ID - Start Time - End Time - Fixed Start Day 2020-01-02 - 17207 - 00:00 - 07:00…
Nebur
  • 3
  • 1
0
votes
1 answer

How to extract result from lme() function from multiple groups and then combine in R?

First, the following data are split randomly into two groups according to the sl variable and then run the model for both groups using the for loop shown below the data set mydata y x sl 1 5.297967 1 1 2 3.322833 2 …
Uddin
  • 754
  • 5
  • 18
0
votes
1 answer

ResultSet closed after executeQuery

My code is: Connection c1 = DriverManager.getConnection("jdbc:sqlite:C:/Users/syste/Desktop/Gestione_Box_Cavalli/docs/gestione_scuderia.sqlite"); // driver is already tested is okay Statement s1 = c1.createStatement(); ResultSet rs1 =…
0
votes
1 answer

Java Android Studio SQL ResultSet NullPointerException when executed by app

I'm new here and also more or less a beginner in programming Java. This is also my first Android project. At the moment I'm trying to do login and account registration with SQL. At first the code: Database class: import java.sql.*; public class…
Fearix
  • 1
  • 1
0
votes
2 answers

How can I make each row in the resultset returns multiple times?

I'm writing an application that uses Mysql and for now my tables don't have many data in it. I want to test how my application handles a larger amount of data. In order to do that I need each row in the resultset to repeat itself several times. I…
ufk
  • 30,912
  • 70
  • 235
  • 386
0
votes
1 answer

Serializable issues about resultset objects

I want to implement a CS application using Sockets. The db query result are of different classes and I don't mean to put those methods handling the result in the server end, I just want the server dealing with db queries, so I decide to pass the…
PiggyZhu
  • 15
  • 1
  • 6