Click here to Skip to main content
15,892,005 members
Home / Discussions / Database
   

Database

 
AnswerRe: problem with sending (') as string Pin
Rob Philpott22-Oct-09 4:11
Rob Philpott22-Oct-09 4:11 
QuestionSQL SERVER 2008 Pin
jonhbt22-Oct-09 0:07
jonhbt22-Oct-09 0:07 
AnswerRe: SQL SERVER 2008 Pin
Eddy Vluggen22-Oct-09 2:36
professionalEddy Vluggen22-Oct-09 2:36 
QuestionSSIS Suggestions Pin
Vimalsoft(Pty) Ltd21-Oct-09 21:28
professionalVimalsoft(Pty) Ltd21-Oct-09 21:28 
QuestionUsing the output of a case statement as selection criteria in an IN clause Pin
Member 265586121-Oct-09 19:44
Member 265586121-Oct-09 19:44 
AnswerRe: Using the output of a case statement as selection criteria in an IN clause Pin
J4amieC21-Oct-09 21:51
J4amieC21-Oct-09 21:51 
GeneralRe: Using the output of a case statement as selection criteria in an IN clause Pin
Member 265586122-Oct-09 4:16
Member 265586122-Oct-09 4:16 
GeneralRe: Using the output of a case statement as selection criteria in an IN clause Pin
J4amieC22-Oct-09 4:39
J4amieC22-Oct-09 4:39 
Ive tried this a few different ways, and hit upon the same error as you've gotten.

I think you're going to be reduced to splitting it into IF..THEN logic

IF EXISTS(SELECT 1
   FROM group gr1
   WHERE gr1.group_key = 'RA'
   AND gr1.gra_valid = 1
   AND 0 = (gr1.gra_flags & 7)^3) 
      SELECT * FROM callsigns WHERE mantype = 'R'
ELSE IF EXISTS(SELECT 1
   FROM group gr2
   WHERE gr2.group_key = 'RA'
   AND gr2.gra_valid = 1
   AND 0 = (gr2.gra_flags & 7)^1) 
      SELECT * FROM callsigns WHERE mantype = 'W'
ELSE
      SELECT * FROM callsigns WHERE mantype IN ('W','R')


Edit: I actually think thats also miles more readable than your original too. Big Grin | :-D
GeneralRe: Using the output of a case statement as selection criteria in an IN clause Pin
Member 265586122-Oct-09 5:04
Member 265586122-Oct-09 5:04 
GeneralNew to db4o? Check this funny intro Pin
netquake21-Oct-09 2:44
netquake21-Oct-09 2:44 
GeneralRe: New to db4o? Check this funny intro Pin
Mycroft Holmes21-Oct-09 13:20
professionalMycroft Holmes21-Oct-09 13:20 
Question[Message Deleted] Pin
khan201021-Oct-09 2:17
khan201021-Oct-09 2:17 
AnswerRe: What Query i have to used Pin
J4amieC21-Oct-09 2:22
J4amieC21-Oct-09 2:22 
GeneralRe: What Query i have to used Pin
dan!sh 21-Oct-09 2:33
professional dan!sh 21-Oct-09 2:33 
GeneralRe: What Query i have to used Pin
khan201021-Oct-09 2:51
khan201021-Oct-09 2:51 
GeneralRe: What Query i have to used Pin
i.j.russell21-Oct-09 3:03
i.j.russell21-Oct-09 3:03 
GeneralRe: What Query i have to used Pin
khan201021-Oct-09 3:24
khan201021-Oct-09 3:24 
GeneralRe: What Query i have to used Pin
khan201021-Oct-09 5:00
khan201021-Oct-09 5:00 
GeneralRe: What Query i have to used Pin
khan201021-Oct-09 5:02
khan201021-Oct-09 5:02 
GeneralRe: What Query i have to used PinPopular
i.j.russell21-Oct-09 5:10
i.j.russell21-Oct-09 5:10 
GeneralRe: What Query i have to used Pin
khan201021-Oct-09 5:37
khan201021-Oct-09 5:37 
GeneralRe: What Query i have to used PinPopular
dan!sh 21-Oct-09 5:50
professional dan!sh 21-Oct-09 5:50 
GeneralRe: What Query i have to used Pin
khan201021-Oct-09 7:18
khan201021-Oct-09 7:18 
GeneralRe: What Query i have to used Pin
dan!sh 21-Oct-09 7:39
professional dan!sh 21-Oct-09 7:39 
GeneralRe: What Query i have to used Pin
J4amieC21-Oct-09 5:32
J4amieC21-Oct-09 5:32 

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.