Questions tagged [clause]
252 questions
-1
votes
1 answer
Elixir: is the 'default' clause like catching an exception?
It seems like the purpose of the default clause is to prevent the error from being raised if there is no pattern match. So is it fair to compare it to catching an exception (like in C#/Java), or does it serve any other purpose as well?

tldr
- 11,924
- 15
- 75
- 120
-1
votes
1 answer
Separate clauses of an if statement?
Is there any way to have multiple clauses in an if() statement?
For instance:
if( ($username=='textUser' && $role=='admin') || ($admin=='yes'))
{
// If the username AND role are set to admin OR if the admin is set to 'yes'
}
else
{
//…

tarnfeld
- 25,992
- 41
- 111
- 146
-1
votes
3 answers
PHP: Where clause will not execute when using a variable
For the user I am testing with, their org_id column value is "student_life"
I am trying to have this function display whatever rows have the student_life column = 1. (so yes there is a column student_life which is a boolean, and then I also have a…

user2296393
- 1
- 2
-2
votes
2 answers
comparison within in clause of postgresql
Is it possible to add condition within the in clause of postgresql
for example
select ... where (t1.subject,t2.weight) in ((1,2),(2,3))
I want to check whether subject is 1 but weight can be >= 2 not just 2 and so on. So that condition would…
-2
votes
1 answer
How to fix errors in SQL Joins?
Courses
Instructors
Sections
Students
StudentSchedule
StudentSchedule Part 2
Using the database provided, Write and Execute SELECT statements to get the following information:
SIMPLE JOINS
Sections Table
How many total credit hours is instructor 6…

Marc
- 1
- 3
-2
votes
3 answers
to get records between yesterday's 3pm to today's 3pm sql server
I have a table with a datetime column, and I extract the records using a select statement, I m not sure with the 'where' part where I want only records from yesterday's 3pm to today's 3pm sql server. Please help.

rohini
- 31
- 3
- 9
-2
votes
1 answer
Error in where clause of sql update query
Why does the sql query
UPDATE `singleent` SET `pre_timestamp` = CURRENT_TIMESTAMP WHERE listingType = 1
give error whereas
UPDATE `singleent` SET `pre_timestamp` = CURRENT_TIMESTAMP WHERE 1
or
UPDATE `singleent` SET `pre_timestamp` =…

Shyam Agarwal
- 119
- 1
- 2
- 10
-2
votes
2 answers
How to catch an exception that was thrown inside a catch clause?
try {
throw new SomeException();
}
catch (SomeException e) {
System.out.println("reached once");
throw e;
}
catch (Exception e) {
System.out.println("reached twice");
}
This code only…

ninesalt
- 4,054
- 5
- 35
- 75
-2
votes
1 answer
Show only the most recent givendate for each record in MySQL
I have the table below with the Patientid, the vaccine name that they received, and the date they received it. I am trying to write an SQL query to only show the most recent given date for each patient.
patientId vaccinename givenDate
100 …

MBotros
- 11
- 3
-3
votes
1 answer
Where clause stopped working
I have this code that (without the WHERE, was working) How do I get it to work with the WHERE clause ?
I just need it to only list lines that is current and max 2 years ahead.
$SQL = "SELECT ";
$SQL .= "SUM(Bookings.Spots) as SUMSPOT, Trips.ID,…

Jacob
- 29
- 4
-3
votes
4 answers
Display all employees working on all of the projects?
table 1 includes employee name and their initials
table 2 includes projectnumber and pmember(initials as well)
we only have to display the name of the employees so i have to use a WHERE clause, which i can't construct :( here's what i've done so…

user3363032
- 1
- 2
-4
votes
1 answer
visual basic like error
Private Sub txtmid_Change()
On Error Resume Next
Mmid = txtmid.Text
Adodc1.RecordSource = "select * from members where txtmid like '" & Mmid & "'"
Adodc1.Refresh
Mname = Adodc1.Recordset.Fields("Mname").Value
Expiryd =…

Siddhi
- 1