No announcements
Found 1596964 threads
-
1 Votes
using case in where clause
Its resolved now..There was no need to use case in where clause.Answered | 5 Replies | 3180 Views | Created by somya12 - Wednesday, May 23, 2012 6:41 PM | Last reply by Syed Qazafi Anjum - Wednesday, May 23, 2012 8:59 PM -
0 Votes
Case statement in Where Clause of SQL Query
Hi Bonediggler, Sorry my questions might not be clear, actually if the Parameter region = Total then exclude the where clause and if the parameter Region <> ...Answered | 3 Replies | 1483 Views | Created by SqlDev12 - Tuesday, August 6, 2013 4:00 PM | Last reply by SqlDev12 - Tuesday, August 6, 2013 5:19 PM -
0 Votes
Report Builder 3.0 Where clause with CASE statement
I would like to modify the drill through report but am having trouble with the WHERE clause.Answered | 4 Replies | 2347 Views | Created by shaves99 - Tuesday, October 21, 2014 6:32 PM | Last reply by shaves99 - Monday, October 27, 2014 2:53 PM -
2 Votes
case statement in where clause in sql server
As per the other replies above, your where clause needs to return a Boolean (true/false) value where something equals something.Answered | 7 Replies | 2757 Views | Created by Ahsan Kabir - Monday, February 10, 2014 10:51 AM | Last reply by Erland Sommarskog - Monday, February 10, 2014 2:22 PM -
0 Votes
Case in Where clause or select
So my idea was to take each where clause and convert it into a parameter with a value 1=yes and no =0.Answered | 7 Replies | 3449 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
using If or case in where clause
Station_End)) in the where clause and return the records which satiisfies this condition and whenever s.ascending = -1, in the where clause I ...Answered | 11 Replies | 1319 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
SQL Select with Where Clause from Case Statement
when COUNTRY='USA' then 'No' else 'Yes' end as 'mycolumn' from @t WHERE COUNTRY <> CASE WHEN COUNTRY = 'USA' THEN '' ELSE COUNTRY END group by CUSTNAME, ...Answered | 3 Replies | 11739 Views | Created by Ryan McBee - Friday, May 20, 2011 10:55 AM | Last reply by Mr. Wharty - Friday, May 20, 2011 11:16 AM -
8 Votes
T-SQL: Using CASE Statement in WHERE Clause (Multiple conditions)
> trying to use a CASE Statement in the Where Clause and I'm having difficulties.Answered | 9 Replies | 158513 Views | Created by ConstPM - Monday, August 12, 2013 5:49 PM | Last reply by Hasan Seam - Monday, November 12, 2018 12:51 PM -
0 Votes
Case within a where clause
Where location = @location or @location = 'all' Debra has a questionAnswered | 11 Replies | 949 Views | Created by Debra has a question - Tuesday, February 24, 2015 9:42 PM | Last reply by Debra has a question - Tuesday, March 3, 2015 3:15 PM -
3 Votes
Switch Case syntax in where clause
CASE is an expression and not a control statement : YES, CASE is an expression and not a control statement..I was trying to find if the Select query which ...Answered | 12 Replies | 6823 Views | Created by S Prashant - Monday, June 13, 2011 2:15 PM | Last reply by S Prashant - Tuesday, June 14, 2011 9:29 AM -
0 Votes
Case Statement with subquery under WHERE Clause
There is no such thing as a CASE statement in SQL.Answered | 9 Replies | 9105 Views | Created by gk1393 - Thursday, December 16, 2010 8:16 PM | Last reply by --CELKO-- - Thursday, December 16, 2010 8:59 PM -
0 Votes
LINQ If statement within a where clause
However, if you combine (AND) your logic you get: Where (ActiveOnly == true AND ps.StatusDescription == "Open") ...Answered | 5 Replies | 17830 Views | Created by AlpheusA - Tuesday, February 1, 2011 2:17 PM | Last reply by AlpheusA - Wednesday, February 9, 2011 11:05 AM -
0 Votes
IF Cases In Where Clause
If you mean IIF() function of 2012, it can be nested 10 levels, the same as underlying CASE.Answered | 4 Replies | 1724 Views | Created by sunnyvsk - Wednesday, October 31, 2012 9:27 AM | Last reply by --CELKO-- - Wednesday, October 31, 2012 12:45 PM -
0 Votes
Case Statement in Update Clause
Hi Parthasarthi, Please check following UPDATE statement.Answered | 16 Replies | 1053 Views | Created by Parthasarathi - Thursday, June 4, 2015 11:01 AM | Last reply by eralper - Friday, June 5, 2015 10:39 AM -
0 Votes
case-sensitive in where clause
Hi Jo, The case in your post should work.Answered | 3 Replies | 2909 Views | Created by Jo achim - Wednesday, August 12, 2015 8:11 AM | Last reply by Jo achim - Wednesday, August 12, 2015 2:09 PM -
0 Votes
Yes, another CASE statement in the WHERE clause question.
WHERE YEAR(APB.CreatedOn) = @Year AND (@Flag = 0 OR MONTH(APB.CreatedOn) = @Month) Hope its helpful....Answered | 5 Replies | 3733 Views | Created by PaulWall - Monday, August 2, 2010 10:11 PM | Last reply by PavanKokkula - Wednesday, August 4, 2010 5:16 AM -
0 Votes
How to use a case statement in where clause
as LossSt ,c.Loss_ZipCode as LossZIP ,c.Loss_City as LossCity ,c.LossType as FOL ,'' as PR ,'' as PRNum ,1 as FeaNum ,'HO' as FeaType ,case when ...Answered | 6 Replies | 807 Views | Created by SqlDev12 - Wednesday, April 1, 2015 2:20 PM | Last reply by Jason A Long - Wednesday, April 1, 2015 3:35 PM -
0 Votes
IF statement within WHERE clause
And in the worst case CTOD() just converts some nonvalid date to the empty date.Answered | 14 Replies | 3120 Views | Created by mikelvfp - Saturday, February 4, 2012 3:53 AM | Last reply by mikelvfp - Sunday, February 5, 2012 5:55 PM -
0 Votes
T-sql conditional where clause using case statement with parameter
In my scenario, the where clause will always have only one value(basically it would be current user name).Answered | 7 Replies | 6054 Views | Created by sql9 - Monday, December 7, 2015 4:30 PM | Last reply by sql9 - Wednesday, January 20, 2016 5:33 PM -
1 Votes
Case in a where statement
What if I want Out of stock, In Stock and then ALL how could I do it in this case?Answered | 8 Replies | 420 Views | Created by Fredarator Wilson - Tuesday, February 16, 2016 4:28 PM | Last reply by Jingyang Li - Tuesday, February 16, 2016 6:01 PM
No announcements