Questions tagged [multiple-select-query]

64 questions
0
votes
1 answer

How to select and join into multiple tables with row names

Billing table | mainid | subID | subid_name | subid_value | |----------|---------|-------------|--------------| | 100 | 3478 | name | Ali Baba | | 100 | 2373 | school_type | ghetto | | 100 | 2989 |…
0
votes
1 answer

Multiple select dropdown menu search string result when selecting more than one entry in the drop down

I have built a drop down menu with names as a filter that is applied to a table of projects. I want to be able to select multiple entries from the drop down and apply them as a filter. A single entry filter works fine, but a multiple select search…
0
votes
1 answer

How can I use a where statement in my procedure with open quotes inside the select statement already?

In my procedure, I need to have input parameters for the table and I need to be able to make multiple select statements into my procedure. However when I begun to add WHERE conditions, they only worked on numerical conditions i.e. where number = 1,…
0
votes
1 answer

Multiple select from CTE with different number of rows in a StoredProcedure

How to do two select with joins from the cte's which returns total number of columns in the two selects? I tried doing union but that appends to the same list and there is no way to differentiate for further use. WITH campus AS (SELECT DISTINCT…
0
votes
1 answer

SQL - join multiple Select statements

I am trying to combine four different select statements into one that gives me the desired output. Two of the statements can be seen below (they and the others are identical with the exception of Y.Date_Year) select sum(N.EBIT)/Sum(S.Sales),…
0
votes
5 answers

Combine 3 queries using inner join

I have 3 tables that I am trying to pull information from. Sample data shown below TABLE Trip idTrip Title Date 1 Ben Lomond 08-08-2016 TABLE Person_has_trip Trip_idTrip Person_idPerson 1 1 1 2 TABLE…
0
votes
5 answers

How can I make multiple select statements on the same table?

I have a table that stores some student work info. I need to select the hours based on the studentID and the quarter ID. Here is what I have: SELECT (SELECT hours FROM clinicalStudents WHERE quarterID='201101' and studentID='$studentID') as q1, …
dcp3450
  • 10,959
  • 23
  • 58
  • 110
0
votes
3 answers

Get selected option text and not value

I have a multiple select and I want to get selected text and not the value. What I mean is this : And I want to get MH-03-P-9429 as selected text, but when I do…
Ashish Bahl
  • 1,482
  • 1
  • 18
  • 27
0
votes
5 answers

clear checkboxes of selected options in jquery multiple select

In below fiddle, I have a bootstrap modal and there is a Select Users MultipleSelect. I need to clear the selection on modal close, like set the dropdown to defaults without any selection. For example, if I select user 1 and user 2, then on modal…
0
votes
1 answer

Node JS Multiple Select

Hi i am trying to use two selects in one JS file in node js and sql server. I am unable to figure out the syntax for this. I need a select to get all the persons from a table and another select to count the total number of persons in that table.Will…
user6584711
0
votes
1 answer

MS Access: How can i select columns from different tables

In MS Access, I need to select a single row with many data from different tables with this query: select top 1 a.colname,b.colname,c.colname from tba a, tbb b, tbc c where a.colname = 'efg' or b.colname ='efg' or c.colname ='efg' I…
Jackth
  • 13
  • 5
0
votes
1 answer

Optimising multiple selects with a WHILE loop

I need to run a larger version of the SQL Server 2008 query below (42 repeats of the SELECT, as apposed to the 4 repeats shown below). It does not seem to me to be very optimised, and an ideal candidate for using a while loop, but after may hours of…
AdT
  • 3
  • 1
0
votes
2 answers

How to make MySQL filter using a combination of categories and tags

I'm trying to make a 2-step filter to sort products using product categories and product tags. One product can have several categories and several tags. But, only one category can be selected at the time. After the the user have selected a category…
StaalCtrl
  • 66
  • 1
  • 7
0
votes
1 answer

What is the sql for multiple select statements with identical fields being merged into a single output?

I have three tables table_1_Top_Performers: col_1_ID | col_2_FirstName | col_3_LastName 1 Johny Smith 2 John Que 3 Kristina Zimmerman table_2_Mid_Performers: col_1_ID |…
0
votes
1 answer

MySQL Select from multiple table with HAVING clause

I have a small database which consists of a couple of tables that I have set out below: Users | Name | Type | Extra | | id | int(10) | Auto Increment | emailAddress | varchar(150) …
jampez77
  • 5,012
  • 7
  • 32
  • 52