You are here: Re: Stored procedure with unknown numer of paramters, how? « MsSQL Server « IT news, forums, messages
Re: Stored procedure with unknown numer of paramters, how?

Posted by Tony Rogerson on 03/31/06 10:49

> 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.

Get real, that is the worst way to do it.

Pass in a set of data or XML and do it efficiently and think of scalability.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


"--CELKO--" <jcelko212@earthlink.net> wrote in message
news:1143728606.490777.142380@i39g2000cwa.googlegroups.com...
> 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;
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация