Click here to Skip to main content
16,008,299 members
Home / Discussions / Database
   

Database

 
GeneralHelp ! Selective SQL Statement Pin
RDoes15-Dec-04 1:16
RDoes15-Dec-04 1:16 
GeneralRe: Help ! Selective SQL Statement Pin
Michael Potter15-Dec-04 11:12
Michael Potter15-Dec-04 11:12 
GeneralRe: Help ! Selective SQL Statement Pin
Colin Angus Mackay15-Dec-04 12:28
Colin Angus Mackay15-Dec-04 12:28 
GeneralRe: Help ! Selective SQL Statement Pin
RDoes15-Dec-04 22:22
RDoes15-Dec-04 22:22 
GeneralRe: Help ! Selective SQL Statement Pin
Colin Angus Mackay16-Dec-04 2:26
Colin Angus Mackay16-Dec-04 2:26 
GeneralRe: Help ! Selective SQL Statement Pin
RDoes20-Dec-04 1:53
RDoes20-Dec-04 1:53 
GeneralRe: Help ! Selective SQL Statement Pin
Colin Angus Mackay20-Dec-04 2:19
Colin Angus Mackay20-Dec-04 2:19 
GeneralRe: Help ! Selective SQL Statement Pin
Jon Hulatt16-Dec-04 0:40
Jon Hulatt16-Dec-04 0:40 
The first solution is not a great one: you lose almost all of the benefits of using a stored procedure in the first place, most importantly speed. Stored procedures are efficient because they are precompiled and their query plans are cached. This doesn't work for exec().

Secondly, you'll find that as you increase the number of parameters in the "IN" clause, performance will drop through the floor. 8000 characters, where the id's presumably are on average 4 digits + a comma long means your upper limit is 1600 parameters. This will not be nice to execute at all.

using System.Beer;

GeneralRe: Help ! Selective SQL Statement Pin
RDoes16-Dec-04 0:52
RDoes16-Dec-04 0:52 
GeneralRe: Help ! Selective SQL Statement Pin
Michael Potter16-Dec-04 6:09
Michael Potter16-Dec-04 6:09 
GeneralRe: Help ! Selective SQL Statement Pin
Jon Hulatt16-Dec-04 22:26
Jon Hulatt16-Dec-04 22:26 
QuestionEmbedded SQL precompiler for C#? Pin
cellod14-Dec-04 12:05
cellod14-Dec-04 12:05 
GeneralLocal SQL server name Pin
RoyceF13-Dec-04 11:59
RoyceF13-Dec-04 11:59 
GeneralRe: Local SQL server name Pin
Colin Angus Mackay13-Dec-04 12:20
Colin Angus Mackay13-Dec-04 12:20 
GeneralRe: Local SQL server name Pin
RoyceF13-Dec-04 12:45
RoyceF13-Dec-04 12:45 
GeneralRe: Local SQL server name Pin
Irsh15-Dec-04 0:02
Irsh15-Dec-04 0:02 
GeneralRe: Local SQL server name Pin
RoyceF15-Dec-04 5:47
RoyceF15-Dec-04 5:47 
GeneralRe: Local SQL server name Pin
Veera Raghavendra16-Dec-04 17:23
Veera Raghavendra16-Dec-04 17:23 
GeneralRe: Using DATEFIRST in a View - I want the week to start on Monday instead of Sunday. Pin
tojamismis13-Dec-04 6:52
tojamismis13-Dec-04 6:52 
GeneralUsing DATEFIRST in a View - I want the week to start on Monday instead of Sunday. Pin
Tony Manhollan13-Dec-04 6:11
Tony Manhollan13-Dec-04 6:11 
GeneralRe: Using DATEFIRST in a View - I want the week to start on Monday instead of Sunday. Pin
tojamismis13-Dec-04 6:48
tojamismis13-Dec-04 6:48 
GeneralLines of Invoice Pin
ruifernandes2412-Dec-04 11:13
ruifernandes2412-Dec-04 11:13 
GeneralRe: Lines of Invoice Pin
Edbert P12-Dec-04 13:12
Edbert P12-Dec-04 13:12 
Generalinsert string wiht ' chare Pin
Anonymous12-Dec-04 5:43
Anonymous12-Dec-04 5:43 
GeneralRe: insert string wiht ' chare Pin
DavidNohejl12-Dec-04 7:16
DavidNohejl12-Dec-04 7:16 

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.