No announcements
Found 2392499 threads
-
1 Votes
difference between union all, union and intersect and minus in sql server
just tell me when one should use union all and when union ?Answered | 6 Replies | 12330 Views | Created by Sudip_inn - Monday, October 31, 2016 1:41 PM | Last reply by KEAARPEE - Monday, October 31, 2016 2:40 PM -
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 | 1688 Views | Created by BhaSandy - Tuesday, February 11, 2014 8:25 AM | Last reply by Jayakumaur (JK) - Tuesday, February 11, 2014 9:36 AM -
0 Votes
Avoiding Union All
UNION ALL is not bad and does not have the performance overhead of UNION.Answered | 6 Replies | 4946 Views | Created by Abhay_78 - Friday, January 4, 2013 8:45 AM | Last reply by Murali P B - Friday, January 4, 2013 10:22 AM -
0 Votes
Case Statement in Where Clause
Thanks Tom, I was already using this using Union all.Answered | 5 Replies | 4594 Views | Created by Mannu S - Wednesday, May 9, 2012 6:00 AM | Last reply by Tom Cooper - Wednesday, May 9, 2012 2:08 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 | 1545 Views | Created by srisql - Thursday, October 17, 2013 6:53 PM | Last reply by Stefan Hoffmann - Friday, October 18, 2013 8:01 AM -
0 Votes
Union all
You can try like this :- select name,city,state,convert(varchar(20),phone) as Phone from ...Answered | 4 Replies | 2513 Views | Created by Farhan1 - Thursday, August 9, 2012 12:52 AM | Last reply by RohitGarg - Thursday, August 9, 2012 4:57 AM -
8 Votes
The mechanics of the WHERE clause
b) Start in the FROM clause and build a working table from all of the joins, unions, intersections, and whatever other table ...Answered | 15 Replies | 9244 Views | Created by falcon00 - Monday, May 6, 2013 4:29 PM | Last reply by sganeshanexeter - Friday, February 20, 2015 7:18 AM -
1 Votes
order of columns in where clause
The columns can be specified in any order in the WHERE clause.Answered | 34 Replies | 9545 Views | Created by nadirsql - Monday, June 27, 2011 12:48 AM | Last reply by Brad_Schulz - Tuesday, July 5, 2011 5:19 PM -
3 Votes
Case statement in where clause
I'm sorry for all the confusion, finally I was able to make it work.Answered | 13 Replies | 1281 Views | Created by anishap456 - Wednesday, December 3, 2014 6:33 PM | Last reply by anishap456 - Wednesday, December 3, 2014 9:32 PM -
4 Votes
UNION ALL with IF...ELSE (Transact-SQL)
You see my parameter is a Bit DataType and I'm determining if the year is leap year 1 or 0, so I really can't put this parameter in my where clause select statement.Answered | 14 Replies | 45054 Views | Created by Codernater - Tuesday, August 18, 2009 3:43 PM | Last reply by KTRIVEDI - Thursday, February 7, 2013 9:04 PM -
3 Votes
Alternative for OR in WHERE clause
You need to test the quality of the result and performance and find the best option for you, if this is just a few seconds difference, I would recommend keep the OR as it simplifies the query, ...Answered | 14 Replies | 7788 Views | Created by warnerrj79 - Friday, July 26, 2013 1:33 PM | Last reply by FistOfFury - Thursday, May 3, 2018 9:08 PM -
0 Votes
SQL Union all VS SSIS Union All
Yes, it makes sense. :) I wanted to avoid Partially blocking Union All transformation, hence I didn't think of other options.Answered | 5 Replies | 3174 Views | Created by Prabu KS - Tuesday, December 16, 2014 1:08 PM | Last reply by Vaibhav.Chaudhari - Wednesday, December 17, 2014 9:39 AM -
8 Votes
UNION ALL
Partitioned views are avilable in all versions of SQL Server.Answered | 7 Replies | 2169 Views | Created by Steve_Fox - Wednesday, January 30, 2013 8:47 PM | Last reply by Erland Sommarskog - Thursday, January 31, 2013 8:31 AM -
1 Votes
where clause and on clause
Premature optimization is the root of all evil in programming.Answered | 3 Replies | 5107 Views | Created by Rajendra _ - Monday, April 12, 2010 11:28 AM | Last reply by Naomi N - Monday, April 12, 2010 1:49 PM -
1 Votes
Using If statement in where clause
=(Case When @Checkout > hasta then @CheckIn+1 Else @CheckIn End) And Calendario.Fetcha <=(Case When @Checkout > hasta then @CheckOut-1 Else @CheckOut End) ) AND Hoteles = ...Answered | 5 Replies | 21007 Views | Created by tonydeleons - Thursday, September 22, 2011 8:09 PM | Last reply by tonydeleons - Friday, September 23, 2011 8:29 PM -
4 Votes
From and Where clauses
information from this table, you use the FROM clause.Answered | 4 Replies | 4180 Views | Created by Ajaykumar Muchakurthi - Friday, April 20, 2012 1:39 AM | Last reply by Samuel Lester - MSFT - Friday, April 20, 2012 3:37 AM -
4 Votes
TOP clause plus UNION throw different results
The query with SELECT TOP should include an ORDER BY as best practice: FROM MSDN: "In a SELECT statement, always use an ORDER BY ...Answered | 8 Replies | 708 Views | Created by Enric Vives - Wednesday, December 7, 2016 2:38 PM | Last reply by Jingyang Li - Thursday, December 8, 2016 3:36 PM -
2 Votes
WHERE clause
Putting the condition from WHERE to the join ON condition is correct.Answered | 2 Replies | 1577 Views | Created by mikelvfp - Monday, October 15, 2012 4:28 AM | Last reply by mikelvfp - Monday, October 15, 2012 2:44 PM -
2 Votes
Concatenation in where clause
I tried all 3 queries and query 2 performed best as per execution plan.Answered | 8 Replies | 1626 Views | Created by Sql-Seek - Thursday, May 23, 2013 10:41 PM | Last reply by Gert-Jan Strik - Tuesday, May 28, 2013 6:37 PM -
0 Votes
Where clause
ValidateDateTime and then you ran Declare @date date = '2015-02-12' Select * from table1 where ValidateDateTime >@Date ...Answered | 2 Replies | 996 Views | Created by Vaishu - Tuesday, August 11, 2015 1:58 PM | Last reply by Berimi - Tuesday, August 11, 2015 2:08 PM
No announcements