Quantcast
Channel: Questions in topic: "union-all"
Browsing all 18 articles
Browse latest View live

What is the difference between UNION and UNION ALL?

What is the difference between union and union all in sql server? Is this related to joins(I can specify full join). Thank you all.

View Article



Union All with sources that occasionally do not exist

Hi, I am using an SSIS package to draw data from a DB2 database via an ODBC connection. There are 8 source files/tables that have identical columns and datatypes. Using a 'Union All' transformation I...

View Article

Combine Views

How to create a combined view from 3 views? First view:- SELECT DISTINCT TOP (100) PERCENT f.FacilityGenId, f.FacilityNumberPrefix, f.FacilityNumber, f.FacilityName, ad.Address, ad.City, rc.CountyName,...

View Article

Use a pivot in a UNION

I am trying to combine ALL the records from BOTH OF these tables. Each TABLE has SOME id's that the other does not have so I don't want to lose any in the process. My problem is the TotalUsages and...

View Article

select query with or with out union all

Hi , I have the following requirement . I need to join two tables based on condition 1 and pick field A from table2 and based on condition 2 and pick field b from table2. Please find below my query....

View Article


What is the difference between UNION and UNION ALL?

What is the difference between union and union all in sql server? Is this related to joins(I can specify full join). Thank you all.

View Article

Union All with sources that occasionally do not exist

Hi, I am using an SSIS package to draw data from a DB2 database via an ODBC connection. There are 8 source files/tables that have identical columns and datatypes. Using a 'Union All' transformation I...

View Article

Alternative to UNION ALL

![alt text][1]![alt text][2]All, Following is the query, and if run by chunks as select it returns data in no time, but when run as of whole it its taking more than 20 secons, even to produce the data...

View Article


Combine Views

How to create a combined view from 3 views? First view:- SELECT DISTINCT TOP (100) PERCENT f.FacilityGenId, f.FacilityNumberPrefix, f.FacilityNumber, f.FacilityName, ad.Address, ad.City, rc.CountyName,...

View Article


Use a pivot in a UNION

I am trying to combine ALL the records from BOTH OF these tables. Each TABLE has SOME id's that the other does not have so I don't want to lose any in the process. My problem is the TotalUsages and...

View Article

SQL Union Operator

Hi, Here is the example query. Query1: Select supp_addr_addid 'billtoaddid' from supp_addr_address(nolock), supp_bu_suplmain (nolock) where supp_addr_supcode = supp_bu_supcode and supp_addr_supcode =...

View Article

select query with or with out union all

Hi , I have the following requirement . I need to join two tables based on condition 1 and pick field A from table2 and based on condition 2 and pick field b from table2. Please find below my query....

View Article

Select by union with different number of columns

I have two tables as given CashRegister SalesOrder Date PaymentId CustId VenId Debit Credit Date SaleOrderId CustId Debit Credit 2/2/12 Pay_1 Cus_1 444 3/2/2012 So_1 Cus_1 666 4/2/12 Pay_2 Ven_1 555...

View Article


Does UNION ALL have an ORDER BY Bug?

Is this a Bug in the ORDER BY? The UNION behaves as expected, whereas the UNION ALL does not. I know UNION has an additional step where it gets rid of duplicates; but I can't understand why they sort...

View Article

How to combine 5 activity types into one master table

Hello, I have 5 types of activities: Call, Meeting, Message, Note, and Task. Each one of these activities have a header and detail views. There is also an Activity table that contains the activity type...

View Article


Slowly Changing Dimension - Lookup/Union All

I am relatively new to creating slowly changing dimensions in my SSIS packages. So I beg your indulgence. After adding my OLE DB source, I then added the lookup transformation tool. After establishing...

View Article

Removing UNION ALL From Query

Hi there, Is there a smarter way to write a SELECT query so that the UNION ALL is removed and that the table is only queried once? Here is the test data: CREATE TABLE t2( ID INT, Condition1...

View Article


Insert Blank Row in Union All Query

Is it possible to Insert A Blank Row in a Union All Queryafter every customer sales totals?

View Article
Browsing all 18 articles
Browse latest View live




Latest Images