Click here to Skip to main content
15,895,142 members
Home / Discussions / Database
   

Database

 
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 
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 
Stored procedures are efficient because you don't have to go back and forth across the wire with the data when the requirements get complicated. This is not the case with the problem listed here.

I question your premise about the speed differences between ad-hoc queries and compiled stored procs. I think you will find that with SQL 2000 (& 2005) this is much (much....) less of an issue then it used to be. The query optimizer and cache system is quite impressive.

The reason I use stored procs is because of the data encapsulation, verification and auditing that the procs allow. SQL 2005 will only increase this capability.

As for your statement about the "IN" clause being inefficient, you are very correct. I was making the assumption that there would be only a few options selected because a human was doing the selecting.

As for feeding the data to a tmp table via the client and then running the query, I would assume the network traffic time would be much larger then the "IN" clause method. Parsing the "IN" clause via SQL and building the table there might be quicker for large "IN" clauses.
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 
GeneralRe: insert string wiht ' chare Pin
Edbert P12-Dec-04 13:14
Edbert P12-Dec-04 13:14 
General.Net/COM+ Pin
Member 131282211-Dec-04 22:31
Member 131282211-Dec-04 22:31 

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.