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?
Join twice table with two foreign keys
I’d like to extract information about people and companies stored in my DB. I have 2 tables (Clients and Contacts) that point to a unique Address table containing 2 foreign keys (addressClientID and …
how to select values from tables which start with prefix
I am new to oracle database, I have about 100 tables which starts with prefix like PRE: CREATE TABLE PRE1 ( name VARCHAR2(15), value VARCHAR2(15)) CREATE TABLE PRE2 ( …
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 …
textBox to DateTime in DB
Iam trying to get a DateTime out of an textBox, where it allready is in Format of MySql DateTime. The column in the DB is also DateTime format. However, when i press my button to save the Dates in …
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 …