Skip to content
Advertisement

Tag: database

PL/SQL No data found even there should be?

I’m currently learning PL/SQL atm and I have run into an issue with one of my homework questions. In the below code, I’m getting user input for a province and isolating select results using said province in the declaration of the cursor and trying to run the visitsandtotal procedure but all I’m getting is no data found, why? user prompt

MySQL – Slow query

Sorry for the long post, but the tables involved are quite big. When I run the query bellow it normally takes about 1m to run. However, when I remove the correlated sub-query I get the query down to 15 seconds. So I think that’s the actual problem. Problem is, I don’t really know how to get the SUM results without

Query that will select a timeframe from specific date to today

I’m having issues in my WHERE clause selecting data from a specific day to today’s date. The day/time format in my date column is ‘7/2/2020 3:12:08 PM’. I’ve tested a couple options but keep getting this error – ‘literal does not match format string’. Any idea’s of how I can select all data from March 1, 2020 to current date?

How to search in a SQL database table

I have a table with the following columns: user_id user_name user_unit user_last_name user_first_name user_email I want to write a query that the user declares a string that contains a word/part of a word/user_name/user_id/full name/ext. and the query returns all rows the contains the string, sorted by most relevant. Any offers? Answer You can concatenate the columns together and use like:

Advertisement