Skip to content Skip to sidebar Skip to footer
Showing posts with the label Union

Sum A Union Query

I'm using Microsoft SQL Svr Mgmt Studio 2008. I don't have access to create a temporary ta… Read more Sum A Union Query

Mysql - Illegal Mix Of Collations (utf8_general_ci,coercible) And (latin1_swedish_ci,implicit) For Operation 'union'

How do I fix that error once and for all? I just want to be able to do unions in MySQL. (I'm… Read more Mysql - Illegal Mix Of Collations (utf8_general_ci,coercible) And (latin1_swedish_ci,implicit) For Operation 'union'

Combining Select Distinct With Union Distinct In Mysql - Any Effect?

The following two SQL statements are functionally identical: SELECT DISTINCT a,b,c FROM table1 UNIO… Read more Combining Select Distinct With Union Distinct In Mysql - Any Effect?

Is This A Possible Oracle Bug Or Am I Missing Something?

Database is Oracle 10.2.0.1.0 - 64bit running on Red Hat Enterprise Linux ES release 4 (Nahant Upda… Read more Is This A Possible Oracle Bug Or Am I Missing Something?

Union And Order By Issue In Mysql

You should see what I'm trying to do here but it's not working $getquery = 'SELECT * F… Read more Union And Order By Issue In Mysql

Using Select Union And Returning Output Of Two Columns From One Table

I am creating a query that counts the amount of male and female actors in my table. My current stat… Read more Using Select Union And Returning Output Of Two Columns From One Table

How To Union A List Of Tables Retrieved From Another Table With A Single Query?

I have a table with a list of tables in PostgreSQL: |id|table | |--|------| |1 |table1| |2 |table2|… Read more How To Union A List Of Tables Retrieved From Another Table With A Single Query?

Select Top With Multiple Union And With Order By

I want to select the latest records from the DB in SQL Server. If only one item is selected the fin… Read more Select Top With Multiple Union And With Order By

Mysql Consolidate Duplicate Data Records Via Update / Delete

I have a table which looks like this: mysql> SELECT * FROM Colors; ╔════╦══════════╦════════╦═══… Read more Mysql Consolidate Duplicate Data Records Via Update / Delete

Oracle/sql - Combining Counts From 'unrelated' Unrelated Tables

Let's assume I two tables GOOD and BAD that stores records for widget production. My tables lo… Read more Oracle/sql - Combining Counts From 'unrelated' Unrelated Tables

Outer Union Equivalent - Gbq

I've seen how an outer union would work in this post https://stackoverflow.com/a/52524364/11883… Read more Outer Union Equivalent - Gbq

Union Syntax In Cakephp

Anyone knows a good way to make UNION query in CakePHP? I would like to avoid using $this->query… Read more Union Syntax In Cakephp

Sql - Invalid Identifier,, But Where?

Im quite a beginner at SQL and I've been trying to workout for hours now what the problem is wi… Read more Sql - Invalid Identifier,, But Where?

Tree Like Data Collation In Sql (mysql)

I have two tables in my database Table A with columns user_id, free_data, used_data Table B with c… Read more Tree Like Data Collation In Sql (mysql)

How To Combine Three Queries?

I have three queries and i have to combine them together. Query 1 WITH ph AS (SELECT chrd, chwo… Read more How To Combine Three Queries?

Zf2 Union + Pagination

I'm using ZF2 and SQL Server 2012. I'm trying to write a union query with pagination. It se… Read more Zf2 Union + Pagination

Convert Union Selects To Single Select With Loop In Mysql

I have this ugly code here in MySQL 8.0. (SELECT genre_name, actor_id, count(actor_id) FROM … Read more Convert Union Selects To Single Select With Loop In Mysql

No Records Found When Running Not In Operator

I am trying to get records from one table excluding some records (Order No.'s in the Union). Ca… Read more No Records Found When Running Not In Operator

Combining Two Sql Select Statements On The Same Table

I would like to combine these two SQL queries: SELECT * FROM 'Contracts' WHERE 'produ… Read more Combining Two Sql Select Statements On The Same Table

Insert Into Table Variable With Union

I've got a table variable that I'm wanting to insert a union query. The union query runs f… Read more Insert Into Table Variable With Union