A syntactic form in functional languages used to bind a value to a name in a local scope. Similar, but not identical to, let.
Questions tagged [where-clause]
9069 questions
2
votes
0 answers
HAVING vs. WHERE use case
I have a column that its value is set from enum.
I would like to check if there are lines that mistakely were set to a value nor from the enum, grouped by their value.
The following queries retrive the same results:
Using HAVING
select COLUMN1,…

user3165438
- 2,631
- 7
- 34
- 54
2
votes
3 answers
How to filter on a date in MySQL and PHP?
I'm trying in my visitor-book that people can do only one post in one day, but I don't know how it goes. Here's the code:

Apromer
- 59
- 2
- 8
2
votes
1 answer
Comparison of 2 mysql tables
I have two tables (customers and real estates).
In the customers table I have the personal data of the customer and the interests he has.
Table…
user4271697
2
votes
5 answers
T-SQL Where statement - OR
Sorry for the vague title but I really didn't know what title to give to this problem:
I have the following result set:
ID Field FieldValue Culture
1 Color Groen nl-NL
2 Taste Kip nl-NL
3 Color Green …

Yvo
- 18,681
- 11
- 71
- 90
2
votes
2 answers
Exclusive Where Clause
I am trying to get a result where only cars that have:
Wing, Door and Windscreen are selected.
And Only Cars that have ONLY those three parts.
I can not seem to get the where clause correct, here is what I have:
Table
CREATE TABLE Cars (
NameID int…

David
- 35
- 5
2
votes
1 answer
Using where clause in Check
I have a situation where a field can be NULL when another field is certain values and for others it should be NOT NULL.
"Type" VARCHAR2(30) NOT NULL,
BestandLocatie VARCHAR2(150) NULL,
I made two constraints, the first…

Politiepet
- 93
- 1
- 2
- 11
2
votes
2 answers
Using normalize-string XPath function from SQL XML query?
is it possible to run an SQL query, with an XPath "where" clause, and to trim trailing spaces before the comparison ?
I have an SQL XML column, in which I have XML nodes with attributes which contain trailing spaces. I would like to find a given…

Black Light
- 2,358
- 5
- 27
- 49
2
votes
3 answers
Postgres function with text array and select where in query
I need to create a function like this (scaled down to a minimum) where I send an array of strings that should be matched. But I cant make the query to work.
create or replace function bar(x text[]) returns table (c bigint) language plpgsql as…

FORTRAN
- 567
- 1
- 6
- 13
2
votes
1 answer
Simple Example: Expressions are only allowed as the first element of a pipeline
Can explain why philosophically this doesn't work?
Just as a learning example, I wanted to see the properties of the get-service cmdlet, without the events or methods.
PS C:\Users\Neal> get-service | get-member | {$_.name -eq "Property"}
Result:…

NealWalters
- 17,197
- 42
- 141
- 251
2
votes
1 answer
Common type for generic classes of different types
I have (for example) Dictionary of different generic types (d1, d2, d3, d4) and I want to store them in something
var d1 = new Dictionary();
var d2 = new Dictionary();
var d3 = new…

DinGODzilla
- 1,611
- 4
- 21
- 34
2
votes
1 answer
Jackcess equivalent of SQL WHERE clause with > ("strictly greater than") condition
I want search all rows where value of Date columns > '2014/03/01'.
How can do this? If there are no rows with Date value = '2014/03/01'`, how can I position the cursor without a full scan table?
Table table = db.getTable("Facture");
IndexCursor…

Phane
- 201
- 3
- 11
2
votes
1 answer
Oracle adding a condition in where clause slows down a query
While generating a report based on few tables out of which some are really huge(1+ billion records) and some pretty small (100 records) it is taking 17 minutes. but where I added a condition to the where clause it started running for 1+ hours.
The…

user3570198
- 61
- 1
- 7
2
votes
3 answers
conditional where clause in sql 2012
I have a query as below in my Stored Procedure:
I set the @SUBCONDITION FROM MY CODE BEHIND.
declare @SUBCONDITION VARCHAR(100)= NULL
if(@SUBCONDITION='DEPT')
BEGIN
Select * from table1 where IDDEPT=1
END
ELSE IF (@SUBCONTION='GRADE')
BEGIN
SELECT…

Jackson Lopes
- 215
- 1
- 5
- 20
2
votes
1 answer
Insert statement with where clause
I had a table with unique Date_t1 date type field, but in Table description field is not mentioned as unique, now while inserting new row I need to validate if date exist or not, If already exist I should not allow to make changes on that row,…

debraj
- 21
- 1
2
votes
3 answers
WHERE in Aggregate function
I have a quick question. I know that we cannot use WHERE clause in an aggregate function in MySQL. The table structure is as follows:
+----+------+----------+--------+
| ID | Name | Location | Active |
+----+------+----------+--------+
| 1 | Aaaa…

Praveen Kumar Purushothaman
- 164,888
- 24
- 203
- 252