Skip to content

What is wrong with my Postgres statement?

I am trying to select list of employees, but i know some employees do not have manager_id, for these employees without manager_id (null) i want the result to display “pip” while for the rest it displays original info. Answer The code you want is probably: Or more simply: The two significant issues…

How to intersect 2 subqueries

Hello i want to intersect 2 long Queries with each other but i found out that you can only intersect simple Queries. Is this possible to get something like this? `SELECT id, name as antibodyName FROM …

Sorting all data by date with Group By

This is my table. INSERT INTO dbo.cash_flow(date_info,expl,flow_type,currency_type,amount,flow)VALUES (‘5.10.2020′,’d8′,’gelen’,’gbp’,5000,’case’) INSERT INTO dbo.cash_flow(date_info,expl,flow_type,…

t-SQL cartesian production of several tables

I would like to get a cartesian product of several tables in SQL (which are actually only one column, so no common key). For example: I tried CROSS JOIN, but I couldn’t find an example with multiple tables. Is the only way to do it is nesting? What if we have 15 tables to join that way… it creates…

Insert into select SQL with windowsForm

I want to insert some data in Table1 in my database selecting it from another Table2 but the Table1 has another attribute for username (ComputerName). What I have tried: Answer I think you are looking for something like this :