RE: Does a given row exist.
Posted in 2004
> -----Original Message-----
> From: owner-informix-list@iiug.org [SMTP:owner-informix-list@iiug.org]
> On Behalf Of Andrew Hardy
> Sent: Thursday, November 18, 2004 6:59 AM
> To: informix-list@iiug.org
> Subject: Does a given row exist.
>
> I want to check whether a row for a given critera exists.
>
> the only way I know at present is, for example:
>
> SELECT f1, f2 FROM t WHERE f3 = 'something' And ... ... ; [Bill Dare]
SELECT 1 FROM t WHERE f3 = 'something' And ... ... ;
>
> if (SQLCODE == 0)
> {
> ...
> }
>
> if (SQLCODE == 100)
> {
> ...
> }
>
> I am wondering if there is a more efficient way which avoids
> unnecessarily
> retrieving fields f1 and f2.
>
> Thanks,
>
> Andrew H.
>
>
>
>
> sending to informix-list
sending to informix-list