Click here to Skip to main content
12,298,743 members (48,322 online)
   

Database

 
AnswerRe: Update a flag based on portion of data avialble in other column Pin
Mycroft Holmes30-Jan-13 11:56
memberMycroft Holmes30-Jan-13 11:56 
GeneralRe: Update a flag based on portion of data avialble in other column Pin
yuvachandra31-Jan-13 6:08
memberyuvachandra31-Jan-13 6:08 
GeneralRe: Update a flag based on portion of data avialble in other column Pin
Mycroft Holmes31-Jan-13 11:32
memberMycroft Holmes31-Jan-13 11:32 
GeneralRe: Update a flag based on portion of data avialble in other column Pin
yuvachandra31-Jan-13 11:45
memberyuvachandra31-Jan-13 11:45 
GeneralRe: Update a flag based on portion of data avialble in other column Pin
yuvachandra1-Feb-13 7:00
memberyuvachandra1-Feb-13 7:00 
Questionhow to comlex databinding with access database Pin
Achilles8430-Jan-13 8:48
memberAchilles8430-Jan-13 8:48 
AnswerRe: how to comlex databinding with access database Pin
Mycroft Holmes30-Jan-13 11:49
memberMycroft Holmes30-Jan-13 11:49 
GeneralRe: how to comlex databinding with access database Pin
Achilles8430-Jan-13 20:49
memberAchilles8430-Jan-13 20:49 
GeneralRe: how to comlex databinding with access database Pin
Mycroft Holmes30-Jan-13 21:06
memberMycroft Holmes30-Jan-13 21:06 
GeneralRe: how to comlex databinding with access database Pin
Achilles841-Feb-13 0:25
memberAchilles841-Feb-13 0:25 
QuestionEnd Case in a Variable Pin
berba30-Jan-13 8:47
memberberba30-Jan-13 8:47 
AnswerRe: End Case in a Variable Pin
Mycroft Holmes30-Jan-13 11:46
memberMycroft Holmes30-Jan-13 11:46 
GeneralRe: End Case in a Variable Pin
berba30-Jan-13 18:02
memberberba30-Jan-13 18:02 
GeneralRe: End Case in a Variable Pin
Mycroft Holmes30-Jan-13 20:57
memberMycroft Holmes30-Jan-13 20:57 
You are combining a select query and an assignment query, not allowed!

You need to nest your case statements as you need to test the case for each record, variable assignment is a once only operation (using a cursor spit would allow you to do the record by record processing).

This example test the value of flag but note that it must know what to expect in the nested case, your ... cannot be a random date, it must be a testable value!

SELECT Records, 
	CASE Flag WHEN 'FX' THEN CASE Records WHEN 0 THEN 'Failed' ELSE 'Ok' END
		WHEN 'MM' THEN CASE Records WHEN 0 THEN 'Failed' ELSE 'Ok' END 
		WHEN 'TZ' THEN CASE Records WHEN 0 THEN 'Failed' ELSE 'Ok' END END 
FROM ProcessLog PL
Never underestimate the power of human stupidity
RAH

QuestionWhat happens with auto-incremented value on rollback? Pin
piticcotoc29-Jan-13 23:27
memberpiticcotoc29-Jan-13 23:27 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Jörgen Andersson30-Jan-13 1:04
memberJörgen Andersson30-Jan-13 1:04 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 3:02
memberpiticcotoc30-Jan-13 3:02 
GeneralRe: What happens with auto-incremented value on rollback? Pin
mark merrens30-Jan-13 5:33
membermark merrens30-Jan-13 5:33 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 5:43
memberpiticcotoc30-Jan-13 5:43 
GeneralRe: What happens with auto-incremented value on rollback? Pin
Simon_Whale30-Jan-13 5:49
memberSimon_Whale30-Jan-13 5:49 
GeneralRe: What happens with auto-incremented value on rollback? Pin
mark merrens30-Jan-13 5:55
membermark merrens30-Jan-13 5:55 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 21:43
memberpiticcotoc30-Jan-13 21:43 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Eddy Vluggen30-Jan-13 22:50
mvpEddy Vluggen30-Jan-13 22:50 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 23:17
memberpiticcotoc30-Jan-13 23:17 
NewsRe: What happens with auto-incremented value on rollback? Pin
Eddy Vluggen31-Jan-13 3:16
mvpEddy Vluggen31-Jan-13 3:16 
GeneralRe: What happens with auto-incremented value on rollback? Pin
mark merrens31-Jan-13 5:18
membermark merrens31-Jan-13 5:18 
GeneralRe: What happens with auto-incremented value on rollback? Pin
PIEBALDconsult30-Jan-13 10:29
memberPIEBALDconsult30-Jan-13 10:29 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 22:09
memberpiticcotoc30-Jan-13 22:09 
GeneralRe: What happens with auto-incremented value on rollback? Pin
pmpdesign30-Jan-13 19:46
memberpmpdesign30-Jan-13 19:46 
GeneralRe: What happens with auto-incremented value on rollback? Pin
Jörgen Andersson30-Jan-13 7:37
memberJörgen Andersson30-Jan-13 7:37 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Shameel30-Jan-13 3:15
memberShameel30-Jan-13 3:15 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 5:45
memberpiticcotoc30-Jan-13 5:45 
AnswerRe: What happens with auto-incremented value on rollback? Pin
i.j.russell30-Jan-13 4:37
memberi.j.russell30-Jan-13 4:37 
GeneralRe: What happens with auto-incremented value on rollback? Pin
piticcotoc30-Jan-13 5:41
memberpiticcotoc30-Jan-13 5:41 
AnswerRe: What happens with auto-incremented value on rollback? Pin
Mycroft Holmes30-Jan-13 11:44
memberMycroft Holmes30-Jan-13 11:44 
GeneralRe: What happens with auto-incremented value on rollback? Pin
PIEBALDconsult31-Jan-13 3:40
memberPIEBALDconsult31-Jan-13 3:40 
AnswerRe: What happens with auto-incremented value on rollback? Pin
gvprabu20-Feb-13 23:02
membergvprabu20-Feb-13 23:02 
QuestionBook recommendation for learning SQL Pin
Lloyd Atkinson29-Jan-13 18:33
memberLloyd Atkinson29-Jan-13 18:33 
AnswerRe: Book recommendation for learning SQL Pin
Jörgen Andersson30-Jan-13 0:52
memberJörgen Andersson30-Jan-13 0:52 
AnswerRe: Book recommendation for learning SQL Pin
i.j.russell30-Jan-13 4:34
memberi.j.russell30-Jan-13 4:34 
AnswerRe: Book recommendation for learning SQL Pin
Simon_Whale30-Jan-13 5:46
memberSimon_Whale30-Jan-13 5:46 
AnswerRe: Book recommendation for learning SQL Pin
djj5530-Jan-13 6:33
memberdjj5530-Jan-13 6:33 
AnswerRe: Book recommendation for learning SQL Pin
gvprabu20-Feb-13 23:09
membergvprabu20-Feb-13 23:09 
QuestionCan we delete old records from aspstatetempsessions table? Pin
manikantaer29-Jan-13 17:43
membermanikantaer29-Jan-13 17:43 
AnswerRe: Can we delete old records from aspstatetempsessions table? Pin
thatraja4-Oct-13 20:46
mvpthatraja4-Oct-13 20:46 
Questioncontrol AVG cost and close stock Pin
kornkimhour29-Jan-13 15:13
memberkornkimhour29-Jan-13 15:13 
AnswerRe: control AVG cost and close stock Pin
thatraja4-Oct-13 20:50
mvpthatraja4-Oct-13 20:50 
QuestionMySQL Table Lock Question Pin
Richard Andrew x6429-Jan-13 12:46
memberRichard Andrew x6429-Jan-13 12:46 
AnswerRe: MySQL Table Lock Question Pin
Jörgen Andersson30-Jan-13 10:34
memberJörgen Andersson30-Jan-13 10:34 
QuestionSQL Update Pin
mrfalk29-Jan-13 11:24
membermrfalk29-Jan-13 11:24 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.160525.2 | Last Updated 27 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid