Click here to Skip to main content
15,887,683 members
Home / Discussions / Database
   

Database

 
GeneralRe: 1 recursive field in a Query Pin
Chris Meech14-Oct-10 3:11
Chris Meech14-Oct-10 3:11 
GeneralRe: 1 recursive field in a Query Pin
Herman<T>.Instance14-Oct-10 3:18
Herman<T>.Instance14-Oct-10 3:18 
GeneralRe: 1 recursive field in a Query Pin
Simon_Whale14-Oct-10 3:43
Simon_Whale14-Oct-10 3:43 
GeneralRe: 1 recursive field in a Query Pin
Herman<T>.Instance14-Oct-10 4:16
Herman<T>.Instance14-Oct-10 4:16 
GeneralRe: 1 recursive field in a Query Pin
Mycroft Holmes14-Oct-10 11:12
professionalMycroft Holmes14-Oct-10 11:12 
GeneralRe: 1 recursive field in a Query [modified] Pin
Herman<T>.Instance17-Oct-10 22:21
Herman<T>.Instance17-Oct-10 22:21 
QuestionSubquery select case Pin
C#Coudou13-Oct-10 15:11
C#Coudou13-Oct-10 15:11 
AnswerRe: Subquery select case Pin
Karthik. A13-Oct-10 15:44
Karthik. A13-Oct-10 15:44 
I have not tried running my suggestions -

1) Try w/ brackets as below

SELECT * FROM TABLE1
WHERE MYFLG =0 
AND MYFLG =(SELECT (CASE WHEN COLUMN1 = 1 AND COLUMN2 = 0 THEN 1 ELSE 0 END) AS MYFLG FROM TABLE1)


2) What are you trying to accomplish w/ this query? Seeing your query, I guess you could simplify it as

SELECT * FROM TABLE1 WHERE (MYFLG = 0 OR (COLUMN1 = 1 AND COLUMN2 = 0))


MYFLG = 0 AND MYFLG = ... doesn't make sense. How could MYFLG could be both 0 and 1? It should be an "or" I guess

I may be wrong, in that case, try to explain your question in detail...
Cheers,
Karthik

GeneralRe: Subquery select case [modified] Pin
Alegria_Lee13-Oct-10 16:25
Alegria_Lee13-Oct-10 16:25 
GeneralRe: Subquery select case Pin
Karthik. A13-Oct-10 16:29
Karthik. A13-Oct-10 16:29 
GeneralRe: Subquery select case Pin
Alegria_Lee13-Oct-10 16:31
Alegria_Lee13-Oct-10 16:31 
GeneralRe: Subquery select case Pin
C#Coudou13-Oct-10 16:50
C#Coudou13-Oct-10 16:50 
GeneralRe: Subquery select case Pin
Blue_Boy13-Oct-10 21:01
Blue_Boy13-Oct-10 21:01 
GeneralRe: Subquery select case Pin
C#Coudou13-Oct-10 21:37
C#Coudou13-Oct-10 21:37 
GeneralRe: Subquery select case Pin
Blue_Boy13-Oct-10 21:43
Blue_Boy13-Oct-10 21:43 
QuestionPlease help me with my research problem [modified] Pin
bleedingfingers13-Oct-10 9:37
bleedingfingers13-Oct-10 9:37 
AnswerRe: Please help me with my research problem Pin
David Mujica13-Oct-10 10:44
David Mujica13-Oct-10 10:44 
GeneralRe: Please help me with my research problem Pin
bleedingfingers13-Oct-10 10:55
bleedingfingers13-Oct-10 10:55 
QuestionCouple general questions on sql server 2005+ transactional replication (in continuous mode specifically) Pin
Jon_Boy13-Oct-10 8:58
Jon_Boy13-Oct-10 8:58 
AnswerRe: Couple general questions on sql server 2005+ transactional replication (in continuous mode specifically) Pin
SimulationofSai14-Oct-10 17:05
SimulationofSai14-Oct-10 17:05 
QuestionHow pass dataset query as paramter in SSRS? Pin
andy_p 213-Oct-10 4:39
andy_p 213-Oct-10 4:39 
QuestionOracle development Pin
sinsoush113-Oct-10 2:26
sinsoush113-Oct-10 2:26 
AnswerRe: Oracle development Pin
David Mujica13-Oct-10 3:08
David Mujica13-Oct-10 3:08 
QuestionWhat am I missing here? - (Table Variable) [modified] Pin
Andy_L_J12-Oct-10 21:42
Andy_L_J12-Oct-10 21:42 
AnswerRe: What am I missing here? - (Table Variable) Pin
Blue_Boy12-Oct-10 22:11
Blue_Boy12-Oct-10 22:11 

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.