I want limit the database access for a client. How can I define a explicit white list of SQL queries, witch can only execute a database user?
Tag: sql
Column Concatenation in Oracle [closed]
I’m trying to Concatenate these three columns into one but having the error, any help? WITH ABC AS (select tsk.task_number || ‘ / ‘|| tsk.task_status|| ‘ / ‘|| tsk.summary, CSI….
How to merge rows based on date/time
Microsoft SQL Server Management Studio 14.0.17224.0 I have a dataset where users perform tasks for clients. Sometimes tasks can be done at the same time and sometimes not. I need to merge records …
SQL to return 1 for each row with column range in 2017 or 2018 or 2019
I have a query that looks like this: SELECT DISTINCT p.person_ID ,p.Last_Name ,ISNULL(p.Middle_Initial, ”) AS Middle ,p.First_Name ,sh.Status_from_date ,sh….
Query that returns date of first and last record for each day within a d
I have a table that records vehicle locations and I wish to query this to get the first and the last record for each vehicle for each day in a date range. The table looks like: Registration Latitude …
Aggregation Of Overlapping Events Problem
I have a list of 1 to N Shifts Each shift can have N events with their own start and end date I want to Aggregate and salami slice these into a common aggregate event, that changes whenever the shifts …
How to “fetch first 1 row only” per IDs in 3 different columns?
I am attempting to fetch 1 row only based on unique set of IDs in another 3 columns. In my database, there are many records per date for each of a unique set of IDs in the other 3 columns (you can …
Ignite: Failed to run reduce query locally
Ignite version:2.7.0 Here are the expressions I use: SELECT CASE WHEN YEAR(A1) = 2016 THEN SUM(A2) END FROM table1 I got such a mistake: org.jkiss.dbeaver.model.sql.DBSQLException: SQL …
Mysql – How to query a column for duplicates values but have different values in a different column?
I have a table with the following structure: I am trying to query for all duplicate emails that have different values in the Unsubscribed column. I want to return something like this based on the above example: Answer It think you just want this: The HAVING clause would only assert to true if a given email ap…
How i take a value that is like field in my database?
I try to get values that contains words in my sql database. I try with “contains” but I get an error. I work with SQL This is my code: I have this error: UnhandledPromiseRejectionWarning: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL s…