Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 20 of 20 total
Thread Basic "parameters in SP" question
Tue, Apr 1 2008 6:11 PMPermanent Link

Uli Becker
Tim,

<<
It depends upon the needs of the application.  Right now it simply uses a
NULL value instead, so it gives you the option of having "optional"
parameters, so to speak.  
>>

OK, I see.

So the opposite should be possible as well:

if condition1 then
 Select * from TABLE;
else
 Select *  from TABLE where TableID = ?;
end if;
Execute Statement using ID;

Is that true? In case of condition1 = true, the parameter is ignored? Or have I to use:

if condition1 then
 Select * from TABLE;
 Execute Statement;
else
 Select *  from TABLE where TableID = ?;
 Execute Statement using ID;
end if;

Regards Uli
Wed, Apr 2 2008 1:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando

>I was talking about nulls, not the error message Smiley

I know <vbg>

Roy Lambert
Wed, Apr 2 2008 2:21 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Uli

>I know that named parameters are not allowed in sp's. (A man from [Team-Elevate] should
>know it as well, Roy. Smiley

I thought that was the case but I have this memory (obviously wrong) of using them in a procedure at some point.

Anyway if you note I didn't have the [Team Elevate] tag after my name there thus indicating I wasn't speaking infallibly Smiley

Roy Lambert
Wed, Apr 2 2008 5:43 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Roy

Looking at your "<vbg>" ... Should I run  ?
Am I speeking to Dr Jekyll or Mr Hyde when you don't use the tag Smiley?
--
Fernando Dias
[Team Elevate]

Wed, Apr 2 2008 6:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando

>Looking at your "<vbg>" ... Should I run ?
>Am I speeking to Dr Jekyll or Mr Hyde when you don't use the tag Smiley?

Just hide Smiley

Roy Lambert
Wed, Apr 2 2008 2:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Fernando,

<< What happens to the expressions containing the missing argument? >>

They are evaluated using NULL as the parameter value.

<< Are they evaluated taking NULL as the actual value for the parameter and
in that case, how does EDB deal with expressions like <ColName> = NULL ? >>

It evaluates the expression according to the rules for NULL handling:

http://www.elevatesoft.com/manual?action=mantopic&id=edb1sql&category=0&topic=7

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 2 2008 2:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< Is that true? In case of condition1 = true, the parameter is ignored? >>

Yes.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 2 2008 4:20 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Tim,


> They are evaluated using NULL as the parameter value.

So, for example, the expression "Column = ?" evaluates to NULL for any
value of "Column" ? Even when "Column" is NULL?

--
Fernando Dias
[Team Elevate]
Thu, Apr 3 2008 3:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Fernando,

<< So, for example, the expression "Column = ?" evaluates to NULL for any
value of "Column" ? Even when "Column" is NULL? >>

Yes.  ElevateDB uses standard SQL NULL handling rules, and does not permit
anything to equal NULL since NULL represents an unknown value.  Only IS NULL
or IS NOT NULL can be used to test for NULLs.

DBISAM allowed the use of =, <>, etc. with NULL, but ElevateDB does not.

http://www.elevatesoft.com/manual?action=mantopic&id=edb1sql&category=0&topic=7

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Apr 3 2008 3:35 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Tim,

Perfect.
Thank you for the clarification.

--
Fernando Dias
[Team Elevate]
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image