whether a parameter has been passed explicitly to a stored procedure as
opposed to a parameter that has taken on the default value.
Many thanks
Phil<testemail@.skunkbox.com> wrote in message
news:1106552302.930765.327230@.z14g2000cwz.googlegr oups.com...
> Hello, does anyone know how to determine (within the stored procedure)
> whether a parameter has been passed explicitly to a stored procedure as
> opposed to a parameter that has taken on the default value.
> Many thanks
> Phil
Not as far as I know. You could add code which compares the initial
parameter values to a list of the defaults, but that wouldn't cover the case
where someone explicitly passes the default value.
Simon|||I don't know of a passive way, but you could create another parameter such
as a bool bIsDefault that defaults to TRUE. Then have calling functions pass
a FALSE value to this if they pass any other parameters.
Just a thought.
Cheers!
"Simon Hayes" <sql@.hayes.ch> wrote in message
news:41f4af32_1@.news.bluewin.ch...
> <testemail@.skunkbox.com> wrote in message
> news:1106552302.930765.327230@.z14g2000cwz.googlegr oups.com...
>> Hello, does anyone know how to determine (within the stored procedure)
>> whether a parameter has been passed explicitly to a stored procedure as
>> opposed to a parameter that has taken on the default value.
>> Many thanks
>> Phil
>>
> Not as far as I know. You could add code which compares the initial
> parameter values to a list of the defaults, but that wouldn't cover the
> case where someone explicitly passes the default value.
> Simon|||There are no BOOLEAN data types in SQL-92; they would make no sense in
terms of 3VL and NULL rules.
The guy can check the values as they come into the procudure with an IF
statement in the body or with a CASE expression in the SQL.|||--CELKO-- (jcelko212@.earthlink.net) writes:
> There are no BOOLEAN data types in SQL-92; they would make no sense in
> terms of 3VL and NULL rules.
Don't be silly. In such case neither AND or OR would make sense. Or anything
make sense. Real-world databases are full of boolean values, because
real-world business needs is full of boolean values.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
No comments:
Post a Comment