Subject | Boolean Expression in parameter |
---|---|
Author | Edson T. Marques |
Post date | 2002-09-12T19:15:02Z |
Hi;
I don't know how can I explain my problem in English (it is bad! (in Enghish I can read but write nor speak)), so I'll try to communicate using signals! Sorry!
I know this is not possible(!), but I want to know if there are any other way (some secret not published) to do this?
CREATE PROCEDURE IIF (EXPRESSION INTEGER, TRUE INTEGER, FALSE INTEGER)
RETURNS (RET INTEGER)
AS
BEGIN
IF (EXPRESSION) THEN
RET = TRUE;
ELSE
RET = FALSE;
SUSPEND;
END
where I coud use in something like this:
select Ret from IIF('A' = 'B', 0, 1) returns 1
select Ret from IIF('A' = 'A', 0, 1) returns 0
etc...
thank you very much!
[Non-text portions of this message have been removed]
I don't know how can I explain my problem in English (it is bad! (in Enghish I can read but write nor speak)), so I'll try to communicate using signals! Sorry!
I know this is not possible(!), but I want to know if there are any other way (some secret not published) to do this?
CREATE PROCEDURE IIF (EXPRESSION INTEGER, TRUE INTEGER, FALSE INTEGER)
RETURNS (RET INTEGER)
AS
BEGIN
IF (EXPRESSION) THEN
RET = TRUE;
ELSE
RET = FALSE;
SUSPEND;
END
where I coud use in something like this:
select Ret from IIF('A' = 'B', 0, 1) returns 1
select Ret from IIF('A' = 'A', 0, 1) returns 0
etc...
thank you very much!
[Non-text portions of this message have been removed]