Re: help with tables
- From: docdwarf@xxxxxxxxx ()
- Date: Thu, 31 Jan 2008 10:35:24 +0000 (UTC)
In article <29n2q3p0caoh922pmsenajrl1niln3j4m3@xxxxxxx>,
Robert <no@xxxxxx> wrote:
On Thu, 31 Jan 2008 17:38:23 +1300, "Pete Dashwood"
<dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
"Robert" <no@xxxxxx> wrote in message
news:jof2q31shvbu6d9ia1i7gelptabq9slahe@xxxxxxxxxx
On Wed, 30 Jan 2008 10:39:28 -0700, "Frank Swarbrick"
<Frank.Swarbrick@xxxxxxxxxxxxxx>
wrote:
--------------------------------------------------------------------
SQL0060W The "COBOL" precompiler is in progress.
19 SQL0008N The token "occurs" found in a host variable
declaration is not valid.
41 SQL4943W The number of host variables in the INTO clause
is not the same as the number of items in the SELECT
clause. SQLSTATE=01503
The manual says DB2 doesn't allow a simple SELECT to return multiple rows.
You must do the
SELECT in a cursor declaration and read the table with a single FETCH, as
illustrated by
Frederico.
Thanks for the experiment.
While I don't claim the same level of SQL knowledge that you have
demonstrated, Robert, I have managed to use it successfully for a number of
years.
Obviously you CAN return multiple rows from a query if you can process a
result set, however, in embedded SQL I've always used the cursor and FETCHed
it.
Many Cobol programmers think it's not possible to get a result set,
except by FETCHing one
row at a time. They regard a database as VSAM on drugs.
Ummmmm... many COBOL programmers I know work with DB2, Mr Wagner; didn't
you mention something about what the manual said regarding this in another
post?
(I have, certainly, seen DB2 installations where the database is treated
in programs as though it were VSAM... and then a few of the 'power users'
get access and training in QMF (training for the programmers usually
consisted of 'The managers went to the classes... and they slept; here's a
manual and remember, we're trying to keep things as much in The Old Way as
possible') and rather... pretty confrontations could result.)
DD
.
- References:
- Re: help with tables
- From: Frank Swarbrick
- Re: help with tables
- From: Robert
- Re: help with tables
- From: Pete Dashwood
- Re: help with tables
- From: Robert
- Re: help with tables
- Prev by Date: Re: help with tables
- Next by Date: Re: Web Cobol - Tool for web develop with AcuCobol
- Previous by thread: Re: help with tables
- Next by thread: Re: help with tables
- Index(es):
Relevant Pages
|