Click here to Skip to main content
15,179,246 members
Home / Discussions / Database
   

Database

 
Questionsql code problem Help pls Pin
TALHAKOSEN19-Jul-09 23:21
MemberTALHAKOSEN19-Jul-09 23:21 
AnswerRe: sql code problem Help pls Pin
Blue_Boy19-Jul-09 23:29
MemberBlue_Boy19-Jul-09 23:29 
GeneralRe: sql code problem Help pls Pin
TALHAKOSEN20-Jul-09 0:10
MemberTALHAKOSEN20-Jul-09 0:10 
GeneralRe: sql code problem Help pls Pin
Blue_Boy20-Jul-09 0:13
MemberBlue_Boy20-Jul-09 0:13 
QuestionGenerating dynamic where clause in stored procedure in sqlserver 2005 Pin
nainakarri19-Jul-09 21:34
Membernainakarri19-Jul-09 21:34 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
Robin_Roy19-Jul-09 22:32
MemberRobin_Roy19-Jul-09 22:32 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
Blue_Boy19-Jul-09 22:59
MemberBlue_Boy19-Jul-09 22:59 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
--CELKO--20-Jul-09 9:44
Member--CELKO--20-Jul-09 9:44 
This is a very bad SQL programming technique. Read about the poor performance and dangers of SQL Injection. Since T-SQL can handle a long parameter list, use that instead.

CREATE PROCEDURE X (p01 INTEGER, p02 INTEGER, ..p99 INTEGER)
AS
BEGIN ..

SELECT ..
FROM ..
WHERE p IN (COALESCE (p01, 0), COALESCE (p02, 0), COALESCE (p99, 0)zzz0;

.. END;


There are better ways to write this in SQL-2008 and Standard, but the idea is to build a one-coolumn table from parameter and remove the NULLs. Also, by definitio, there is no such thing as a "status_id"; nan attribute can be an identifier or a status, but not both at once.
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
PIEBALDconsult20-Jul-09 11:44
professionalPIEBALDconsult20-Jul-09 11:44 
QuestionUsing Crystal Reprot 10 within MS Access 2003 Pin
aftab8318-Jul-09 1:44
Memberaftab8318-Jul-09 1:44 
AnswerRe: Using Crystal Reprot 10 within MS Access 2003 Pin
Jerry Hammond18-Jul-09 7:34
MemberJerry Hammond18-Jul-09 7:34 
GeneralRe: Using Crystal Reprot 10 within MS Access 2003 Pin
Mycroft Holmes18-Jul-09 16:23
professionalMycroft Holmes18-Jul-09 16:23 
QuestionStoring an array in a string or ...? Pin
Ehsan Baghaki17-Jul-09 22:36
MemberEhsan Baghaki17-Jul-09 22:36 
AnswerRe: Storing an array in a string or ...? Pin
Luc Pattyn18-Jul-09 1:08
sitebuilderLuc Pattyn18-Jul-09 1:08 
AnswerRe: Storing an array in a string or ...? Pin
riced18-Jul-09 1:29
Memberriced18-Jul-09 1:29 
AnswerRe: Storing an array in a string or ...? Pin
Mycroft Holmes18-Jul-09 16:34
professionalMycroft Holmes18-Jul-09 16:34 
GeneralRe: Storing an array in a string or ...? Pin
Luc Pattyn18-Jul-09 19:03
sitebuilderLuc Pattyn18-Jul-09 19:03 
GeneralRe: Storing an array in a string or ...? Pin
Mycroft Holmes18-Jul-09 23:31
professionalMycroft Holmes18-Jul-09 23:31 
GeneralRe: Storing an array in a string or ...? Pin
Luc Pattyn19-Jul-09 3:24
sitebuilderLuc Pattyn19-Jul-09 3:24 
QuestionSQL High Availabilty Pin
Member 259952517-Jul-09 1:08
MemberMember 259952517-Jul-09 1:08 
QuestionDISTINCT and MAX in SQL Query Pin
jishbalan16-Jul-09 21:34
Memberjishbalan16-Jul-09 21:34 
AnswerRe: DISTINCT and MAX in SQL Query Pin
vica dianto16-Jul-09 21:49
Membervica dianto16-Jul-09 21:49 
AnswerRe: DISTINCT and MAX in SQL Query Pin
abcurl17-Jul-09 11:16
Memberabcurl17-Jul-09 11:16 
GeneralRe: DISTINCT and MAX in SQL Query Pin
jishbalan19-Jul-09 19:27
Memberjishbalan19-Jul-09 19:27 
QuestionChange the dataset name in Typed Dataset Pin
Neeraj Kr16-Jul-09 9:20
MemberNeeraj Kr16-Jul-09 9:20 

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.