No announcements
Found 2392660 threads
-
0 Votes
Union ALL where clause
Hi, You can add a Conditonal Split to your dataflow - this has the same affect as a WHERE clause in SQL.Answered | 1 Replies | 5779 Views | Created by cat_ca - Monday, March 1, 2010 8:18 PM | Last reply by Jamie Thomson - Monday, March 1, 2010 8:53 PM -
0 Votes
SQL union query with multiple WHERE clauses
Replace all instances of "[ " with "[" 2) Why do you have tbl_TestingA in the WHERE clauses?Answered | 4 Replies | 553 Views | Created by rileye2020 - Tuesday, March 24, 2020 10:16 PM | Last reply by rileye2020 - Wednesday, March 25, 2020 3:45 PM -
0 Votes
How to create SQL UNION clause with two queries that BOTH have a WHERE clause?
They are copied from the first Select's Where clause.Answered | 13 Replies | 8194 Views | Created by Mike.Landies - Wednesday, November 4, 2015 4:38 PM | Last reply by Mike.Landies - Thursday, November 5, 2015 3:52 PM -
0 Votes
Inserting by doing a Union All with each column having a where clause
WHERE..Answered | 5 Replies | 1899 Views | Created by SqlCraze - Friday, November 16, 2012 10:40 AM | Last reply by --CELKO-- - Friday, November 16, 2012 5:19 PM -
3 Votes
UNION ALL
UNION puts extra effort to check for any duplicate records internally and UNION ALL just returns all the records as it is.Answered | 7 Replies | 4896 Views | Created by mj_developer - Sunday, January 31, 2010 8:44 AM | Last reply by Sach Vaidya - Tuesday, February 2, 2010 11:56 AM -
0 Votes
UNION ALL USING ORDER BY CLAUSE
declare @EMP table ( Name varchar(50) ) declare @EMP1 table ( Name varchar(50) ) INSERT INTO @EMP ...Answered | 1 Replies | 602 Views | Created by Ajay Singh Rawat - Monday, February 29, 2016 4:30 PM | Last reply by Tom Cooper - Monday, February 29, 2016 4:42 PM -
1 Votes
Union All
You can specify multiple values as a derived table in a FROM clause with VALUES.Answered | 5 Replies | 1087 Views | Created by chandu999 - Friday, June 26, 2015 7:50 AM | Last reply by Eric__Zhang - Monday, June 29, 2015 2:45 AM -
3 Votes
Union clause make the job crash
If I remove the UNION clause the job runs.Answered | 3 Replies | 667 Views | Created by Manu Cohen Yashar - Monday, December 29, 2014 11:17 AM | Last reply by Konstantin Zoryn - Friday, January 16, 2015 6:27 AM -
0 Votes
Do I need to use UNION ALL to combine separate SELECT statements instead of using IN & OR operators in WHERE clause?
You asked that: use UNION ALL to combine separate SELECT statements instead of using IN & OR operators in WHERE ...Answered | 5 Replies | 2217 Views | Created by 9390877 - Thursday, July 19, 2012 5:44 AM | Last reply by Steven Wang - Shangzhou - Thursday, July 19, 2012 10:20 AM -
0 Votes
Summarize data, Union ALL
In your first query you have a group by clause but no aggregates.Answered | 5 Replies | 831 Views | Created by EverydayLearner - Wednesday, November 12, 2014 2:12 PM | Last reply by Uri Dimant - Wednesday, November 12, 2014 2:32 PM -
0 Votes
Case in Where clause or select
A simple CTE example with UNION ALL.Answered | 7 Replies | 3553 Views | Created by Farhan1 - Friday, February 10, 2012 5:02 PM | Last reply by arun.passioniway - Friday, February 10, 2012 6:47 PM -
1 Votes
Where clause selective condition
Tom's right that this is probably the most efficient way (the part about replicating the query) and Erland's link in his answer is _the_ authority on optional filters in a WHERE ...Answered | 3 Replies | 3060 Views | Created by jrobinsontx - Tuesday, September 18, 2012 9:30 PM | Last reply by RichardTheKiwi - Wednesday, September 19, 2012 1:12 AM -
1 Votes
Column Alias in Where clause
If you are bent on using an alias then you will either need to use a derived table or a CTE -- perhaps something like: declare @orders table(customerId ...Answered | 7 Replies | 27590 Views | Created by almaverick - Wednesday, June 8, 2011 2:10 PM | Last reply by Kent Waldrop - Wednesday, June 8, 2011 2:24 PM -
3 Votes
Using Case statement in a Where clause
You cannot divide an IN clause like this.Answered | 2 Replies | 3265 Views | Created by Nagasayana Kuchibhotla - Wednesday, October 12, 2011 5:23 PM | Last reply by Arbi Baghdanian - Wednesday, October 12, 2011 5:27 PM -
0 Votes
Including NULL in WHERE clause
You may try below if NULL is character NULL as well: select * from tablename where field is NULL OR field IN ...Answered | 3 Replies | 1218 Views | Created by Sam233 - Wednesday, April 17, 2013 12:49 PM | Last reply by SQLZealots - Wednesday, April 17, 2013 1:03 PM -
0 Votes
Sequence of resultsets in Union All
I'm trying to avoid the expense of the Order By especially if sequence of Union All-ed resultsets is guaranteed.Answered | 7 Replies | 5896 Views | Created by Peter Burn - Tuesday, September 20, 2011 10:21 PM | Last reply by Kalman Toth - Monday, September 26, 2011 2:09 PM -
1 Votes
using If or case in where clause
= s.BegStation) and (sp.station <= s.EndStation)) ) or (S.ASCENDING = -1 and ((sp.STATION >= s.EndStation)) and ((sp.stationAnswered | 11 Replies | 1457 Views | Created by srisql - Thursday, October 17, 2013 6:53 PM | Last reply by Stefan Hoffmann - Friday, October 18, 2013 8:01 AM -
1 Votes
Difference between union and union all.
sandip, UNION provides the distinct set of results, while UNION ALL provides the entire result set.Answered | 3 Replies | 1590 Views | Created by BhaSandy - Tuesday, February 11, 2014 8:25 AM | Last reply by Jayakumaur (JK) - Tuesday, February 11, 2014 9:36 AM -
2 Votes
How to Use CTE function in Where Clause or Where In Clause
You can not define a CTE in the where clause of a select stmt.Answered | 6 Replies | 24149 Views | Created by Kaleeswara Murthy - Saturday, February 25, 2012 7:21 PM | Last reply by Vinay Valeti - Saturday, February 25, 2012 11:04 PM -
0 Votes
Case statement in Where Clause
union all select 13, 'Nothing' union all select 16, 'Nothing' union all select 16, null union all select 17, ...Answered | 6 Replies | 2064 Views | Created by R_i-c_h - Friday, November 16, 2012 8:16 PM | Last reply by R_i-c_h - Friday, November 16, 2012 9:07 PM - Items 1 to 20 of 2392660 Next ›
No announcements