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

SQL UNION Query with Extra Field in Results

I have a SQL query that is working well except I would like to bring the results of another column in the first db with it. This is what I currently have: SELECT parts1.PART_NBR, parts1.NIIN FROM parts1 WHERE parts1.PART_NBR='$pn' UNION SELECT…
Erik
  • 61
  • 1
  • 1
  • 2
6
votes
1 answer

julia DataFrame select rows based values of one column belonging to a set

Using a DataFrame in Julia, I want to select rows on the basis of the value taken in a column. With the following example using DataFrames, DataFramesMeta DT = DataFrame(ID = [1, 1, 2,2,3,3, 4,4], x1 = rand(8)) I want to extract the rows with ID…
djourd1
  • 459
  • 4
  • 14
6
votes
4 answers

Difference between select from table directly and view

What is the difference between SELECT data from table directly or from view? And What is the best use for each one?
ecleel
  • 11,748
  • 15
  • 48
  • 48
6
votes
3 answers

SQL Select Certain Value First

SELECT AssetValue FROM Assets WHERE (AssetType = 'Country') Very simple Select Statement, but it outputs Afghanistan Albania Algeria .... How do I make United States and Canada appear on the top of this? Is this possible with SQL…
atrljoe
  • 8,031
  • 11
  • 67
  • 110
6
votes
2 answers

Why does DataTable.Select() return the wrong rows?

The DataTable.Select() function returns the wrong rows with a filter like this... "booleanColumn1 AND booleanColumn2 AND GuidColumn1 = '00000000-0000-0000-0000-000000000000')" Making virtually any alteration to this format fixes it (see example). …
Pwner
  • 71
  • 4
6
votes
3 answers

Select the text in the input field, but the editing is disabled

I have a simple txt input field: If i click inside the input, i want to select the text. This part is fine with this: $('input.highlight').click(function(){ $(this).focus().select(); return…
passatgt
  • 4,234
  • 4
  • 40
  • 54
6
votes
4 answers

select() max sockets

Just more asynchronous stuff! Alright, so I now have a working asynchronous socket program for my main chatting application, and it's working really well! However I have one concern.. While using select() what is the maximum number of file…
ultifinitus
  • 1,813
  • 2
  • 19
  • 32
6
votes
3 answers

Detect change event on hidden select element

On a product page, a customer can select from different variants. In a "select" element, all the variants are stored. This element is hidden with display none. So, users can select variants using all fancy things like swatches and other fun stuff…
awebartisan
  • 1,424
  • 16
  • 27
6
votes
2 answers

Is there an equivalent widget in flutter to the "select multiple" element in HTML

I am searching for a widget in flutter that is equal to in flutter. An example implementation (for the web) is MaterializeCSS Select Multiple As seen above I should be able to provide a list of items (with some of them…
Finn Tegeler
  • 63
  • 1
  • 1
  • 7
6
votes
4 answers

MySQL, Select records based on values in JSON array

I'm still pretty new to handling JSON fields in MySQL. All the solutions I've come across deal with objects that have key/values; unable to find one that handles JSON arrays. Anyways, what I want to do is to be able to select all rows where the…
Davina Leong
  • 737
  • 2
  • 11
  • 28
6
votes
3 answers

Select count(*) and "join" over 3 tables

I am looking for a count query within a join of 3 tables that can get me counts on distinct values of one of these tables. I have 3 tables that I need to join to get the expected data (Workflow, Message and Message_Workflow_Relation). I want to get…
Sebastian
  • 86
  • 1
  • 1
  • 3
6
votes
1 answer

MySQL select from INT column

I was doing some system testing and expecting empty results from MySQL(5.7.21) but got surprised to get results. My transactions table looks like this: Column Data type ---------------------------- id | INT fullnames |…
Mutinda Boniface
  • 518
  • 1
  • 5
  • 14
6
votes
1 answer

Angular "select" input, change variable on option selected

I have a problem. I'm using Angular 2. I have a dropdown selection in the html and a variable "selectedVariable" in the TS file. I want to change the variable in the TS file when a option is selected. For example: When someone selects: "SCRYPT", the…
BlockchainProgrammer
  • 1,999
  • 5
  • 20
  • 32
6
votes
5 answers

jquery-traversing: select -> option -> text

I want to compare a variable with a select -> option -> text selected in order to change the "selected" attrib, here is my code, it works but I think is not the best way to write it, excuse my English, I used google translate for help hehehehe : var…
kakomerengue
  • 63
  • 1
  • 3
6
votes
1 answer

Inspect element in Chrome not showing selected option

When I use Chrome's Inspect Element feature to view a