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

Database

 
GeneralRe: MySQL view definition oddity Pin
Jörgen Andersson15-Aug-13 11:02
professionalJörgen Andersson15-Aug-13 11:02 
GeneralRe: MySQL view definition oddity Pin
PIEBALDconsult15-Aug-13 11:16
mvePIEBALDconsult15-Aug-13 11:16 
QuestionTranslating Access SQL Statement to T-SQL Pin
Morore_Charles_00714-Aug-13 1:33
Morore_Charles_00714-Aug-13 1:33 
AnswerRe: Translating Access SQL Statement to T-SQL Pin
Richard Deeming14-Aug-13 1:58
mveRichard Deeming14-Aug-13 1:58 
QuestionSSIS Job - Proxy Login Failure Pin
lmaycock13-Aug-13 23:35
lmaycock13-Aug-13 23:35 
AnswerRe: SSIS Job - Proxy Login Failure Pin
GuyThiebaut14-Aug-13 0:09
professionalGuyThiebaut14-Aug-13 0:09 
GeneralRe: SSIS Job - Proxy Login Failure Pin
lmaycock14-Aug-13 8:51
lmaycock14-Aug-13 8:51 
QuestionSelect Statement in SQL Server Pin
KeithF13-Aug-13 22:37
KeithF13-Aug-13 22:37 
Hi Folks,

I have a quick question in relation to how i select data from a table, as seen in the table below i want to get rows where Person1 & Person2 are both on the same row, so in the table below i would just want Rows 1 & 2.

Table:

ID | Person1 | Person2 | . . .
1 | ABC | DEF | . . .
2 | DEF | ABC | . . .
3 | ABC | GHI | . . .
.
.
.


I have tried the following:

Select * From MyTable Where Person1 = 'ABC' OR Person1 = 'DEF AND Person2 = 'ABC' OR Person2 = 'DEF'


This does not have the desired effect however.

Where am i going wrong here?
AnswerRe: Select Statement in SQL Server Pin
KeithF13-Aug-13 22:40
KeithF13-Aug-13 22:40 
AnswerRe: Select Statement in SQL Server Pin
GuyThiebaut13-Aug-13 23:00
professionalGuyThiebaut13-Aug-13 23:00 
GeneralRe: Select Statement in SQL Server Pin
KeithF13-Aug-13 23:20
KeithF13-Aug-13 23:20 
GeneralRe: Select Statement in SQL Server Pin
Richard Deeming14-Aug-13 1:54
mveRichard Deeming14-Aug-13 1:54 
GeneralRe: Select Statement in SQL Server Pin
KeithF14-Aug-13 2:01
KeithF14-Aug-13 2:01 
QuestionConnecting to a Database in SQL Server 2008R2 Express Pin
Bram van Kampen13-Aug-13 14:41
Bram van Kampen13-Aug-13 14:41 
AnswerRe: Connecting to a Database in SQL Server 2008R2 Express Pin
PIEBALDconsult13-Aug-13 16:24
mvePIEBALDconsult13-Aug-13 16:24 
AnswerRe: Connecting to a Database in SQL Server 2008R2 Express Pin
Richard MacCutchan13-Aug-13 21:13
mveRichard MacCutchan13-Aug-13 21:13 
QuestionHow to work with databases Pin
Patrick Skelton13-Aug-13 6:26
Patrick Skelton13-Aug-13 6:26 
AnswerRe: How to work with databases Pin
Richard Deeming13-Aug-13 8:11
mveRichard Deeming13-Aug-13 8:11 
GeneralRe: How to work with databases Pin
Patrick Skelton13-Aug-13 22:19
Patrick Skelton13-Aug-13 22:19 
AnswerRe: How to work with databases Pin
jschell13-Aug-13 8:57
jschell13-Aug-13 8:57 
GeneralRe: How to work with databases Pin
Patrick Skelton13-Aug-13 22:16
Patrick Skelton13-Aug-13 22:16 
AnswerRe: How to work with databases Pin
Mycroft Holmes13-Aug-13 12:59
professionalMycroft Holmes13-Aug-13 12:59 
QuestionStored Procedures Pin
Mahdi_kishislan12-Aug-13 2:07
Mahdi_kishislan12-Aug-13 2:07 
AnswerRe: Stored Procedures Pin
David Mujica12-Aug-13 2:38
David Mujica12-Aug-13 2:38 
GeneralRe: Stored Procedures Pin
Mahdi_kishislan12-Aug-13 2:51
Mahdi_kishislan12-Aug-13 2:51 

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.