Click here to Skip to main content
15,890,399 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL bit to bool conversion Pin
Smithers-Jones16-Aug-11 1:03
Smithers-Jones16-Aug-11 1:03 
GeneralRe: SQL bit to bool conversion Pin
5fingers17-Aug-11 0:56
5fingers17-Aug-11 0:56 
QuestionLocal Variable Ntext Probelm sql 2005 Pin
md_refay14-Aug-11 1:10
md_refay14-Aug-11 1:10 
Answercross-post Pin
Wendelius14-Aug-11 1:45
mentorWendelius14-Aug-11 1:45 
QuestionCheck Different Select query result Pin
Naunt11-Aug-11 18:17
Naunt11-Aug-11 18:17 
AnswerRe: Check Different Select query result Pin
Mycroft Holmes11-Aug-11 19:59
professionalMycroft Holmes11-Aug-11 19:59 
GeneralRe: Check Different Select query result Pin
Naunt11-Aug-11 21:55
Naunt11-Aug-11 21:55 
GeneralRe: Check Different Select query result Pin
Mycroft Holmes11-Aug-11 22:54
professionalMycroft Holmes11-Aug-11 22:54 
Using your second format you basically take your where clauses and place them between WHEN and THEN

UPDATE HumanResources.Employee
SET VacationHours = 
    ( CASE
         WHEN whereclause1 THEN VacationHours + 40
         WHEN whereclause2 THEN VacationHours + 10
         WHEN whereclause3 THEN VacationHours + 19
         WHEN whereclause4 THEN VacationHours + 11
       END
    )


The complexity of the where clauses it going to drive you nuts, sequencing them correctly will be a pain and debugging is going to be bloody horrible. Good luck
Never underestimate the power of human stupidity
RAH

GeneralRe: Check Different Select query result Pin
Wendelius11-Aug-11 23:17
mentorWendelius11-Aug-11 23:17 
GeneralRe: Check Different Select query result Pin
Naunt12-Aug-11 0:46
Naunt12-Aug-11 0:46 
GeneralRe: Check Different Select query result Pin
Wendelius12-Aug-11 0:55
mentorWendelius12-Aug-11 0:55 
GeneralRe: Check Different Select query result Pin
Naunt12-Aug-11 1:09
Naunt12-Aug-11 1:09 
GeneralRe: Check Different Select query result Pin
Wendelius12-Aug-11 2:38
mentorWendelius12-Aug-11 2:38 
GeneralRe: Check Different Select query result Pin
Naunt12-Aug-11 0:50
Naunt12-Aug-11 0:50 
AnswerRe: Check Different Select query result Pin
Wendelius11-Aug-11 21:04
mentorWendelius11-Aug-11 21:04 
GeneralRe: Check Different Select query result Pin
Naunt11-Aug-11 22:24
Naunt11-Aug-11 22:24 
AnswerRe: Check Different Select query result [modified] Pin
Wendelius11-Aug-11 23:04
mentorWendelius11-Aug-11 23:04 
GeneralRe: Check Different Select query result Pin
Naunt12-Aug-11 0:56
Naunt12-Aug-11 0:56 
AnswerRe: Check Different Select query result Pin
Pascal Ganaye16-Aug-11 6:28
Pascal Ganaye16-Aug-11 6:28 
QuestionSee this Pin
sivakumat11-Aug-11 1:20
sivakumat11-Aug-11 1:20 
QuestionCompare 3columns from a row with data Null value Pin
Naunt10-Aug-11 23:16
Naunt10-Aug-11 23:16 
AnswerRe: Compare 3columns from a row with data Null value Pin
Mycroft Holmes10-Aug-11 23:26
professionalMycroft Holmes10-Aug-11 23:26 
AnswerRe: Compare 3columns from a row with data Null value Pin
sujit076110-Aug-11 23:55
sujit076110-Aug-11 23:55 
GeneralRe: Compare 3columns from a row with data Null value Pin
Naunt11-Aug-11 0:18
Naunt11-Aug-11 0:18 
QuestionHELP !! Pin
Josh7harington10-Aug-11 5:14
Josh7harington10-Aug-11 5:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.