Click here to Skip to main content
16,014,765 members
Home / Discussions / Database
   

Database

 
AnswerRe: IN Clause passing an array to a typed dataset Pin
Mark J. Miller25-May-07 6:57
Mark J. Miller25-May-07 6:57 
QuestionHow to populate dataset using VIews Pin
kumarjammula24-May-07 18:40
kumarjammula24-May-07 18:40 
QuestionSQL Query Pin
suketh24-May-07 17:45
suketh24-May-07 17:45 
AnswerRe: SQL Query Pin
Harini N K24-May-07 20:08
Harini N K24-May-07 20:08 
AnswerRe: SQL Query Pin
shally_7924-May-07 23:40
shally_7924-May-07 23:40 
AnswerRe: SQL Query Pin
raj@code26-May-07 0:44
raj@code26-May-07 0:44 
QuestionUsing results multiple times Pin
mikker_12324-May-07 10:10
mikker_12324-May-07 10:10 
AnswerRe: Using results multiple times Pin
snorkie24-May-07 10:23
professionalsnorkie24-May-07 10:23 
The temporary table is most likely your best resort. The table will sit in memory waiting till the end of the procedure to be used. That being said, if you want to be lazy... You could do what I call a "String Procedure" (instead of a stored procedure). Remember that this method is very vulnerable to SQL injection/truncation attacks

DECLARE @FilterSQL AS varchar(8000)

SET @SQL = 'SELECT TOP (50) * FROM h_Case WHERE ((FirstName LIKE ''' + @FirstName + ''') AND (LastName LIKE ''' + @LastName + ''') OR ((IsNull(Aliases, '''') LIKE ''' + @FirstName + ''' AND (IsNull(Aliases, '''') LIKE ''' + @LastName + '''))) AND (DOB BETWEEN + ''' @DobFrom + '''AND ''' + @DobTo + ''') AND (IsNull(GenderId, -1) BETWEEN ' + @GenderFrom + ' AND ' + @GenderTo + ') AND
(IsNull(PHN, '''') LIKE ''' + @PHN + ''')'

Then insert the @SQL variable into your other SQL.

So use the temporary table.

Hogan
GeneralRe: Using results multiple times Pin
mikker_12326-May-07 1:01
mikker_12326-May-07 1:01 
GeneralRe: Using results multiple times Pin
snorkie28-May-07 15:35
professionalsnorkie28-May-07 15:35 
GeneralRe: Using results multiple times Pin
mikker_12329-May-07 2:51
mikker_12329-May-07 2:51 
QuestionTrap Connect error Pin
Navneet Hegde24-May-07 2:41
Navneet Hegde24-May-07 2:41 
AnswerRe: Trap Connect error Pin
Dave Herren24-May-07 2:51
Dave Herren24-May-07 2:51 
Questionplease help me to hw the output of the belw statement is 1200? Pin
pashitech24-May-07 0:31
pashitech24-May-07 0:31 
AnswerRe: please help me to hw the output of the belw statement is 1200? Pin
shally_7924-May-07 1:26
shally_7924-May-07 1:26 
AnswerRe: please help me to hw the output of the belw statement is 1200? Pin
Dave Herren24-May-07 2:49
Dave Herren24-May-07 2:49 
Question[Message Deleted] Pin
samfromcn23-May-07 22:38
samfromcn23-May-07 22:38 
AnswerRe: Which dlls do my setup package need to implement ADO compnnet? Pin
Shiv Singh Sisodiya24-May-07 1:45
Shiv Singh Sisodiya24-May-07 1:45 
AnswerRe: Which dlls do my setup package need to implement ADO compnnet? Pin
Mike Dimmick24-May-07 13:32
Mike Dimmick24-May-07 13:32 
QuestionRe: [Message Deleted] Pin
Hamid_RT24-May-07 22:04
Hamid_RT24-May-07 22:04 
AnswerRe: [Message Deleted] Pin
Colin Angus Mackay24-May-07 22:24
Colin Angus Mackay24-May-07 22:24 
Questionquery about counting records entered in same date... Pin
nareshss23-May-07 22:16
nareshss23-May-07 22:16 
AnswerRe: query about counting records entered in same date... Pin
Harini N K23-May-07 22:28
Harini N K23-May-07 22:28 
GeneralRe: query about counting records entered in same date... Pin
nareshss23-May-07 23:07
nareshss23-May-07 23:07 
AnswerRe: query about counting records entered in same date... Pin
Shiv Singh Sisodiya24-May-07 1:33
Shiv Singh Sisodiya24-May-07 1:33 

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.