Click here to Skip to main content
15,911,360 members
Home / Discussions / Database
   

Database

 
GeneralRe: Need help with Sql Statement Pin
Mark J. Miller9-Jan-07 14:10
Mark J. Miller9-Jan-07 14:10 
GeneralRe: Need help with Sql Statement Pin
DMBFiredancer9-Jan-07 14:20
DMBFiredancer9-Jan-07 14:20 
QuestionDatabase Explorer Database Connection Pin
mfcuser9-Jan-07 10:02
mfcuser9-Jan-07 10:02 
AnswerRe: Database Explorer Database Connection Pin
Rob Graham9-Jan-07 11:53
Rob Graham9-Jan-07 11:53 
QuestionTable-value function performance Pin
kmaclean9-Jan-07 9:51
kmaclean9-Jan-07 9:51 
QuestionOpposite of the SQL "IN" statement? Pin
dspyank9-Jan-07 6:17
dspyank9-Jan-07 6:17 
QuestionRe: Opposite of the SQL "IN" statement? Pin
Chris Meech9-Jan-07 6:24
Chris Meech9-Jan-07 6:24 
AnswerRe: Opposite of the SQL "IN" statement? Pin
kmaclean9-Jan-07 11:32
kmaclean9-Jan-07 11:32 
It sounds like "IN" is what you want. If I have a list of values, i.e. ('Apple', 'Orange')
and I want to know if they are in the FRUIT table, I would write:
SELECT Name
FROM FRUIT
WHERE Name IN ('Apple, 'Orange').

This would pull back all values from the fruit table that are in my list.

However, there is no logical way to use this with an "AND", because a string can only match one value.

If you're looking for the value 'AppleOrange' you might use the LIKE operator:

SELECT Name
FROM FRUIT
WHERE Name LIKE '%Apple%'

This would pull back values "Apple" and "AppleOrange"

I don't think there's a way to use the LIKE operator with a list though.

Hope that helps a bit.

AnswerRe: Opposite of the SQL "IN" statement? Pin
Saud AKhter16-Jan-07 20:22
Saud AKhter16-Jan-07 20:22 
QuestionProcedure with multiple parameters and multiple Select Statements Pin
rodney.fetterolf9-Jan-07 3:48
rodney.fetterolf9-Jan-07 3:48 
AnswerRe: Procedure with multiple parameters and multiple Select Statements Pin
andyharman9-Jan-07 5:29
professionalandyharman9-Jan-07 5:29 
AnswerRe: Procedure with multiple parameters and multiple Select Statements Pin
M.H.1.2.314-Jan-07 21:46
M.H.1.2.314-Jan-07 21:46 
QuestionWhat is "N" in OBJECTPROPERTY(id, N'IsUserTable') = 1) Pin
Nick1977_209-Jan-07 3:06
Nick1977_209-Jan-07 3:06 
AnswerRe: What is "N" in OBJECTPROPERTY(id, N'IsUserTable') = 1) Pin
Pete O'Hanlon9-Jan-07 3:36
mvePete O'Hanlon9-Jan-07 3:36 
GeneralRe: What is "N" in OBJECTPROPERTY(id, N'IsUserTable') = 1) Pin
Rob Graham9-Jan-07 3:46
Rob Graham9-Jan-07 3:46 
GeneralRe: What is "N" in OBJECTPROPERTY(id, N'IsUserTable') = 1) Pin
Pete O'Hanlon9-Jan-07 4:11
mvePete O'Hanlon9-Jan-07 4:11 
GeneralRe: What is "N" in OBJECTPROPERTY(id, N'IsUserTable') = 1) Pin
Rob Graham9-Jan-07 6:45
Rob Graham9-Jan-07 6:45 
GeneralRe: What is "N" in OBJECTPROPERTY(id, N'IsUserTable') = 1) Pin
Nick1977_209-Jan-07 17:39
Nick1977_209-Jan-07 17:39 
Question.Net 2.0 Table Adapter best practice Pin
Adam Crawford9-Jan-07 0:58
Adam Crawford9-Jan-07 0:58 
AnswerRe: .Net 2.0 Table Adapter best practice Pin
Rob Graham9-Jan-07 3:52
Rob Graham9-Jan-07 3:52 
GeneralRe: .Net 2.0 Table Adapter best practice Pin
Adam Crawford9-Jan-07 4:22
Adam Crawford9-Jan-07 4:22 
GeneralRe: .Net 2.0 Table Adapter best practice Pin
Pete O'Hanlon9-Jan-07 4:36
mvePete O'Hanlon9-Jan-07 4:36 
GeneralRe: .Net 2.0 Table Adapter best practice Pin
Rob Graham9-Jan-07 6:58
Rob Graham9-Jan-07 6:58 
QuestionFine Tuning of Query Pin
Sasmi9-Jan-07 0:56
Sasmi9-Jan-07 0:56 
AnswerRe: Fine Tuning of Query Pin
Pete O'Hanlon9-Jan-07 1:30
mvePete O'Hanlon9-Jan-07 1:30 

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.