Category "sql"

Is it possible to run a job with multiple stores running in it at the same time in SQL server?

I want to run 1 store multiple times like this in jobs. But somehow there is a problem that jobs only runs the first line of insert and the following lines do

Update the column in case of duplicate in mysql

So I am storing some config values in my table which looks like name value secret 1223 url "url" Now I have a situation where I want to update the secr

MariaDB converting datetime string to date

Trying CONVERT() Trying STR_TO_DATE() Trying CAST() - neither DATE or DATETIME work Trying CAST(STR_TO_DATE()) Hi, I cannot figure out what I'm doing wrong with

Missing right parenthesis in a Create sentence

I get this missing right parenthesis but I cant find it CREATE TABLE PUBLICACION AS (SELECT id AS id_revista, nombre AS nombre_revista, COUNT(C.dni) AS cuan

Passing dynamic table to ADO.NET Destination in SSIS

I'm having a problem with my dynamic table name in ADO.NET Destination. The control flow is: SQL Query that bring me all the tables I need from an OLE DB connec

SELECT DISTINCT, ORDER BY expressions must appear in select list - error when migrating from Oracle to Postgres

I'm in the process of migrating our database from Oracle to Postgres. We have a number of hardcoded queries in our spring boot application that now break as res

Is there a way to create an inline anonymous table in Oracle like in PostgreSQL?

I have a postgres query that creates an anonymous table from string values and then joins on them like this: select distinct anon_table.string1,

What is 'name' keyword in oracle sql? [closed]

Please explain this 'name' keyword What is it? How we can use it? Syntax?

Calculate sum of partial table with SQL

I have the following table: +-------+------------+ | level | count(uid) | +-------+------------+ | 3 | 1 | | 4 | 1 | | 0 |

Amazon Redshift- How to get start date of the Week from existing daily date field from the table?

I am trying to get start date of the week from existing daily date field from the same table. For example daily dates from 05/08/2022 to 05/14/2022 , the start

SQL comparison matching ORDER BY

When one orders results by multiple columns the database has to do something to compare NULL values (e.g. order them first last). But how can I replicate that

How to include cascading choice list in different fields in REDCap

I have a scenario where I have to include choice lists of district/sector/cells/village (each of them is a field). I want to build a cascade, that way a choice

How to not return duplicates when comparing records in same table (A:B and B:A)

I have been stuck with this problem for a while now and can't resolve it, would greatly appreciate some guidance I am comparing records in a persons table to se

Effective query than AND operator in SQL

I am using Oracle database. The below query is not working as expected. select * from cst_cust_attributes where attribute_value='event' and attribute_value='

Why does a known type produce a runtime error but an inferred type produces a null value?

Let's take the following example from BigQuery, but it's the same across all other databases I've seen: with tbl as ( select [1,2,3] as arr, '{"IDS": [1

WP Slow queries / Duplicated queries - images

I have problems with slow and duplicated queries, I'll need assistance, I'm working on this for more than 10h+. Latest WP version - Latest Flatsome theme and ju

Trying to get only cells with certain initials but giving me syntax error? SQL

So my assignment question is to "Get a list of all books withdrawn by people with the initials 'B.W.'. Show a column for the first name, last name, initials, an

SQL Query for persons liking both fruits and vegetables [closed]

I have a situation I am trying to resolve. Might be simple but I can't figure it out. I have simplified my table that I am trying to pull data

WHERE clause with multiples conditions with values from the SELECT

I need to edit an old Access form. When a person enters information into a form field, a number associated to a name is found through a SQL SELECT statement. "S

is there a way to extract duplicated row value in sql as the key/grouping value?

I have following two tables users id | name 1 | john 2 | ada events id | content | userId 1 | 'applied' | 1 2 | 'interviewed| 1 What would be the