tagged [where-clause]

ServiceStack ORMLite - How to Select All to match the request DTO's properties automatically

ServiceStack ORMLite - How to Select All to match the request DTO's properties automatically I have several ServiceStack ORMLite POCO, one is Company below. If two

Is multiple .Where() statements in LINQ a performance issue?

Is multiple .Where() statements in LINQ a performance issue? I am wondering if there are performance implications of multiple .Where() statements. For example I could write: ``` var contracts = Contex...

SQL Query with Join, Count and Where

SQL Query with Join, Count and Where I have 2 tables and am trying to do one query to save myself some work. I want to join them so that I get `id, category id, category name, colour` Then I want to l...

19 Jul at 16:49

Conditional WHERE clause in SQL Server

Conditional WHERE clause in SQL Server I am creating a SQL query in which I need a conditional `where` clause. It should be something like this: ``` SELECT DateAppr, TimeAppr, TAT, LaserLTR, ...

pandas equivalent of np.where

pandas equivalent of np.where `np.where` has the semantics of a vectorized if/else (similar to Apache Spark's `when`/`otherwise` DataFrame method). I know that I can use `np.where` on `pandas.Series`,...

17 Feb at 08:43

MySQL direct INSERT INTO with WHERE clause

MySQL direct INSERT INTO with WHERE clause I tried googling for this issue but only find how to do it using two tables, as follows, This

30 Apr at 05:34

SQL Server: How to use UNION with two queries that BOTH have a WHERE clause?

SQL Server: How to use UNION with two queries that BOTH have a WHERE clause? Two queries that require filtering: And: Separately, these return the `ID`s I'm looking for: (13

28 Oct at 20:31

What is the Big O of linq .where?

What is the Big O of linq .where? I am doing some comparisons about where to filter out items from a list. I am unsure of doing it directly which would be O(n), or using .Where(). `I made a simple exa...

25 Mar at 23:7

What is the purpose of using WHERE 1=1 in SQL statements?

What is the purpose of using WHERE 1=1 in SQL statements? > [Why would a sql query have “where 1 = 1”](https://stackoverflow.com/questions/517107/why-would-a-sql-query-have-where-1-1) [Why would som...

Why does List<T> not implement IOrderedEnumerable<T>?

Why does List not implement IOrderedEnumerable? I need to return an ordered set of objects. But, when using an `IList` implementation `IOrderedEnumerable``IList``IOrderedEnumerable`. In the below I ha...

How to write a SQL DELETE statement with a SELECT statement in the WHERE clause?

How to write a SQL DELETE statement with a SELECT statement in the WHERE clause? Database: Sybase Advantage 11 On my quest to normalize data, I am trying to delete the results I get from this `SELECT`...

C# Linq: Combine multiple .Where() with an *OR* clause

C# Linq: Combine multiple .Where() with an *OR* clause I have been searching a lot about my current problem but I could not find a real answer to solve that issue. I am trying to build a LINQ Query th...

18 May at 09:48

SQL Server: Multiple table joins with a WHERE clause

SQL Server: Multiple table joins with a WHERE clause I'm using SQL Server and I'm having a difficult time trying to get the results from a `SELECT` query that I want. I've tried joining in different o...

5 Nov at 22:9

EF: Include with where clause

EF: Include with where clause As the title suggest I am looking for a way to do a where clause in combination with an include. Here is my situations: I am responsible for the support of a large applic...

Does "where" position in LINQ query matter when joining in-memory?

Does "where" position in LINQ query matter when joining in-memory? Say we are executing a LINQ query that joins two in-memory lists (so no DbSets or SQL-query generation involved) and this query also ...

18 Dec at 12:8