Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Cursors in SQL passthrough
Message
De
04/04/2000 09:24:34
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Using Cursors in SQL passthrough
Divers
Thread ID:
00354922
Message ID:
00354922
Vues:
46
Hi All,

I am wondering if it is possible to use a referance to a cursor in a 2nd SQL statement. In the following 'WRK_RTG' is a cursor that was created with a previous SQL statement.

SELECT WRK_RTG.ORD_NO,
LABOR_CHRGS.RELS_RTG_NO,
LABOR_CHRGS.SEQ_NO,
SUM(DECODE('MACH', LABOR_CHRGS.LABOR_RATE_CD_TYPE, LABOR_CHRGS.HRS, 0)) AS TOT_MACH_HRS,
SUM(DECODE('RUN', LABOR_CHRGS.LABOR_RATE_CD_TYPE, LABOR_CHRGS.HRS, 0)) AS TOT_RUN_HRS,
SUM(DECODE('SETUP', LABOR_CHRGS.LABOR_RATE_CD_TYPE, LABOR_CHRGS.HRS, 0)) AS TOT_SETUP_HRS
FROM
PROD.LABOR_CHRGS LABOR_CHRGS,
WRK_RTG
WHERE
PROD.LABOR_CHRGS.RELS_RTG_NO = WRK_RTG.RELS_RTG_NO
GROUP BY
WRK_RTG.ORD_NO,
PROD.LABOR_CHRGS.RELS_RTG_NO,
PROD.LABOR_CHRGS.SEQ_NO
ORDER BY
WRK_RTG.ORD_NO,
PROD.LABOR_CHRGS.RELS_RTG_NO,
PROD.LABOR_CHRGS.SEQ_NO

If I omit any referance to the cursor, all is ok. But when I put the cursor referance in, it doesn't work. I am using an ORACLE server

TIA
Mike
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform