Questions tagged [select]

Select is a common keyword used to query data. 'select()' is also a programming function for triggering code based on file handle or other system activity. Do not use this tag for questions related to: HTML

In query languages (SQL, …)

SELECT is a statement in query languages, like SQL or SPARQL. It returns a result set of records from one or more tables.

SELECT queries require two essential parts. The first part is the WHAT, which determines what we want SQL to go and fetch. The second part of any SELECT command is the FROM WHERE. It identifies where to fetch the data from, which may be from a SQL table, a SQL view, or some other SQL data object.

Reference


In HTML

<select> is also an HTML user interface element for choosing one or more option(s) from a finite collection of elements. Do not use this tag for this purpose, use instead.


In .NET/LINQ

select is a keyword that can be used for queries on various data sources that implement specific features, directly from language itself. Do not use this tag for such questions, use instead.


In C and C++

select() is an important system call used by C and C++ programs and libraries that avoids busy waiting for network activity and other I/O to complete.


In Perl

In Perl 5, select() has two different uses. When called with four parameters, it calls the same syscall as C and C++. In this form it has limited portability. Otherwise it is called with one or no parameters and sets or gets current default filehandle for output. The filehandle is used e.g. by print if no other specified. Special variables like $| relate to it, too. This second form is perfectly portable.

In Perl 6 it has been completely dropped.


In Go

The select statement lets a goroutine wait on multiple channel operations. A select blocks until one of its cases can run, then it executes that case.

38465 questions
6
votes
4 answers

React-select: How to display HTML in options

I am wondering if react-select could show html in rendered options. For example if fetched ajax option has text, I would like to see text as bold in the dropdown menu instead of seeing text. I read the documentation and I didnt find…
gospodin
  • 1,133
  • 4
  • 22
  • 42
6
votes
1 answer

When using d3.js why must I call selectAll after select when appending new elements to an entry selection?

Suppose we have a svg element with no child nodes: Suppose we also have an array of data: var data = [10,20,30,40,50]; This code properly append new rect elements to the svg element. …
eric.mcgregor
  • 3,507
  • 2
  • 16
  • 16
6
votes
1 answer

How to change order of elements in a dijit.form.Select

I'm using Dojo 1.5 to create a dijit.form.Select with some data from a datastore. The issue I'm finding is that I want the select to show the elements ordered by the identifier, but the select is ginving them ordered by the label. How can I avoid…
Jose L Martinez-Avial
  • 2,191
  • 4
  • 28
  • 42
6
votes
1 answer

jq json filter and keep original structure

I am really new to the command jq, and I am trying do some filtering to remove blocks of data that I don't want/need. Here is an example of my JSON structure: { "BackupCfg": [ { "type": "filesystem", "repository": "trunk", …
6
votes
5 answers

Selecting multiple dataframe columns by position in pandas

I have a (large) dataframe. How can I select specific columns by position? e.g. columns 1..3, 5, 6 Rather than just drop column4, I am trying to do it in this way because there are a ton of rows in my dataset and I want to select by position: …
aiden rosenblatt
  • 403
  • 2
  • 5
  • 9
6
votes
1 answer

mat-select not working in mat-expansion-panel

We have to show a form inside mat-expansion-panel. There are multiple fields in the form, for few of them I am using mat-select and for another few I am using mat-input. In expansion panel, matInput is working fine but mat-select is not showing the…
Ajay
  • 4,773
  • 3
  • 23
  • 36
6
votes
3 answers

What do I use instead of two multiselect boxes in html so works on Phone/Ipad

In my HTML UI I wanted users to be able to select multiple countries, because there are far too many countries to allow the complete list to be displayed I initiate the HTML page so it has two lists: The second list has just those that have been…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
6
votes
2 answers

Fetching records with slug instead of ID

I'm currently trying to find the best way (in term of usability and performance) when dealing with a situation like fetching records tagged with a specific tag, or category, or something like that. A good way (the way I wanted to do), would be to…
andyk
  • 10,019
  • 10
  • 36
  • 41
6
votes
1 answer

select only checks fds till 255 not till FD_SETSIZE

select on fds higher then 255 do not check if the fd is open. Here is my example code: #include #include #include #include int main() { fd_set set; for(int i = 5;i
kuga
  • 1,483
  • 1
  • 17
  • 38
6
votes
2 answers

SQL LIKE Operator doesn't work with Asian Languages (SQL Server 2008)

Dear Friends, I've faced with a problem never thought of ever. My problem seems too simple but I can't find a solution to it. I have a sql server database column that is of type NVarchar and is filled with standard persian characters. when I'm…
Farshid
  • 5,134
  • 9
  • 59
  • 87
6
votes
1 answer

"Apply joins is not supported" in SQLite Query

I'm trying convert my application with MS SQL Server 2014 database to SQlite. This query works well on SQL Server, but with SQLite, i encounter "APPLY JOINS is not supported" error. this error exist only with *select ( & include) query. Query: …
Marc
  • 107
  • 8
6
votes
4 answers

Postgres where clause over two columns from subquery

Database: Postgres Table name: records Has 4 columns Year | Dept | Expense | Month So per year there can be up to one record for each month / per department. I have a sub-query which returns me the below data based on constraints. Year |…
Vik G
  • 539
  • 3
  • 8
  • 22
6
votes
2 answers

SQL Server: Select Where String Doesn't Contain Certain Value

I need to Select the employees from Department10 where the name does not contain the string "LA". Select * From EMP Where Cod_Dept = 10
6
votes
5 answers

Select rows from a pandas dataframe with a numpy 2D array on multiple columns

Data I have a dataframe that contains 5 columns: Latitude and longitude of origin (origin_lat, origin_lng) Latitude and longitude of destination (dest_lat, dest_lng) A score which was computed from the other fields I have a matrix M that contains…
nbeuchat
  • 6,575
  • 5
  • 36
  • 50
6
votes
2 answers

PostgreSQL using CASE WHEN in a select query

I have a simple table in a cricket database that records the 'runs' each player scores in a game. The fields are: the player's name, the runs they scored in a particular game, whether they were 'out' or 'not out' at the end of the match. Obviously…
John Smith
  • 145
  • 1
  • 2
  • 5
1 2 3
99
100