We have a DAG that as first task aggregates a table (A) into a staging table (B). After that there is a task that reads from the staging table (B), and writes to another table (C). However, the …
Multiple Join not working on two string attributes
I have the following issue: I have several tables in my Database, in order to check for a specific criteria I have to join several tables, where I use the following statement: This statement fails. But when I remove one the following two join-conditions in the last Left JOIN, it works as intended: F.risk = ta…
PostgreSQL: VACUUM FULL duration estimation
I inherited a PostgreSQL database in production with one table that is around 250 GB in size. It only has around ten thousand live rows which I estimate to be not more than 20 MB. The table grew to …
Wrongly closed SQL parentheses [closed]
I’m fairly new at writing SQL commands so I don’t exactly know where I’m going wrong here. I closed all the parentheses, but I still get the following error message: Syntax error: Expected “)” but …
How to check if an int contains another one as part of it?
The question is fairly clear. I wanna check if for example a number x is contained in another number y. And I wanna do it in SQL (also in LINQ if possible). Additionally those integer values(y values) are Ids from a table. So when LINQ is concerned, I am not looking for some general solution like: Examples: A…
IS NULL in CASE in predicates
tell me pls, that’s real – use the CASE construct, where the expression with IS NULL/IS NOT NULL will be returned in TNEN? I have a procedure in a package that receives an input parameter and it is …
convert full date string to date mysql
I have database which contains string like this 22 Jan 2019 11:03 I would like to convert this string to date so I apply this query select DATE_FORMAT(STR_TO_DATE(’22 Jan 2019 11:03′,’%d-%m-%Y’…
SQL Query: get the date and customerid of the most expensive order placed
Can someone help me with a mySQL query? My data is: | OrderID | ItemPrice | |———|———–| | 1 | 2500 | | 2 | 500 | | OrderID | CustomerID | OrderDate | |———|…
Postgres Get column name and value as rows for given ID
I have a table like this I need to get values for a given ID like this is There any simple way to achieve this. Answer You could convert the row to a json & then use json_each to transpose the data as you desire:
How to copy Access table to SQL table in C#?
As title says I’ve used odbcconnection to sqlconnection and for the life of me cant get it to work.. Copied a bunch of code from this site but cant get them both to work. The program just hangs so …