Click here to Skip to main content
15,919,358 members
Home / Discussions / Database
   

Database

 
AnswerRe: SCOPE_IDENTITY() Always Returning 1 Pin
Farm Developer26-Jan-07 4:09
Farm Developer26-Jan-07 4:09 
QuestionProblem In Multi Conditioned SQL: Pin
Shahzad.Aslam24-Jan-07 22:14
Shahzad.Aslam24-Jan-07 22:14 
AnswerRe: Problem In Multi Conditioned SQL: Pin
Parwej Ahamad24-Jan-07 22:27
professionalParwej Ahamad24-Jan-07 22:27 
AnswerRe: Problem In Multi Conditioned SQL: Pin
Pete O'Hanlon24-Jan-07 22:53
mvePete O'Hanlon24-Jan-07 22:53 
GeneralRe: Problem In Multi Conditioned SQL: Pin
Shahzad.Aslam24-Jan-07 23:32
Shahzad.Aslam24-Jan-07 23:32 
GeneralRe: Problem In Multi Conditioned SQL: Pin
Colin Angus Mackay24-Jan-07 23:53
Colin Angus Mackay24-Jan-07 23:53 
GeneralRe: Problem In Multi Conditioned SQL: Pin
Shahzad.Aslam25-Jan-07 0:18
Shahzad.Aslam25-Jan-07 0:18 
GeneralRe: Problem In Multi Conditioned SQL: Pin
Pete O'Hanlon25-Jan-07 0:57
mvePete O'Hanlon25-Jan-07 0:57 
SELECT DISTINCT message_type,tran_type,new_account,rsp_code_rsp,fraudrspcode
FROM TRANSACTIONS WHERE
message_type AND tran_type AND new_account AND rsp_code_rsp AND fraudrspcode NOT IN
(SELECT message_type,tran_type,new_account,rsp_code_rsp,fraudrspcode
FROM Tran_Types_Dimension)

Right - let's analyze this statement:

SELECT DISTINCT message_type,tran_type,new_account,rsp_code_rsp,fraudrspcode
FROM TRANSACTIONS WHERE
message_type What does this equate to?
AND tran_type Same here...
AND new_account And here...
AND rsp_code_rsp And here...
AND fraudrspcode NOT IN
(SELECT message_type,tran_type,new_account,rsp_code_rsp,fraudrspcode
FROM Tran_Types_Dimension)
Change to reference only one attribute here.

It is obvious from the above that you need to supply the other side of the test in each case highlighted in bold. For instance, you may want to specify AND tran_type = 2.

However, I think what you are trying to do in your statement is to test to retrieve records from transactions where there is not a corresponding entry in tran_types_dimension. Is this correct?


the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer

Deja View - the feeling that you've seen this post before.

GeneralRe: Problem In Multi Conditioned SQL: Pin
Mike Dimmick25-Jan-07 1:31
Mike Dimmick25-Jan-07 1:31 
GeneralRe: Problem In Multi Conditioned SQL: Pin
Shahzad.Aslam25-Jan-07 19:08
Shahzad.Aslam25-Jan-07 19:08 
AnswerRe: Problem In Multi Conditioned SQL: Pin
Mike Dimmick25-Jan-07 1:21
Mike Dimmick25-Jan-07 1:21 
QuestionWant to Display 2 columns result as one column(Urgent) Pin
priya_p23324-Jan-07 19:30
priya_p23324-Jan-07 19:30 
AnswerRe: Want to Display 2 columns result as one column(Urgent) [modified] Pin
Parwej Ahamad24-Jan-07 20:22
professionalParwej Ahamad24-Jan-07 20:22 
GeneralRe: Want to Display 2 columns result as one column(Urgent) Pin
priya_p23324-Jan-07 20:59
priya_p23324-Jan-07 20:59 
GeneralRe: Want to Display 2 columns result as one column(Urgent) [modified] Pin
Parwej Ahamad24-Jan-07 21:20
professionalParwej Ahamad24-Jan-07 21:20 
GeneralRe: Want to Display 2 columns result as one column(Urgent) Pin
priya_p23324-Jan-07 21:33
priya_p23324-Jan-07 21:33 
QuestionIssues with a SP Pin
Sam Heller24-Jan-07 10:43
Sam Heller24-Jan-07 10:43 
AnswerRe: Issues with a SP Pin
Mairaaj Khan24-Jan-07 19:32
professionalMairaaj Khan24-Jan-07 19:32 
GeneralRe: Issues with a SP Pin
Sam Heller24-Jan-07 21:45
Sam Heller24-Jan-07 21:45 
QuestionSQL Join Pin
Dayekh24-Jan-07 1:51
Dayekh24-Jan-07 1:51 
AnswerRe: SQL Join Pin
Pete O'Hanlon24-Jan-07 2:04
mvePete O'Hanlon24-Jan-07 2:04 
GeneralRe: SQL Join Pin
Dayekh24-Jan-07 2:16
Dayekh24-Jan-07 2:16 
GeneralRe: SQL Join Pin
Dayekh24-Jan-07 2:26
Dayekh24-Jan-07 2:26 
QuestionVariable with multiple values? Pin
caliguloo24-Jan-07 0:24
caliguloo24-Jan-07 0:24 
AnswerRe: Variable with multiple values? Pin
andyharman24-Jan-07 0:33
professionalandyharman24-Jan-07 0:33 

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.