Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
"Ramdas Gopinath" — — source: Informix-list mailing list archive (1991-1998)
On 12 Jul 96 at 20:19, Rajendra Singh wrote:
} I am doing the following in ESQL/C using SE:
} - preparing a statement
} - declaring a cursor for it
} - opening the cursor
}
} The statement is something like "select * from x where y = z"
}
} How do I determine how many rows will be fetched? I looked at the
} "sqlca" structure, but it doesn't seem to provide a definitive answer.
} I tried using sqlerrd[0] and sqllerr[3] (after I opened the cursor),
} but they always seem to contain the value "1". Should I check these
} members after the prepare? Or is there some other way (short of
} counting) to determine how many rows will be fetched?
}
Define a temporary variable and then Define a cursor prior to your
cursor given above, as follows:
select count(*) into tmp_count
from x where y = z
tmp_count will have the number of rows that will be selected.
Gopi.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.