Questions tagged [clause]
252 questions
0
votes
1 answer
How to add SQL column value here
How can I change the "Name of the Person" mysql column filed "updated_by"?
prepare($sql);
$query->…

psp
- 13
- 2
0
votes
2 answers
When clause in Mockito JUnit is not working while calling method of testing class
I am trying to stub method of testing class. And it is not working.
Like am testing below class
enter code here
Class to test:
public Class A{
public String method1(){
C c=new C();
int num=c.methodC();
B…

Santoshalakshmi M
- 15
- 3
0
votes
1 answer
Building in a where clause in a Timestamp field select
I've read on here all the posts I can, but none of the suggested solutions work.
I have a Timestamp field that I'd like to use in a where clause...
My Syntax is..
select (TO_CHAR(Strt_Dt, 'YYYYMMDD HH24 MI SS')) as Test,
Strt_Dt
from
…

Lorna
- 21
- 6
0
votes
2 answers
Can't get specific data from MySql
I want to populate a TableView with players from MySQL database. To load all players I am using
public void loadPlayerData() throws SQLException, ClassNotFoundException {
Connection conn = ConnectionDB.connector();
ResultSet rs =…

noxus010
- 43
- 1
- 8
0
votes
1 answer
Converting List to a String in java for Oracle SQL IN clause
I have the below list
ArrayList list1=new ArrayList();
list1.add("abc");
list1.add("bdc");
list1.add("acr");
list1.add("bde");
I wanted to use this list in a select query like below
select * from emp where emp_name in…

user14963721
- 1
- 1
- 1
0
votes
1 answer
BASH VARIABLE ADEED AFTER SQLITE3 LIKE CLAUSE
I have a question about an sqlite3 command that im trying to insert inside my script
if [[ -n $(tail -z 600 /var/log/pihole.log | grep "$IP" | wc -c) ]];then
sudo -u pihole sqlite3 /etc/pihole/pihole-FTL.db 'DELETE FROM network WHERE hwaddr LIKE…

Daxer
- 3
- 2
0
votes
1 answer
mainframe copybook with redefines clause to load data in oracle external table
I have redefines clause in a copybook that I have to load into oracle external table using the file sent over. Below is the copybook information. Incoming file is in positional format Should I assume in the data record in file, first 8 characters is…

Jay J
- 1
- 1
0
votes
1 answer
Corda Contract within a Contract?
I am trying to build some form of dynamic Corda contract that has a state which can hold a list of independent contracts and independent states for those contracts.
To demystify the concept, think of the 'dynamic Corda contract' as an abstract…

Dhen Padilla
- 48
- 4
0
votes
1 answer
Android SQLite Syntax - IN clause and Subselect
i spend a lot of time of searching a resolution for this query in android.
SELECT * FROM positionen WHERE _id IN (SELECT positionenid FROM fahrtenbuch_position WHERE fahrtenbuchid = 2)
i think im on the wrong way. there are no subselects in…

user753654
- 11
- 4
0
votes
2 answers
Spring mongodb ArrayOperators filter by $in clause
I have to convert this mongodb aggregate to spring aggregate code
{ $addFields: {
"versions" : { $filter: {
input: "$versions",
as: "version",
cond: {$in: ["$$version.parentId", "$libraries._id"]}
}}
}}
My current…

Alex
- 191
- 1
- 10
0
votes
2 answers
Count the number of records in SQL results before a certain value is reached
Looking to count the number of SQL records until a certain value in one of the table columns is reached. Using Asp /VBscript.
Not sure how to formulate the query.
What I've tried is but of course it isn't working. What I'd like is to organise the…

jondee
- 17
- 4
0
votes
1 answer
SQL query question. Extracting data met for one of two conditions but not both
I'm extracting student data who have completed a list of courses for degree requirements. One of the courses on the list is equivalent to another course, so if a student completes both equivalent courses, it can only be counted once towards a…

kroniclesking
- 1
- 1
0
votes
1 answer
Why are these two seemingly-similar MySQL queries returning radically different results?
I want to pull a list of units that have an overall rating of less than 4. The first query returns 1760 rows with data that seems to check out when cross referenced. The second query returns only 434 rows. Why would this be? I don't fully understand…

AliasHendrickson
- 9
- 1
0
votes
1 answer
Out of range by using HAVING Clause with MIN and MAX aggregation functions in MySQL
I don't understand why the price range selection result is incorrect by using the HAVING Clause and the MIN() and MAX() aggregation functions together.
Here below an example:
SELECT * FROM table t
WHERE t.b_id=10
GROUP BY t.t_id
HAVING…

UgoL
- 839
- 2
- 13
- 37
0
votes
0 answers
ORDER BY clause with 2 parameters
I need to find a solution for using 2 parameters in order by clause, one for the columns and one for ascending, descending.
Both parameters are as input in a procedure.
[...]
ORDER BY @column @sortDirection
[...]
The issue is that ORDER BY…