|
Posted by --CELKO-- on 03/30/06 17:23
Plese stop puttign those silly prefixes on data element name -- it
makes you look like an OO programmer who never read ISO-11179 standard
or took a course in data modeling. The name "tblProjects implies that
you are working on furniture :) Likewise, a procesure named "search"
does not tell us what is being searched. An attriburte cannot be both
a category and an identifier -- did you mean project categories?
Did you know that a T-SQL Procddure can handle over 1000 parameters?
You can probabl;y get by with a mere 50 of them.
CREATE PROCEDURE SearchProjects
(@my_project CHAR(15), @cat01 INTEGER, @cat02 INTEGER, ., @cat99
INTEGER)
AS
BEGIN
SELECT proj_id
FROM Projects
WHERE proj_name LIKE '%' + @my_project + '%'
AND proj_cat IN
(@cat01, @cat02, ., @cat99);
<<error handling here>>;
END;
[Back to original message]
|