Re: stored procedures
Posted in 1996
G'Day,
In responce to your 1st query, you cannot define a variable in spl to
define a whole table record, but you may use
'DEFINE spl_variable LIKE table.column;', therefore you have to
reference each column in your table.
For you 2nd query, I'm not sure I understand your problem, but I have had
success with :
DEFINE var1 CHAR(20);
DEFINE var2 CHAR(10);
LET var1 = '12345678901234567890';
LET var2 = var1[2,5];
var2 now contains '2345'.
And last but not least, the solution to your third query is ...
SELECT count(*), no, name
FROM xy
GROUP BY no, name
HAVING count(*) > 1;
Will Return : '2,1,Michael'.
I hope these solution help you, email me if you require and more
assistance.
Chris Jones.
De Beers Technical Systems.