ga*********@yahoo.com wrote:
How can I convert the following T-SQL construct to SQL-PL?
if @ParameterType not in ('p1', 'p2', 'p3', 'p4', 'p4', 'p5')
begin
print 'good parameter'
end
else
begin
print 'bad parameter'
end
CASE
WHEN parameterType NOT IN ('p1', 'p2', 'p3', 'p4', 'p4', 'p5')
THEN 'good parameter'
ELSE 'bad parameter'
END
This is an expression that returns a VARCHAR value. Whatever you do with
this value is up to you. You could either insert it into a table, return
it to the application via a SELECT statement, send it to a UDF to be
written to a file (
http://tinyurl.com/agvaw) or whatever else you might
come up with.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany