Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003

    Question Unanswered: cursors in dbaccess

    Hi all, im new to informix and dont know how to create cursors in the dbaccess env. It seems that they only get running in a 4gl env.

    Im tring to create a query that looks like this but dbaccess sends me and error with the first 1, and I think the cursors will handle the query.

    SELECT distinct a.clich_nss, a.clide_sumsal
    FROM dwhafore@desatcpdwh:tt_af_clivip as a,
    dwhafore:te_af_notafore as b
    WHERE a.clich_nss = b.notch_nss AND
    b.notin_fecna > 19531101 into temp t101;

    SELECT first 1 notch_regpat, notch_nss
    FROM te_af_notafore
    WHERE notch_nss in (
    SELECT clich_nss as nss
    FROM t101) into temp t102;

    Thanks all.


  2. #2
    Join Date
    Nov 2003
    Mumbai, India
    It seems database server version you are using does not support this particular syntax. I think the FIRST keyword specification in SQL was introduced from the version 7.3 onwards.

    SELECT FIRST 1 * FROM systables ;
    SELECT FIRST 1 partnum,tabid,rowsize FROM systables ;

    are valid SQL statements under v7.3x onwards.


  3. #3
    Join Date
    Dec 2003
    Hi thank your for your answer. I think the problem is when i try to use the limit syntax as part of a subquery.

    The server im using is a 9. version


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts