I have two (identical for this purpose) tables ToDoList DoneList I’m trying to get a count from each of these per [ItemBatch] but not sure if that’s actually possible in one query? Separately I’d just do and assign to variables in the front-end so I could get the following: Is there a query …
Tag: sql
Date Conversion Issues ORACLE SQL
this is going to be a totally newb question but my google-fu isn’t landing me anything timely so I figured I would ask you Trying to do this query: But the predicate column is formatted as such: I’m guessing my TO_CHAR and CAST isn’t sufficient due to the error: Anyone happen to know off the…
Select if exists in another table, with AND condition
I haven’t found the answer to my question specifically even though there are very similar subjects on the same matter. Here is my database (MySQL) : I wish to select links where their SOURCE and TARGET exists in the urls table. I’m guessing subqueries or left join will be the answer, but I canR…
call oracle function with parameters
I started to learn pl/sql.I have problem with functions.I created a function like this I want to call this function like this select GET_RANK_INFO(‘12345′,to_date(’10/03/2019′,’dd/mm/yyyy’),null) from dual; but it gives error like that the number of argument types invoked i…
I want to make monthly report from SQL using 3 tables [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question I wan…
syntax error (missing operator) in query expression – VBA and Access
I build a query with this syntax: I did a test query in MariaDB, and it worked. Now, i am use this query in Access with VBA MSExcel, where it has the same structure and relationship between tables, but return error. message error vba: Syntax error (missing operator) in expression ‘t.id_empresa = e.id_em…
Count only non duplicate values
I need a query to count only values that aren’t duplicates, is there any way to do this without subqueries or temp tables? If I have a table like this: I can’t use SELECT COUNT(DISTINCT quantity) because it returns 4. (89 | 40 | 32 | 29) How can I return 2? (89 | 32) Answer Use a subquery:
‘Procedure Has Too Many Arguments’ Error Although I Have Only Two
I checked the other posts related to this problem but could not find any answers. I have a post action method for my hotel api and in the Hotel Repository I have this CreateHotel method below. I just enter two arguments and there’s two arguments in the stored procedure too but I get this error: System.D…
Get total count of duplicates in column
I need a query to count the total number of duplicates in a table, is there any way to do this? If I have a table like this: I can’t use SELECT COUNT(quantity) because it returns 2. (40 | 29) How can I return 5? (40 | 40 | 29 | 29 | 29) Answer Using analytic functions:
Left Join Where Clause (name matching ID from another table)
I want to the output to be the birthday, first and last name of customers who have been served by David who has the employee ID of 1. But for some reason (and it may be obvious, im only a beginner), it only outputs one row of Victor who’s c_id matches e_id (which I know the clue is somewhere there