Questions tagged [clause]
252 questions
0
votes
1 answer
Optimize same inner clause in multiple select statements
I develop procedure in Oracle
I need write something like this:
--
open curr1 for
select *
from table1
where key_field in (select key_field from tbl_keys where type = 1);
--
open curr2 for
select *
from table2
where key_field in (select key_field…

flap13
- 379
- 3
- 14
0
votes
1 answer
My access 2010 database displays parameter query dialogue boxes instead of getting the values from my where clause
I have a database that I've been building and from time to time all of the queries that have paraeters defined by text boxes on a form (driven by the where clauses) do not work. Instead, Access asks me for values in the form of parameter dialogue…

Hansens4
- 1
- 1
0
votes
1 answer
Can atom be both predicate and operator?
Is it possible to use atom as both operator and predicate.
Something along the lines :
:- op(101, fy, rule).
:- op(99, xfy, ==>).
rule(R) :- write_canonical(R).
So that I can say :
rule ...blah... ==> ...abc..
instead of :
rule( ...blah... ==>…

sten
- 7,028
- 9
- 41
- 63
0
votes
1 answer
Quick SQL error
I am having some issues with a query and i cant seem to be able to figure it out. Any ideas?
Works
SELECT * FROM `InviteKeys` WHERE `Value` = `1234567890123456`
Doesn't work
SELECT * FROM `InviteKeys` WHERE `Value` = `VPx46RG2an1IqaBD`

Mattia Marziali
- 99
- 1
- 1
- 7
0
votes
1 answer
HQL Where clause with Case if field is null
I have a HQL query in join between 2 table, with field1 that may be null or with value.
If it is null in first table I have to check if in the second table 'is null' but if it is with value I have to check if table1.field1=table1.field1
How can I…

N. Var
- 3
- 1
- 5
0
votes
3 answers
SQL Server - Execute first where clause and if valid don't execute second
I have the SQL Server Select statement:
SELECT *
FROM Table
WHERE(ClientPlants = 621 AND Carriers = 226)
OR (Carriers = 226 AND ClientPlants IS NULL)
ORDER BY ClientPlants
Now problem is when the first is valid, it still executes the second…

Scottie
- 3
- 3
0
votes
2 answers
How to wrap mutliple queries into a single where clause in laravel
I want to fetch records from a table pasien_polis where polyclinic_id matches the id of the polyclinics table.
I can achieve that by doing this:
$polyclinic = Polyclinic::findOrFail($id);
$pasienpoli = Polyclinic::find($id)->PasienPoli;
the…

Daddi Al Amoudi
- 770
- 1
- 5
- 16
0
votes
1 answer
Clause linq with 2 parameter with operator OR don´t retrieve the values correctly
My problem is, I have a linq query with a where clause with 2 parameters,
the first parameters comes from the global filter, and the second comes from column filter.
When I enter the value in the global filter, and I don´t enter any value in column…

jolynice
- 514
- 1
- 8
- 25
0
votes
0 answers
MySql Clauses Execution order and Logical order?
I want to know what's the order of execution order of MySql clauses also the logical order of MySql clauses.

Arbër Emini
- 1
- 1
0
votes
1 answer
SQL select query for excluding values
Input query:
SELECT a.ml_STi_File_id as File_ID, a.ML_STI_SRC_SYS_CD as Src_CD, concat(a.EVENT_CD,a.BUS_AREA_CD) as BE
FROM FFI_ERR_RLT_TRN a, summary_tbl b
WHERE a.ml_sti_src_sys_cd = b.ml_sti_src_sys_cd
AND a.ml_sti_load_dttm =…

mohana
- 25
- 3
0
votes
1 answer
How to create group clause in Entity Framework Core
I am trying to query 2 tables, Club and LinkClubUser. I want to retrieve the last club that a User is assigned from the last Date in the LinkclubUser.
I have the right SQL query:
select top 1
max(A.DataInscricao),
A.Nome, A.NomeNaCamisola,…

jolynice
- 514
- 1
- 8
- 25
0
votes
1 answer
Where Clause not working for Condition
$sql="SELECT * Year FROM sslc" Works Fine but when Condition is given its not working
$sql="SELECT Candidate, Father, Course, Year FROM sslc where Candidate LIKE '$Candidate' OR Father LIKE '$Father'";
2nd Code is working in localhost but when…

bhanu prakash
- 9
- 3
0
votes
2 answers
Improve performance of SQL query by replacing OR with UNION
To improve the performance of the following query we have to remove the OR clause and use UNION. OR clause does not allow the index to be considered that is why we need to use UNION instead. Kindly let me know if there is any other better way to…

user6804978
- 37
- 1
0
votes
1 answer
Javascript variable in function changes global variable
i have a huge problem figuring out scopes and clauses. I want to have a tmp variable, that i remove one element from. But the global variable should stay intact. This is what iv´e come up with. This;
var test = ['test', 'huhu'];
function foo(bar)…

jakobS
- 87
- 2
- 10
0
votes
2 answers
Laravel 5.4 where clauses if $request->jobTitle !null?
I built small search form helps me search in jobsTable from db
jobs Table has jobTitle, jobCompany, jobGovernorate, jobLocation and created_at column
And posted data from search form:…

AhmedEls
- 708
- 2
- 9
- 25