Questions tagged [multiple-select-query]

64 questions
5
votes
1 answer

The multi-part identifier could not be bound

trying this select tblPersonalInfo.companyname, tblJobBudget.title,tblJobBudget.lastmodifiedby, tblJobAdv.advtitle, tblJobAdv.userId, tblApplication.advid, tblApplication.position from tblJobAdv inner join tblApplication ON tblJobAdv.advid…
4
votes
3 answers

Merge two select queries sql

Hey i'm using oracle sql to create a database. I im now working on queries and i have come up with two seperate quires which i would like to merge in order to get a result. The first query i have created is to find out the total money made by a…
Davide Sousa
  • 107
  • 1
  • 2
  • 8
3
votes
1 answer

Best way to combine multiple advanced mysql select queries

I have multiple select statements from different tables on the same database. I was using multiple, separate queries then loading to my array and sorting (again, after ordering in query). I would like to combine into one statement to speed up…
Ryan Thompson
  • 458
  • 5
  • 15
3
votes
2 answers

a great select query including count

I have around 20 tables including examination records of students. I tried to figure out my question (Student ID = sID, i.e. Score 1 : s1) : StudentsTables : (student reg.data) sID name surname regDate photo ........ 891 Mike…
Murat Calim
  • 580
  • 1
  • 6
  • 11
3
votes
2 answers

Statement work on phpmyadmin but not through php

Possible Duplicate: PDO support for multiple queries (PDO_MYSQL, PDO_MYSQLND) i have a statement here.. when i ran it from phpmyadmin.. i got my query works.. but it doesnt when i execute it from php.. here's my query (statement) SET @sql =…
Wawan Brutalx
  • 603
  • 6
  • 15
  • 27
2
votes
1 answer

Select same column with multiple conditions using one query

I'm looking for query that can return same results as two given queries: select foo as res1 from table t where t.id in (1,2) select foo as res2 from table t where t.id in (3,4) I need something like: select (select foo from table t where t.id in…
Calliso
  • 31
  • 6
2
votes
5 answers

Multiple selectors on click function, how to know which selector was clicked?

new to Jquery here. I have four selectors on a click function, see code below, this is because I want the same effect happening on all of them when clicked, instead of making a click function for all four selectors. However, when clicked I want the…
2
votes
2 answers

Multiple select - value of deselect returns null

Description I am using a jquery plugin chosen which pretty much does something like this: This lets me add each option one by one or remove each option one by one. For every option selected, I create a new element with the selected option's value…
kemicofa ghost
  • 16,349
  • 8
  • 82
  • 131
2
votes
4 answers

How to identify the query that caused the error using mysqli_multi_query?

Using a example from elsewhere on SO to better catch 'hiding' errors. While the code below will catch and return an error, is it possible to improve this to report for which query the error occurred? With the code below, the output is: Columns:…
David
  • 3,285
  • 1
  • 37
  • 54
2
votes
1 answer

Linq PredicateBuilder multi criteria

List Prs = data.Products .Where(x=> x.ProductColors .Where(y=> y.Color=="blue") .Select(z=> z.ProductID) .Contains(x.ID) &&…
user1439338
  • 130
  • 7
1
vote
1 answer

Mysql selecting top 10 of each category analytic function

I have a table which has the following two columns including others: rating, price and code. Ratings is similar to a category. I wish to generate the top 10 for each rating order by price ascending where code = 'ABC'. I'm at a loss to figure out…
user1038814
  • 9,337
  • 18
  • 65
  • 86
1
vote
1 answer

LARAVEL 9: how to make and save data to database with multiple select dropdown form?

I'm making multiple select options in modals, but when I select only 1 option that can be selected, what's wrong with it? Please help. this is Controller: public function store(Request $request) { // dd($request->all()); $settingalokasi =…
1
vote
1 answer

Can I alias a select query in a multiline update in MySQL?

I'm trying to make this MySQL code more readable: UPDATE customers SET last_order_date = (SELECT MAX(date) FROM orders WHERE customers.customer_id = orders.customer_id), added_note = (SELECT note FROM orders WHERE customers.customer_id =…
uzumaki
  • 1,743
  • 17
  • 32
1
vote
1 answer

How to "PERFORM" a CTE query returning multiple rows/columns?

As a follow-up to this question: How to "PERFORM" CTE queries in PL/pgSQL? I try: perform (with test_as_cte as(select * from myTable) select * from test_as_cte); But get the following error: SQL Error [42601]: ERROR: subquery must return only…
1
vote
2 answers

Query to select a list of values from a table based on this multiple criteria

I have a table with 2 columns, Ex_Id and Term_Id, both int type. My table will have many Term Ids for one Exercise Id. Table would look like this: Ex_Id Term_Id 1 2 1 3 1 4 1 5 …
nawfal
  • 70,104
  • 56
  • 326
  • 368
1
2 3 4 5