Click here to Skip to main content
16,015,003 members
Home / Discussions / Database
   

Database

 
QuestionCreate a make-table quary using a parameter Pin
Chatura Dilan7-Jun-07 20:28
Chatura Dilan7-Jun-07 20:28 
Questionoracle client component Pin
shereem khaleel7-Jun-07 9:36
shereem khaleel7-Jun-07 9:36 
QuestionRe: oracle client component Pin
andyharman7-Jun-07 20:47
professionalandyharman7-Jun-07 20:47 
QuestionExtract email address from text Pin
conniek7-Jun-07 5:04
conniek7-Jun-07 5:04 
AnswerRe: Extract email address from text Pin
Manas Bhardwaj7-Jun-07 5:51
professionalManas Bhardwaj7-Jun-07 5:51 
QuestionHow to run a sql script in Visual Studio Pin
ComCoderCsharp7-Jun-07 3:27
ComCoderCsharp7-Jun-07 3:27 
AnswerRe: How to run a sql script in Visual Studio Pin
szukuro7-Jun-07 4:03
szukuro7-Jun-07 4:03 
QuestionPassing multiple values to a select statement Pin
Mel Padden7-Jun-07 0:32
Mel Padden7-Jun-07 0:32 
Hi, not an expert SQL programmer so apologies if this seems like a novice question...

Is there a way to pass multiple parameters to a select statement in an SQL stored procedure? For example:

Say you wish to select all addresses in a certain county, where the counties table is foreign-keyed to the Address table on ID. So you would write a stored proc to accept a single county ID, and select on that basis.

But say you want to pass in a range of counties, and select all addresses with a county ID in that range? It's easy to do in inline SQL, using the IN operator, so I could build a SQL string in my data access class and pass that for direct execution to the DB engine, but I'd rather stay away from that approach for obvious reasons.

The other option is to not select on county, pass all results to my .NET class, and filter the data using my list of selection values in code before passing the resultset to the client.

I think I'd prefer the latter approach but if it were possible I'd like to do the whole lot in SQL to enhance performance. It's an MS SQL 2000 database.

Does anyone out there know of a way to get around this?



All the dude ever wanted... was his rug back.

AnswerRe: Passing multiple values to a select statement Pin
ganti.r7-Jun-07 1:33
ganti.r7-Jun-07 1:33 
AnswerRe: Passing multiple values to a select statement Pin
Arun.Immanuel7-Jun-07 4:20
Arun.Immanuel7-Jun-07 4:20 
QuestionMSSQL 2000 Database Conversion to MSSQL 2005 Pin
UweOeder6-Jun-07 23:11
professionalUweOeder6-Jun-07 23:11 
AnswerRe: MSSQL 2000 Database Conversion to MSSQL 2005 Pin
originSH7-Jun-07 5:52
originSH7-Jun-07 5:52 
QuestionBring back certain records Pin
Brendan Vogt6-Jun-07 22:29
Brendan Vogt6-Jun-07 22:29 
AnswerRe: Bring back certain records Pin
Harini N K6-Jun-07 23:00
Harini N K6-Jun-07 23:00 
AnswerRe: Bring back certain records Pin
ScottM17-Jun-07 21:05
ScottM17-Jun-07 21:05 
QuestionSubstracting dates in Oracle Pin
Diego F.6-Jun-07 21:49
Diego F.6-Jun-07 21:49 
AnswerRe: Substracting dates in Oracle Pin
Sathesh Sakthivel6-Jun-07 22:19
Sathesh Sakthivel6-Jun-07 22:19 
GeneralRe: Substracting dates in Oracle Pin
Diego F.6-Jun-07 22:50
Diego F.6-Jun-07 22:50 
QuestionImage Data type Comparision Pin
LishaDamian6-Jun-07 20:56
LishaDamian6-Jun-07 20:56 
AnswerRe: Image Data type Comparision Pin
Sathesh Sakthivel6-Jun-07 21:05
Sathesh Sakthivel6-Jun-07 21:05 
Question"data Source=?" to access my website database Pin
multimedia96-Jun-07 19:39
multimedia96-Jun-07 19:39 
AnswerRe: "data Source=?" to access my website database Pin
Paul Conrad7-Jun-07 3:52
professionalPaul Conrad7-Jun-07 3:52 
QuestionSyntax I Can't Understand Pin
Richard Andrew x646-Jun-07 17:05
professionalRichard Andrew x646-Jun-07 17:05 
AnswerRe: Syntax I Can't Understand Pin
Harini N K6-Jun-07 18:55
Harini N K6-Jun-07 18:55 
GeneralRe: Syntax I Can't Understand Pin
Richard Andrew x646-Jun-07 19:36
professionalRichard Andrew x646-Jun-07 19:36 

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.