I want to get all rows from my table, the table have one column with the following date type ’14/07/2017 05:01:35 p.m.’ between specific hours. Like between ’00:01:00 am’ and ’01:00:00 am’. I’m …
Tag: sql
Unexpected NULLs in outer join
I have 3 tables I’m trying to join. Let’s call them TableA, TableB, and TableC: DECLARE @TableA TABLE ( Key1 int, PRIMARY KEY ( Key1 ) ) DECLARE @TableB TABLE ( Key1 int, …
My PLSQL trigger is not looping through the table
I have a group project and we are using PLSQL to make a shopping cart application. We are creating a trigger in order to cancel a shopping cart and return all of the items back to stock. As it is now, …
How to find expected results from SQL queries
I am currently writing a C++ application to parse and execute SQL statements. I have got so far with it but now I am finding it difficult to continue because I don’t known what should happen in …
Access Unmatched or similar query where a column does not contain or is not like another column
I want to design a query that basically does a mass amount of “Not Like “*x*”, except all of the things I would not like the query to contain are in another column. I know I can do this one at a time …
MS Access like query with # in the result
I’m just trying to have a query that searches for “#” in a field. SELECT dbo_PartNumber.* FROM dbo_PartNumber WHERE (dbo_PartNumber.[Part Number] like “*#*”);
How to make a Query in MS-Access that returns the intersection of three other queries?
I have a “search” form that allows the user to input location, date, or ID. This form generates three queries, which return appropriate results, or all records if no search term was input for that …
Select within the same table
I’m studying SQL statements and i got stucked in this scenario. The problem is to select data that has associantion column with another in the same table, the result that i want is to select ” Name …
Returning multiple columns from a table with no duplicates of one of the columns
I have a SQL Server table containing columns id and email (amongst others). The id column contains distinct values, the email column may contain duplicates. I can retrieve all the distinct email …
How to account for double entries in a card swipe table?
How do I account for accidental swipes in a card swipe table? I tried selecting the max(time_cst) by grouping them on entry. It did not solve the problem. http://www.sqlfiddle.com/#!18/06cc8/2 EmpID …