[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Passing NULLs to stored procedures...
- Subject: Re: Passing NULLs to stored procedures...
- From: Khardy229 <Khardy229@AOL.COM>
- Date: Sat, 29 Nov 1997 22:20:11 EST
- Organization: AOL (http://www.aol.com)
Phillip,
Text variables initialize to NULL. You could also try MOVE '' TO $var (this
is two sequential single quotes). If you are selecting values from a table to
pass to the procedure, then the variable would reflect the value selected,
including NULL. If this is not the answer you needed, please be more
specific.
-- Kathi
In a message dated 97-11-24 02:54:40 EST, you write:
> I recently had to wrap an application's stored procedure
> with SQR in order to produce a report. The problem was, I only
> wanted to pass some of the parameters in with each run of the report.
> The stored procedure was written in such a way that NULLs would
> be defaulted for any unspecified parameters but in order to not specify
> a parameter, the only way I could see was to omit it. This meant creating
> a block of code for each possible permutation of input parameters.
> Considering
> the sheer number of output parameters, this block would have been 100
> lines (without the print commands which are in a separate procedure). My
> hacky
> solution was to wrap the proc in another proc of my own making and
> call that with empty strings where I wanted NULLs. This solution is far
> from optimal for many reasons. In a nut shell, is there any way of
> assigning NULLs
> to variables ie:
>
> $var = NULL
>
> To allow:
>
> execute my_proc @var=$var
>
> Any help would be appreciated
>