Re: SQL Exists query in SPL If
Posted in 1996
Dave:
In 4GL I usually do (the more elegant way :-):
LET x_exists = FALSE
SELECT UNIQUE TRUE INTO x_exists FROM xxx WHERE ...
IF x_exists THEN
...
END IFI've no experience in SPL
Mario R. Canto
mcanto@unl.edu.ar
On 29 Jul 1996, Dave Harding wrote:
} All Gurus,
} In SPL, if I want to test the existance of a particular record, I either
} select count(*) into x_count ... or
} select rowid into x_exists ..... and then test the value of either x_count
} or x_exists. It seems to me that you should be able to say something like
} "if [not] exists select ...then ...etc etc. I have had a bit of a fiddle
} but nothing is ever easy is it?
} Has anyone nutted this one out already or discovered that it can't be
} done, I'd appreciate some feedback.
} Thanks
}
}
} Dave Harding
} System Admin/DBA
} Trivium Project,
} BBC Radio.
}
} email: hardid02@bh.bbc.co.uk
} --
} Dave Harding
} __________________________
} TRIVIUM Project
} BBC Network Radio
} __________________________
} HARDID02@bh.bbc.co.uk
}