Re: stored procedures
Posted in 1996
firschke@d243d666.sietec.de wrote:
: Hi all,
: I have 3 problems (and 2 are easy for the gururs out there).
: 1. What`s the syntax to define a whole table record in SPL?
: When I use DEFINE r_table RECORD LIKE Table.*, I get a
: compilation error :-(
You cannot define record structures in SPL like you can in 4GL. :-( !
: 2. Why is the behaviour of a char-variable different to a "LIKE-
: variable", which points to a char-field ?
: I mean You cant do something like "let charvar = likevar[10,12];"
I'm not sure I understand your question. What's your definition and use of
the term "like-variable"?
: 3. And now the difficult one (for me):
: table xy
:
: no name
: ------------
: 1 Michael
: 1 Michael
: 2 Thomas
: 3 David
: What's the SQL-syntax to get the name for all records which have more
: than one entry.
SELECT no, name FROM xy
GROUP BY 1, 2
HAVING COUNT(*) > 1
: The result should be:
: >>>> 1 Michael.
___ ___ Principal Consultant
/ ) __ . __/ /_ ) _ _ __ Informix Software Inc. (303) 850-0210
_/__/ (_(_ (/ / (_(_ _/__) (-' ~/ '(_- 5299 DTC Blvd #740 Englewood CO 80111
dberg@informix.com Opinions expressed herein are my own.
Eventually all things merge into one...and a river runs through it. -N.Maclean