If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > cursors in dbaccess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-16-03, 13:52
ldklf ldklf is offline
Registered User
 
Join Date: Dec 2003
Posts: 2
Question 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.

Jim
Reply With Quote
  #2 (permalink)  
Old 12-17-03, 00:58
vpshriyan vpshriyan is offline
Registered User
 
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
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.

Regards,
Shriyan
Reply With Quote
  #3 (permalink)  
Old 12-17-03, 14:04
ldklf ldklf is offline
Registered User
 
Join Date: Dec 2003
Posts: 2
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

Jim
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On