Click here to Skip to main content
15,902,198 members
Home / Discussions / Database
   

Database

 
GeneralRe: Dynamic stored procedure returns error and can't find culprit Pin
DeepToot30-Mar-10 4:30
DeepToot30-Mar-10 4:30 
GeneralRe: Dynamic stored procedure returns error and can't find culprit Pin
J4amieC30-Mar-10 5:57
J4amieC30-Mar-10 5:57 
QuestionDynamic CrystalReports Pin
Enobong Adahada30-Mar-10 1:20
Enobong Adahada30-Mar-10 1:20 
AnswerRe: Dynamic CrystalReports Pin
David Mujica30-Mar-10 3:22
David Mujica30-Mar-10 3:22 
GeneralRe: Dynamic CrystalReports Pin
Enobong Adahada30-Mar-10 22:01
Enobong Adahada30-Mar-10 22:01 
QuestionSQL IN statement or exists Pin
programmervb.netc++29-Mar-10 18:32
programmervb.netc++29-Mar-10 18:32 
AnswerRe: SQL IN statement or exists Pin
_Damian S_29-Mar-10 18:46
professional_Damian S_29-Mar-10 18:46 
AnswerRe: SQL IN statement or exists Pin
Mycroft Holmes29-Mar-10 19:11
professionalMycroft Holmes29-Mar-10 19:11 
Learn to use the sql profiler, it will take you query and give you an execution plan, it may even suggest what fields need indexes to optomise your query, it will certinaly give you the cost of each process. You can then decide on the best approach.

As DM said you have lots of options, temp table, table variable, sub query. Use and in() or an inner join or even exists as suggested earlier. I'm not sure if the exists is a better solution, I would be tempted to go with the table variable on a large table os just a sub query as you have done. Depends on the size of the data sets and the indexing.
Never underestimate the power of human stupidity
RAH

AnswerRe: SQL IN statement or exists Pin
PIEBALDconsult31-Mar-10 8:38
mvePIEBALDconsult31-Mar-10 8:38 
GeneralRe: SQL IN statement or exists Pin
programmervb.netc++31-Mar-10 9:28
programmervb.netc++31-Mar-10 9:28 
QuestionReusable DataGridView and TableAdapter components in Lookup Tables? Pin
Bert Edens29-Mar-10 11:38
Bert Edens29-Mar-10 11:38 
AnswerRe: Reusable DataGridView and TableAdapter components in Lookup Tables? Pin
Mycroft Holmes29-Mar-10 19:05
professionalMycroft Holmes29-Mar-10 19:05 
GeneralRe: Reusable DataGridView and TableAdapter components in Lookup Tables? Pin
Bert Edens30-Mar-10 4:06
Bert Edens30-Mar-10 4:06 
QuestionGroup ranking or row number Pin
Lash2029-Mar-10 9:29
Lash2029-Mar-10 9:29 
AnswerRe: Group ranking or row number Pin
programmervb.netc++29-Mar-10 9:36
programmervb.netc++29-Mar-10 9:36 
AnswerRe: Group ranking or row number Pin
Mycroft Holmes29-Mar-10 18:48
professionalMycroft Holmes29-Mar-10 18:48 
QuestionHow do you handle Dev DB vs Production DB? Pin
programmervb.netc++29-Mar-10 9:22
programmervb.netc++29-Mar-10 9:22 
AnswerRe: How do you handle Dev DB vs Production DB? Pin
PIEBALDconsult29-Mar-10 18:09
mvePIEBALDconsult29-Mar-10 18:09 
GeneralRe: How do you handle Dev DB vs Production DB? Pin
programmervb.netc++29-Mar-10 18:35
programmervb.netc++29-Mar-10 18:35 
AnswerRe: How do you handle Dev DB vs Production DB? Pin
Mycroft Holmes29-Mar-10 18:54
professionalMycroft Holmes29-Mar-10 18:54 
QuestionDatabase design question Pin
Alivemau529-Mar-10 4:00
Alivemau529-Mar-10 4:00 
AnswerRe: Database design question Pin
J4amieC29-Mar-10 4:56
J4amieC29-Mar-10 4:56 
GeneralRe: Database design question Pin
Alivemau529-Mar-10 5:01
Alivemau529-Mar-10 5:01 
GeneralRe: Database design question Pin
J4amieC29-Mar-10 5:17
J4amieC29-Mar-10 5:17 
GeneralRe: Database design question Pin
Alivemau529-Mar-10 6:24
Alivemau529-Mar-10 6:24 

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.