No announcements
Found 1596958 threads
-
1 Votes
CASE statement in where Clause
Your Case statement will never work.Answered | 5 Replies | 1440 Views | Created by luizinyo - Tuesday, April 2, 2013 4:01 PM | Last reply by Naarasimha - Tuesday, April 2, 2013 5:02 PM -
0 Votes
CASE STATEMENT IN WHERE CLAUSE
" clause be eliminated?Answered | 8 Replies | 4209 Views | Created by GarinTiger - Monday, April 25, 2011 4:50 PM | Last reply by Hunchback - Monday, April 25, 2011 6:14 PM -
0 Votes
CASE statement in where clause
> I am trying to write a CASE statement in WHERE clause and facing some issues.Answered | 3 Replies | 1189 Views | Created by Sammy Williams - Sunday, August 24, 2014 12:41 PM | Last reply by --CELKO-- - Sunday, August 24, 2014 2:23 PM -
0 Votes
Case Statement in Where Clause
I wanted to use Case in where.Answered | 5 Replies | 4382 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
case statement in where clause
= @param1) and ...Answered | 4 Replies | 1258 Views | Created by kiranshiva - Wednesday, March 25, 2015 5:50 AM | Last reply by Uri Dimant - Wednesday, March 25, 2015 8:46 AM -
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, 'Yes, use corporate Email' union all select 18, null ; select * ...Answered | 6 Replies | 1914 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 -
3 Votes
Using Case statement in a Where clause
From Table1 Where 1 = (Case When Condition1 And Condition2 Then (Case When Column2 In (2, 3) Then 1 When Column2 = 5 Then 1 Else 0 ...Answered | 2 Replies | 3141 Views | Created by Nagasayana Kuchibhotla - Wednesday, October 12, 2011 5:23 PM | Last reply by Arbi Baghdanian - Wednesday, October 12, 2011 5:27 PM -
3 Votes
Case statement in where clause
My guess - all rows where status is one of: 'A','N','LOA','P','D'.Answered | 13 Replies | 1078 Views | Created by anishap456 - Wednesday, December 3, 2014 6:33 PM | Last reply by anishap456 - Wednesday, December 3, 2014 9:32 PM -
0 Votes
Case statement in the Where Clause?
WHERE @dStartDate <= CASE WHEN Status IN (1,2,3) then CompletedDate else [InProgressDate] END AND @dEndDate > CASE WHEN Status IN (1,2,3) then ...Answered | 2 Replies | 2739 Views | Created by midway11 - Tuesday, October 11, 2011 4:24 PM | Last reply by midway11 - Tuesday, October 11, 2011 5:01 PM -
0 Votes
CASE statement in a WHERE clause
I think it's the same case here - we either JOIN or not join at all.Answered | 12 Replies | 2523 Views | Created by ChrisTheDBA919 - Monday, April 16, 2012 2:51 PM | Last reply by Naomi N - Monday, April 16, 2012 4:28 PM -
1 Votes
Case statement in where clause
You need to write separate statements or where 1 = case when @GLCreditAccount IS NULL and CI.GLCreditAccount IS NULL then ...Answered | 4 Replies | 4263 Views | Created by KevinPat - Thursday, April 19, 2012 7:44 PM | Last reply by Naomi N - Thursday, April 19, 2012 8:19 PM -
1 Votes
Case statement in a where clause
CASE is an expression and not a control flow statement.Answered | 4 Replies | 1892 Views | Created by Mikie Hamilton - Friday, November 9, 2012 4:17 PM | Last reply by --CELKO-- - Friday, November 9, 2012 5:02 PM -
0 Votes
Using CASE in the join statement in the AND clause.
Hi SqlCraze, we gon't use in two join between "And Case statement".Answered | 6 Replies | 1579 Views | Created by SqlCraze - Thursday, December 19, 2013 7:52 PM | Last reply by Ch. Rajen Singh - Friday, December 20, 2013 7:41 AM -
0 Votes
SQL case statement in where clause
I suggest to use this construct instead IF @Name = 'Alphabet' select col1,col2,col3_date from table1 where col3_date between @StartDate and @EndDate ...Answered | 4 Replies | 7569 Views | Created by sql9 - Friday, April 29, 2011 2:02 PM | Last reply by sql9 - Monday, May 2, 2011 8:03 PM -
0 Votes
CASE like statement in WHERE clause?
Here is the solution, pretty sure we could filter in the WHERE clause but so far no luck IF @ActiveVendorOnly = 1 ...Answered | 7 Replies | 653 Views | Created by old_School - Tuesday, May 24, 2016 3:02 PM | Last reply by old_School - Wednesday, May 25, 2016 2:45 PM -
2 Votes
Need help with CASE statement in WHERE clause
It will always go to the second WHEN statement when @division is 120, right?Answered | 7 Replies | 1323 Views | Created by GarinTiger - Tuesday, April 9, 2013 8:26 PM | Last reply by Junaid_Hassan - Wednesday, April 10, 2013 5:04 AM -
0 Votes
Case statement in where clause
/* List Control should have member value property and member name property Member value : O,BR,0 Member name: open,bill required,all */ declare ...Answered | 4 Replies | 1576 Views | Created by B New Bee - Wednesday, December 11, 2019 4:06 PM | Last reply by B New Bee - Wednesday, December 18, 2019 9:40 PM -
0 Votes
CASE statement/ conditional where clause
SELECT * FROM sys.tables T WHERE ( [Rule].Specialty = 'excld sss' AND Data.Location IN ( SELECT Location ...Answered | 4 Replies | 828 Views | Created by JasonDWilson77 - Wednesday, November 19, 2014 3:11 PM | Last reply by JasonDWilson77 - Wednesday, November 19, 2014 4:40 PM -
2 Votes
Select Case In Where Clause
This is actually for an update query where I'm going to need to use a case statement for an update, so I might have some more questions for you.Answered | 7 Replies | 2133 Views | Created by DanHaf - Tuesday, December 18, 2012 2:23 PM | Last reply by johnqflorida - Tuesday, December 18, 2012 9:58 PM -
1 Votes
Case When in where clause
DECLARE @Site VARCHAR(20) SET @Site = 'C001' SELECT * FROM Site WHERE (@Site = 'C001' AND Site IN('C001A','C001B')) OR (@Site !Answered | 2 Replies | 4749 Views | Created by Fazlu - Friday, November 12, 2010 3:14 PM | Last reply by Justanewone - Friday, November 12, 2010 3:26 PM - Items 1 to 20 of 1596958 Next ›
No announcements