I have a table with a text column in the database where the records for each row are recorded as lists e.g. column test: [[‘a’,’1′],[‘b’,’2′],[‘c’,’3′]] [[‘a’,’2′],[‘a’,’4′],[‘c’…
Using a foreach/while/loop with sql query
I’m using the following query to create a view. It’s currently only grabbing data from two different tables, subscriptions and subscriptionitems. For each subscription, I want to grab the item data …
Find gaps of a sequence in PostgreSQL tables
I have a table invoices with a field invoice_number. This is what happens when i execute select invoice_number from invoice invoice_number 1 2 3 5 6 10 11 I want a SQL that gives me the …
CodeIgniter Query Builder Class failed to achieve multiple where result as normal SQL query
Problem:- How to add () between multiple where if you want to execute first 2 where first then last one. as you can add bracket in sql mention below. Ci Query $this->db->select(“*”); $…
Async/Await not awaiting when SQL server unavailable
I have a .NET Core worker service that fetches a list of procedures from DB that needs to execute on a regular time interval. For every procedure Task is created with a delay after procedure executed. …
insert missing row in table oracle
I have data in table like below: Primary_id Serial_ID PRIMARY_ID SECONDARY_ID queue_ID 1 100 58 89 Q1428291 2 100 58 89 Q1428281 3 100 58 89 Q1428293 4 100 89 58 Q1428293 5 …
insert extra rows in query result sql
Given a table with entries at irregular time stamps, “breaks” must be inserted at regular 5 min intervals ( the data associated can / will be NULL ). I was thinking of getting the start time, making a subquery that has a window function and adds 5 min intervals to the start time – but I only…
Oracle sqlplus functions shows as ###
After submitting a select query, which contains functions such as row_number() or any other function the result is ####. If I use rownum as something, it shows ### if I use just rownum everything is …
Convert string to array of arrays in PostgreSQL
Want to ‘simply’ select the following string row (note that ‘it is already’ an array of arrays) to one of type float[][] From: ‘[[1.1, 1], [2.2, 2]]’ To: [[1.1, 1], [2.2, 2]] Any advice? Thanks!
Oracle PLSQL – Selecting Row with Max Value
I have rows like this: ( a , #$@$ , $$ , 3 ) ( c , ###$ , ## , 0 ) ( a , #@$# , !! , 2 ) ( b , #@## , $$ , 0 ) If I want to get the result like below ( a , #$@$ , $$ , 3 ) ( c , ###$ , ## , 0 ) ( b , …